execute as @a[scores={gametime=..1}] at @s run function parkour_pyramid:firstjoin
function parkour_pyramid:kill_areas/main
function parkour_pyramid:spawn/main
function parkour_pyramid:services/main
function parkour_pyramid:setplayerlevel
function parkour_pyramid:advancements
function parkour_pyramid:setspawnpoints
function parkour_pyramid:levels/main
function parkour_pyramid:deathmessages/main

effect give @a minecraft:saturation 1000000 10 true

#onground
scoreboard players set @a[nbt={OnGround:1b}] onGround 1
scoreboard players set @a[nbt={OnGround:0b}] onGround 0

#invoid
scoreboard players set @a inVoid 0
execute as @a at @s positioned ~ -500 ~ run scoreboard players set @a[distance=..500] inVoid 1

#anti tnt (not enabled because who doesn't like explosions? ;))
#execute as @e[type=tnt] at @s run setblock ~ ~ ~ tnt 
#execute as @e[type=tnt] at @s run particle minecraft:smoke ~ ~2 ~ 0.1 0.5 0.1 0.01 10
#kill @e[type=tnt]

#kill items that don't have stay tag
kill @e[type=item,tag=!stay]

