

#if near entrance, tp past the bedrock barrier
execute as @s run execute at @e[type=marker,distance=..55,tag=KyuBigPyramid,limit=1,sort=nearest] positioned ~ ~-10 ~-19 run execute if entity @s[distance=..2] run execute at @e[type=marker,distance=..75,tag=KyuBigPyramid,limit=1,sort=nearest] positioned ~ ~-9 ~-18 run tp @s ~ ~-1 ~6




#check for bedrock above the player to make sure they are INSIDE the pyramid and not just standing near or on top of it, then set them to adventure if so
tag @s remove BeddyFound
execute at @s run execute if block ~ ~1 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~2 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~3 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~4 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~5 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~6 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~7 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~8 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~9 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~10 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~11 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~12 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~13 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~14 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~15 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~16 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~17 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~18 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~19 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~20 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~21 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~22 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~23 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~24 ~ bedrock run tag @s add BeddyFound
execute at @s run execute if block ~ ~25 ~ bedrock run tag @s add BeddyFound

#if the player is inside the pyramid and the pyramid has yet to start, add the start tag and run the function
execute as @s[tag=BeddyFound] run execute as @e[type=marker,distance=..55,tag=KyuBigPyramid,limit=1,sort=nearest,tag=!Started] run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/start


####??????? idk why this is here lol
#execute positioned ~ ~-4 ~ run execute as @e run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/maintimer


gamemode adventure @s[tag=BeddyFound]

tag @s[tag=BeddyFound] add KyuSpecialPlayerTag
tag @s[tag=BeddyFound] add KyuAdventureTag
tag @s[tag=BeddyFound] add KyuPyramidTag


tag @s remove BeddyFound