tag @s add invis_temp
execute if entity @s[team=blue] as @e[type=marker,tag=trap_kit,tag=red,distance=0.1..5,sort=nearest,limit=3] at @s run function pctf:logic/items/trap_kit/detonate
execute if entity @s[team=red] as @e[type=marker,tag=trap_kit,tag=blue,distance=0.1..5,sort=nearest,limit=3] at @s run function pctf:logic/items/trap_kit/detonate
tag @s remove invis_temp
scoreboard players set @s invis_timer 2
effect give @s minecraft:glowing 3 0 true