scoreboard players set @s[scores={KyuDummy=60..}] KyuDummy 0
#execute at @s positioned ~ ~-9 ~-20 run fill ~ ~ ~ ~ ~ ~ dirt replace air

#execute as @s[scores={KyuDummy=50},tag=!Started] run execute at @s positioned ~ ~-10 ~-12 run execute if entity @a[distance=..4,gamemode=!spectator] run function zzzzdonotuse:mobspawners/spawnerstuff/start
execute at @s[scores={KyuDummy=50},tag=!Started] positioned ~-28 ~-14 ~-28 run execute as @a[dy=27,dx=56,dz=56,gamemode=!spectator,gamemode=!creative] run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/setadventure



execute as @s[scores={KyuDummy=50},tag=Started] run execute at @s positioned ~ ~-9 ~-18 run execute if entity @a[distance=..2,gamemode=!spectator] run execute as @a[distance=..2,gamemode=!spectator] run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/setadventure
execute at @s[scores={KyuDummy=50},tag=Started] positioned ~-28 ~-14 ~-28 run execute as @a[dy=27,dx=56,dz=56,gamemode=!spectator,gamemode=!adventure,gamemode=!creative] run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/setadventure

execute as @s[scores={KyuDummy=52},tag=Started] run execute as @a[distance=..40,gamemode=!spectator,gamemode=!creative] run execute at @s run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/mobspawnermain
execute as @s[scores={KyuDummy=52},tag=Started] run execute as @e[distance=..40,type=marker,tag=SpawnMeAMob] run execute if predicate suhc:70percent run execute at @s run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/checkspawnrange

execute as @s[scores={KyuDummy=54},tag=Started] run tag @s remove DoArrowTrap
execute as @s[scores={KyuDummy=54},tag=Started] run execute at @s positioned ~-9 ~-11 ~15 run execute if entity @a[dy=1,dx=16,dz=1,gamemode=!spectator] run tag @s add DoArrowTrap
execute as @s[scores={KyuDummy=54},tag=Started] run execute at @s positioned ~-9 ~-11 ~8 run execute if entity @a[dy=1,dx=5,dz=7,gamemode=!spectator] run tag @s add DoArrowTrap

execute as @s[scores={KyuDummy=56},tag=Started] run execute at @s positioned ~10 ~-3 ~5 run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/checkskulls


#/execute as @e[type=marker,tag=PyramidArrowTrap] run execute at @s run function zzzzdonotuse:mobspawners/spawnerstuff/arrowroomshoot



#/execute at @e[limit=1,tag=KyuBigPyramid] positioned ~-9 ~-11 ~15 run execute if entity @a[dy=1,dx=16,dz=1,gamemode=!spectator] run say a
#/execute at @e[limit=1,tag=KyuBigPyramid] positioned ~-9 ~-11 ~8 run execute if entity @a[dy=1,dx=5,dz=7,gamemode=!spectator] run say a