scoreboard players add @s generic_timer 1

execute if score @s generic_timer matches ..100 run particle minecraft:enchanted_hit ~ ~ ~ 0 0.25 0 0 5 normal @a
execute if score @s generic_timer matches 100 run function pctf:logic/items/trap_kit/armed

execute if score @s generic_timer matches 100.. run function pctf:logic/items/trap_kit/particles

execute if score @s generic_timer matches 100.. if entity @s[tag=blue] positioned ~ ~-1 ~ if entity @a[team=red,distance=..2] run function pctf:logic/items/trap_kit/detonate
execute if score @s generic_timer matches 100.. if entity @s[tag=red] positioned ~ ~-1 ~ if entity @a[team=blue,distance=..2] run function pctf:logic/items/trap_kit/detonate

execute if block ~ ~-0.25 ~ #pctf:projectile_pass run tp @s ~ ~-0.05 ~
execute if score @s generic_timer matches 100.. if block ~ ~-0.25 ~ #pctf:projectile_pass run scoreboard players add @s generic_timer 20

execute if score @s generic_timer matches 3600.. run function pctf:logic/items/trap_kit/detonate