#execute positioned 19 36 -21 if entity @a[distance=..2] run tp @s 6.31 49.47 -35.30 549.60 3.02

execute as @a[scores={checkpoint=43}] at @s run execute as @s[y=17,dy=0] at @s run function koncept:return_stage with storage stage:checkpoint

execute as @a[scores={checkpoint=43,checkpoint_between_43=0}] at @s positioned 11 25 -20 if entity @s[distance=..2] run tag @s add return_stage_checkpoint_message
execute as @a[scores={checkpoint=43,checkpoint_between_43=0}] at @s positioned 11 25 -20 if entity @s[distance=..2] run spawnpoint @s 11 25 -20 95.85
execute as @a[scores={checkpoint=43,checkpoint_between_43=0}] at @s positioned 11 25 -20 if entity @s[distance=..2] run scoreboard players set @s checkpoint_between_43 1

execute as @a[scores={checkpoint=43,checkpoint_between_43=1}] at @s positioned 2 29 -24 if entity @s[distance=..2] run tag @s add return_stage_checkpoint_message
execute as @a[scores={checkpoint=43,checkpoint_between_43=1}] at @s positioned 2 29 -24 if entity @s[distance=..2] run spawnpoint @s 0 29 -24 303.21
execute as @a[scores={checkpoint=43,checkpoint_between_43=1}] at @s positioned 2 29 -24 if entity @s[distance=..2] run scoreboard players set @s checkpoint_between_43 2

execute as @a[scores={checkpoint=43,checkpoint_between_43=2}] at @s positioned 15 31 -16 if entity @s[distance=..2] run tag @s add return_stage_checkpoint_message
execute as @a[scores={checkpoint=43,checkpoint_between_43=2}] at @s positioned 15 31 -16 if entity @s[distance=..2] run spawnpoint @s 15 31 -16 -452.34
execute as @a[scores={checkpoint=43,checkpoint_between_43=2}] at @s positioned 15 31 -16 if entity @s[distance=..2] run scoreboard players set @s checkpoint_between_43 3

#434301 434302

execute positioned 15 33 -19 if entity @a[distance=..3] unless score 434301 timer_an matches 2 run scoreboard players set 434301 timer_an 1
execute if score 434301 timer_an matches 1 run scoreboard players add 434302 timer_an 1

execute if score 434302 timer_an matches 5 run setblock 13 33 -16 minecraft:waxed_copper_block
execute if score 434302 timer_an matches 5 run execute positioned 11 34 -19 run playsound minecraft:block.copper.place block @a[distance=..8] 11 34 -19 1111 1

execute if score 434302 timer_an matches 21 run setblock 9 33 -16 minecraft:waxed_copper_block
execute if score 434302 timer_an matches 20 run execute positioned 11 34 -19 run playsound minecraft:block.copper.place block @a[distance=..8] 11 34 -19 1111 1

execute if score 434302 timer_an matches 40 run setblock 7 33 -19 minecraft:waxed_copper_block
execute if score 434302 timer_an matches 40 run execute positioned 11 34 -19 run playsound minecraft:block.copper.place block @a[distance=..8] 11 34 -19 1111 1

execute if score 434302 timer_an matches 60 run setblock 8 34 -23 minecraft:waxed_copper_block
execute if score 434302 timer_an matches 60 run execute positioned 11 34 -19 run playsound minecraft:block.copper.place block @a[distance=..8] 11 34 -19 1111 1

execute if score 434302 timer_an matches 80 run setblock 11 35 -24 minecraft:waxed_copper_block
execute if score 434302 timer_an matches 80 run execute positioned 11 34 -19 run playsound minecraft:block.copper.place block @a[distance=..8] 11 34 -19 1111 1

execute if score 434302 timer_an matches 81 run scoreboard players set 434301 timer_an 2

execute if score 434301 timer_an matches 2 run execute positioned 11 33 -20 unless entity @a[scores={checkpoint=43},distance=..5] run scoreboard players set 434301 timer_an 3

execute if score 434301 timer_an matches 3.. run scoreboard players add 434302 timer_an 1

execute if score 434302 timer_an matches 85 run setblock 13 33 -16 minecraft:air
execute if score 434302 timer_an matches 90 run setblock 9 33 -16 minecraft:air
execute if score 434302 timer_an matches 95 run setblock 7 33 -19 minecraft:air
execute if score 434302 timer_an matches 100 run setblock 8 34 -23 minecraft:air
execute if score 434302 timer_an matches 105 run setblock 11 35 -24 minecraft:air

execute if score 434302 timer_an matches 105 run scoreboard players reset 434301 timer_an
execute if score 434302 timer_an matches 105 run scoreboard players reset 434302 timer_an