execute positioned 27 23 34 if entity @a[distance=..5] unless score ray_tracing0 timer_an matches 2 run scoreboard players set ray_tracing0 timer_an 1
execute if score ray_tracing0 timer_an matches 1 run tellraw @a {"text":"<Non> Oh, you're stuck here too? When I started parkouring, I didn't even realize I had to find my way around here! How do you even get through this?!"}
execute if score ray_tracing0 timer_an matches 1 run scoreboard players set ray_tracing0 timer_an 2



execute as @a[scores={checkpoint=4,checkpoint_between_4=0}] at @s positioned 28 21 39 if entity @s[distance=..3] run tag @s add return_stage_checkpoint_message
execute as @a[scores={checkpoint=4}] at @s positioned 28 21 39 if entity @s[distance=..3] run spawnpoint @s 27 20 39 228.50
execute as @a[scores={checkpoint=4}] at @s positioned 28 21 39 if entity @s[distance=..3] run scoreboard players set @s checkpoint_between_4 1

execute positioned 27 23 34 if entity @a[distance=..5] unless score ray_tracing1 timer_an matches 0 run scoreboard players set ray_tracing1 timer_an -1
execute if score ray_tracing1 timer_an matches -1 run tellraw @a {"text":"<Non> Oh, you're stuck here too? When I started parkouring, I didn't even realize I had to find my way around here! How do you even get through this?!"}
execute if score ray_tracing1 timer_an matches -1 run scoreboard players set ray_tracing1 timer_an 0

#04040401 04040402 04040403 04040404

execute positioned 32 35 40 if entity @a[distance=..1] unless score 04040401 timer_an matches 2 run scoreboard players set 04040401 timer_an 1
execute if score 04040401 timer_an matches 1 run scoreboard players add 04040402 timer_an 1

execute if score 04040402 timer_an matches 20 run setblock 36 35 40 minecraft:polished_andesite
execute if score 04040402 timer_an matches 20 run execute positioned 32 37 35 run playsound minecraft:entity.item.pickup block @a[distance=..10] 32 37 35 1111 1

execute if score 04040402 timer_an matches 40 run setblock 35 36 37 minecraft:polished_andesite
execute if score 04040402 timer_an matches 40 run execute positioned 32 37 35 run playsound minecraft:entity.item.pickup block @a[distance=..10] 32 37 35 1111 1

execute if score 04040402 timer_an matches 60 run setblock 32 37 35 minecraft:polished_andesite
execute if score 04040402 timer_an matches 60 run execute positioned 32 37 35 run playsound minecraft:entity.item.pickup block @a[distance=..10] 32 37 35 1111 1

execute if score 04040402 timer_an matches 80 run setblock 29 38 36 minecraft:polished_andesite
execute if score 04040402 timer_an matches 80 run execute positioned 32 37 35 run playsound minecraft:entity.item.pickup block @a[distance=..10] 32 37 35 1111 1

execute if score 04040402 timer_an matches 81 run scoreboard players set 04040401 timer_an 2

execute if score 04040401 timer_an matches 2 run execute positioned 32 37 36 unless entity @a[distance=..7] run scoreboard players set 04040403 timer_an 1

execute if score 04040403 timer_an matches 1.. run scoreboard players add 04040404 timer_an 1

execute if score 04040404 timer_an matches 20 run setblock 36 35 40 minecraft:air
execute if score 04040404 timer_an matches 20 run execute positioned 32 37 35 run playsound minecraft:entity.item.pickup block @a[distance=..10] 32 37 35 1111 1

execute if score 04040404 timer_an matches 40 run setblock 35 36 37 minecraft:air
execute if score 04040404 timer_an matches 40 run execute positioned 32 37 35 run playsound minecraft:entity.item.pickup block @a[distance=..10] 32 37 35 1111 1

execute if score 04040404 timer_an matches 60 run setblock 32 37 35 minecraft:air
execute if score 04040404 timer_an matches 60 run execute positioned 32 37 35 run playsound minecraft:entity.item.pickup block @a[distance=..10] 32 37 35 1111 1

execute if score 04040404 timer_an matches 80 run setblock 29 38 36 minecraft:air
execute if score 04040404 timer_an matches 80 run execute positioned 32 37 35 run playsound minecraft:entity.item.pickup block @a[distance=..10] 32 37 35 1111 1

execute if score 04040404 timer_an matches 80 run scoreboard players reset 04040401 timer_an
execute if score 04040404 timer_an matches 80 run scoreboard players reset 04040402 timer_an
execute if score 04040404 timer_an matches 80 run scoreboard players reset 04040403 timer_an
execute if score 04040404 timer_an matches 80 run scoreboard players reset 04040404 timer_an


###
execute positioned 29 35 35 if entity @a[distance=..10] run scoreboard players set 14 timer 1
execute if score 14 timer matches 1 run scoreboard players add 15 timer 1

execute if score 15 timer matches ..20 run execute as @e[type=minecraft:armor_stand,tag=12] at @s run execute as @e[type=minecraft:armor_stand,tag=12] at @s run tp @s ~ ~ ~-0.1
execute if score 15 timer matches 20..50 run execute as @e[type=minecraft:armor_stand,tag=12] at @s run execute as @e[type=minecraft:armor_stand,tag=12] at @s run tp @s ~ ~ ~0.1
execute if score 15 timer matches 50..60 run execute as @e[type=minecraft:armor_stand,tag=12] at @s run execute as @e[type=minecraft:armor_stand,tag=12] at @s run tp @s ~ ~ ~-0.1

execute if score 15 timer matches ..20 run execute as @e[type=minecraft:armor_stand,tag=13] at @s run execute as @e[type=minecraft:armor_stand,tag=13] at @s run tp @s ~ ~ ~0.1
execute if score 15 timer matches 20..50 run execute as @e[type=minecraft:armor_stand,tag=13] at @s run execute as @e[type=minecraft:armor_stand,tag=13] at @s run tp @s ~ ~ ~-0.1
execute if score 15 timer matches 50..60 run execute as @e[type=minecraft:armor_stand,tag=13] at @s run execute as @e[type=minecraft:armor_stand,tag=13] at @s run tp @s ~ ~ ~0.1

execute if score 15 timer matches 60.. run scoreboard players reset 14 timer
execute if score 15 timer matches 60.. run scoreboard players reset 15 timer


