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

#Id
tag @s add this
execute as @p[distance=..2.5,gamemode=!spectator,scores={cooldown=1}] if entity @s[team=blue] run tag @e[tag=this] add blue
execute as @p[distance=..2.5,gamemode=!spectator,scores={cooldown=1}] if entity @s[team=red] run tag @e[tag=this] add red
execute as @p[distance=..2.5,gamemode=!spectator,scores={cooldown=1}] if entity @s[team=green] run tag @e[tag=this] add green
execute as @p[distance=..2.5,gamemode=!spectator,scores={cooldown=1}] if entity @s[team=yellow] run tag @e[tag=this] add yellow
execute as @p[distance=..2.5,gamemode=!spectator,scores={cooldown=1}] if entity @s[team=seeker] run tag @e[tag=this] add seeker

scoreboard players operation @s id = @p[distance=..2.5,gamemode=!spectator,scores={cooldown=1}] id
tag @s add idconfirm
tag @s remove this