#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

execute if block ~ ~-2 ~ minecraft:light_blue_concrete run team join f-blue
execute if block ~ ~-2 ~ minecraft:yellow_concrete run team join f-yellow
execute if block ~ ~-2 ~ minecraft:green_concrete run team join f-green
execute if block ~ ~-2 ~ minecraft:red_concrete run team join f-red
execute if block ~ ~-2 ~ minecraft:magenta_concrete run team join random
execute if block ~ ~-2 ~ minecraft:cyan_concrete run team join f-hider
execute if block ~ ~-2 ~ minecraft:purple_concrete run team join lobby

playsound minecraft:entity.experience_orb.pickup master @s
particle minecraft:crit ~ ~1 ~ 0.2 0.5 0.2 0.1 50
tag @s add team-selected