execute as @e[type=armor_stand,name=lvl37rising,tag=active] at @s run function parkour_pyramid:levels/level37/risingwater/active
execute as @e[type=armor_stand,name=lvl37rising,tag=starting] run function parkour_pyramid:levels/level37/risingwater/countdown

execute as @a[x=-70.5,y=1,z=289.5,dx=18,dy=4,dz=14,tag=!isPlaying37] run tag @e[type=armor_stand,name=lvl37rising,tag=!active] add starting
tag @a[x=-70.5,y=1,z=289.5,dx=18,dy=4,dz=14] add isPlaying37
tag @a[x=-71.5,y=69,z=297.5,distance=..5] remove isPlaying37
tag @a[x=-52.5,y=51,z=301.5,dx=0,dy=2,dz=1] remove isPlaying37
tag @a[scores={level=..36}] remove isPlaying37
tag @a[scores={level=38..}] remove isPlaying37

execute as @e[type=armor_stand,name=lvl37rising,tag=starting] at @s unless entity @a[tag=isPlaying37] run function parkour_pyramid:levels/level37/risingwater/reset
execute as @e[type=armor_stand,name=lvl37rising,tag=active] at @s unless entity @a[tag=isPlaying37] run function parkour_pyramid:levels/level37/risingwater/reset
execute if entity @e[type=armor_stand,name=lvl37rising,tag=active] as @a[scores={level=37}] at @s if block ~ ~ ~ #parkour_pyramid:water run function parkour_pyramid:levels/level37/pain

execute if entity @e[type=armor_stand,name=lvl37rising,tag=active] as @a[scores={level=37}] at @s if block ~ ~ ~ #parkour_pyramid:waterlogged[waterlogged=true] run function parkour_pyramid:levels/level37/pain
execute if entity @e[type=armor_stand,name=lvl37rising,tag=active] as @a[scores={level=37}] at @s if block ~ ~ ~ minecraft:seagrass run function parkour_pyramid:levels/level37/pain
