tag @s add Started
execute at @s positioned ~ ~-12 ~-18 run clone ~ ~ ~ ~ ~-1 ~1 ~ ~3 ~
execute at @s positioned ~ ~-9 ~-18 run fill ~-5 ~-5 ~-5 ~5 ~5 ~5 bedrock replace red_sandstone
execute at @s positioned ~ ~-9 ~-18 run gamemode adventure @a[distance=..4,gamemode=!spectator]
execute at @s positioned ~ ~-9 ~-18 run tp @a[distance=..4,gamemode=!spectator] ~ ~-1 ~6
execute at @s positioned ~-28 ~-14 ~-28 run execute as @a[dy=27,dx=56,dz=56,gamemode=!spectator,gamemode=!adventure] run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/setadventure

execute at @s run fill ~-28 ~5 ~-28 ~28 ~-3 ~28 air replace verdant_froglight
execute at @s run fill ~-28 ~-4 ~-28 ~28 ~-10 ~28 air replace verdant_froglight
execute at @s run fill ~-28 ~-11 ~-28 ~28 ~-17 ~28 air replace verdant_froglight
execute at @s run fill ~-28 ~-18 ~-28 ~28 ~-24 ~28 air replace verdant_froglight
execute at @s run fill ~-28 ~-24 ~-28 ~28 ~-28 ~28 air replace verdant_froglight


execute at @s positioned ~-16 ~-14 ~-16 run fill ~-10 ~-10 ~-10 ~10 ~10 ~10 structure_void replace green_carpet

execute at @e[type=marker,distance=..65,tag=PyramidSpawner,tag=SkeletonSpawner] run setblock ~ ~ ~ spawner{SpawnCount:0,SpawnRange:5,Delay:0,MinSpawnDelay:100000,MaxSpawnDelay:100000,MaxNearbyEntities:100,RequiredPlayerRange:8,SpawnData:{entity:{id:"minecraft:skeleton"}}} replace
execute at @e[type=marker,distance=..65,tag=PyramidSpawner,tag=ZombieSpawner] run setblock ~ ~ ~ spawner{SpawnCount:0,SpawnRange:5,Delay:0,MinSpawnDelay:100000,MaxSpawnDelay:100000,MaxNearbyEntities:100,RequiredPlayerRange:8,SpawnData:{entity:{id:"minecraft:husk"}}} replace
execute at @e[type=marker,distance=..65,tag=PyramidSpawner,tag=BlazeSpawner] run setblock ~ ~ ~ spawner{SpawnCount:0,SpawnRange:5,Delay:0,MinSpawnDelay:100000,MaxSpawnDelay:100000,MaxNearbyEntities:100,RequiredPlayerRange:8,SpawnData:{entity:{id:"minecraft:blaze"}}} replace
execute at @e[type=marker,distance=..65,tag=PyramidSpawner,tag=CaveSpiderSpawner] run setblock ~ ~ ~ spawner{SpawnCount:0,SpawnRange:5,Delay:0,MinSpawnDelay:100000,MaxSpawnDelay:100000,MaxNearbyEntities:100,RequiredPlayerRange:8,SpawnData:{entity:{id:"minecraft:cave_spider"}}} replace
execute at @e[type=marker,distance=..65,tag=PyramidSpawner,tag=SilverfishSpawner] run setblock ~ ~ ~ spawner{SpawnCount:0,SpawnRange:5,Delay:0,MinSpawnDelay:100000,MaxSpawnDelay:100000,MaxNearbyEntities:100,RequiredPlayerRange:8,SpawnData:{entity:{id:"minecraft:silverfish"}}} replace


execute at @e[type=marker,distance=..65,tag=PyramidSkeletonStill] run summon skeleton ~ ~ ~ {Tags:["GKNameTag"],PersistenceRequired:1b,Health:20f,Attributes:[{Name:generic.movement_speed,Base:.00},{Name:generic.max_health,Base:20}],HandItems:[{id:"minecraft:bow",Count:1b,tag:{Enchantments:[{id:"minecraft:power",lvl:3s},{id:"minecraft:punch",lvl:2s},{id:"minecraft:flame",lvl:1s}]}},{}],HandDropChances:[-327.000F,-327.000F],ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:15714048}}},{id:"minecraft:chainmail_leggings",Count:1b,tag:{display:{color:15714048}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:15714048}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:{Id:[I;-1693098047,1009534297,-1920173089,252676858],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDg5M2I3ZDE2N2NiM2Q1YWRlZjBlMjA0NDhlODgyMDEwMDViYjgwNTMyYWZkYWRjODAyNmMwOTZjNTU2ZDFiNCJ9fX0="}]}}}}]}


execute at @e[type=marker,distance=..65,tag=RepeatCommandBlockMarker] run data merge block ~ ~ ~ {auto:1b}
execute at @e[type=marker,distance=..65,tag=RepeatCommandBlockMarker] run fill ~ ~1 ~ ~ ~1 ~ air replace command_block
kill @e[type=marker,distance=..65,tag=RepeatCommandBlockMarker]
execute at @e[type=marker,distance=..65,tag=KyuPyramidMarker,tag=SkellyBoys] run execute as @e[limit=5] run summon skeleton ~ ~ ~.33 {Silent:1b,Health:3f,Tags:["GKNameTag"],HandItems:[{id:"minecraft:bone",Count:1b},{}],Attributes:[{Name:generic.movement_speed,Base:.35},{Name:generic.attack_damage,Base:-100}]}
execute at @e[type=marker,distance=..65,tag=KyuPyramidMarker] run fill ~-1 ~-1 ~-1 ~1 ~1 ~1 air replace command_block
execute at @e[type=marker,distance=..65,tag=PyramidArrowTrap] run fill ~-1 ~-1 ~-1 ~1 ~1 ~1 air replace command_block


kill @e[type=marker,distance=..65,tag=PyramidSkeletonStill]


#
#execute as @s[tag=SkeletonSpawner] run execute at @e[distance=..9,type=skeleton] run scoreboard players add @s KyuDummy3 1
#execute as @s[tag=SkeletonSpawnerDoubleWeight] run execute at @e[distance=..9,type=skeleton] run scoreboard players add @s KyuDummy3 1
#execute as @s[tag=ZombieSpawner] run execute at @e[distance=..9,type=husk] run scoreboard players add @s KyuDummy3 1
#execute as @s[tag=BlazeSpawner] run execute at @e[distance=..20,type=blaze] run scoreboard players add @s KyuDummy3 1
#execute as @s[tag=CaveSpiderSpawner] run execute at @e[distance=..9,type=cave_spider] run scoreboard players add @s KyuDummy3 1
#execute as @s[tag=SilverfishSpawner] run execute at @e[distance=..9,type=silverfish] run scoreboard players add @s KyuDummy3 1

execute at @e[type=marker,tag=SelfDestructPyramidMarkerButton,distance=..100] run setblock ~ ~ ~ command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:structures/pyramid/button",TrackOutput:0} destroy
kill @e[type=marker,tag=SelfDestructPyramidMarkerButton,distance=..100]
#/give @p end_stone{CanPlaceOn:["minecraft:cut_sandstone","minecraft:smooth_sandstone","minecraft:tripwire","minecraft:dispenser","minecraft:spawner","minecraft:sandstone_stairs","minecraft:cobweb","minecraft:chest"]} 1
#/give @p iron_pickaxe{CanDestroy:["minecraft:spawner","minecraft:end_stone_bricks","minecraft:tripwire"],Damage:110} 1