
execute as @a[scores={checkpoint=42,checkpoint_between_42=0}] at @s positioned 9 26 -34 if entity @s[distance=..2] run tag @s add return_stage_checkpoint_message
execute as @a[scores={checkpoint=42,checkpoint_between_42=0}] at @s positioned 9 26 -34 if entity @s[distance=..2] run spawnpoint @s 9 26 -34 628.50
execute as @a[scores={checkpoint=42,checkpoint_between_42=0}] at @s positioned 9 26 -34 if entity @s[distance=..2] run scoreboard players set @s checkpoint_between_42 1



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

#cactus

execute as @a[scores={checkpoint=42},tag=!cactus] at @s run function koncept:level/cactus
execute as @a[scores={checkpoint=42},tag=cactus] at @s run function koncept:level/nocactus

scoreboard players add 7cactus timer 1
execute as @a[scores={checkpoint=42}] at @s run execute if score 7cactus timer matches 10.. run function koncept:level/cactus
execute as @a[scores={checkpoint=42}] at @s run execute if score 7cactus timer matches 10.. run scoreboard players reset 7cactus timer


execute as @a[scores={checkpoint=42}] at @s run execute at @s[y=30,dy=40] as @s if block ~ ~1 ~ minecraft:bubble_column run effect give @s minecraft:slowness 5 255 true

execute positioned 16 30 -34 if entity @a[scores={checkpoint=42},distance=..10] run scoreboard players add 320 timer_an2 1

execute if score 320 timer_an2 matches 1 run fill 11 37 -38 22 27 -30 minecraft:light_blue_concrete replace minecraft:void_air

execute if score 320 timer_an2 matches 45 run fill 11 37 -38 22 27 -30 minecraft:void_air replace minecraft:light_blue_concrete
execute if score 320 timer_an2 matches 40 run fill 11 37 -38 22 27 -30 minecraft:cyan_concrete replace minecraft:air
execute if score 320 timer_an2 matches 40 run fill 17 26 -33 15 26 -35 minecraft:air

execute if score 320 timer_an2 matches 85 run fill 11 37 -38 22 27 -30 minecraft:air replace minecraft:cyan_concrete
execute if score 320 timer_an2 matches 80 run fill 11 37 -38 22 27 -30 minecraft:blue_concrete replace minecraft:cave_air
execute if score 320 timer_an2 matches 80 run fill 17 26 -33 15 26 -35 minecraft:sandstone
execute if score 320 timer_an2 matches 80 run setblock 15 26 -33 minecraft:orange_terracotta
execute if score 320 timer_an2 matches 80 run setblock 15 26 -35 minecraft:orange_terracotta
execute if score 320 timer_an2 matches 80 run setblock 17 26 -35 minecraft:orange_terracotta
execute if score 320 timer_an2 matches 80 run setblock 17 26 -33 minecraft:orange_terracotta
execute if score 320 timer_an2 matches 80 run setblock 16 26 -34 minecraft:blue_terracotta

execute if score 320 timer_an2 matches 120 run fill 11 37 -38 22 27 -30 minecraft:cave_air replace minecraft:blue_concrete

execute if score 320 timer_an2 matches 40 run execute positioned 16 30 -34 run playsound minecraft:entity.item.pickup block @a[distance=..10] 16 30 -34 1111 1
execute if score 320 timer_an2 matches 80 run execute positioned 16 30 -34 run playsound minecraft:entity.item.pickup block @a[distance=..10] 16 30 -34 1111 1
execute if score 320 timer_an2 matches 120 run execute positioned 16 30 -34 run playsound minecraft:entity.item.pickup block @a[distance=..10] 16 30 -34 1111 1

execute if score 320 timer_an2 matches 120 run scoreboard players reset 321 timer_an2
execute if score 320 timer_an2 matches 120 run scoreboard players reset 320 timer_an2