execute at @a positioned ~-1 ~ ~-1 as @e[type=armor_stand,tag=spike,dx=1,dz=1,dy=2,scores={timer=..0}] at @s run function main:game/wave/stages/2/trap {"time":20}

execute as @e[type=armor_stand,tag=spike,scores={timer=21..}] at @s run function main:game/wave/stages/2/hit
execute as @e[type=armor_stand,tag=spike,scores={timer=21}] at @s positioned ~-1 ~-1 ~-1 as @n[type=item_display,tag=aj.spike.root,dx=1,dz=1,dy=1] run function animated_java:spike/animations/retract/tween {to_frame:0,duration:4}
execute as @e[type=armor_stand,tag=spike,scores={timer=1}] at @s positioned ~-1 ~-1 ~-1 as @e[type=item_display,tag=aj.spike.root,dx=1,dz=1,dy=1] run function animated_java:spike/animations/retract/tween {to_frame:0,duration:4}
execute as @e[type=armor_stand,tag=spike,scores={timer=1..}] run scoreboard players remove @s timer 1