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

execute as @a[scores={checkpoint=48,checkpoint_between_48=0}] at @s positioned -2 37 -35 if entity @s[distance=..2] run tag @s add return_stage_checkpoint_message
execute as @a[scores={checkpoint=48,checkpoint_between_48=0}] at @s positioned -2 37 -35 if entity @s[distance=..2] run spawnpoint @s -2 37 -35 -320.71
execute as @a[scores={checkpoint=48,checkpoint_between_48=0}] at @s positioned -2 37 -35 if entity @s[distance=..2] run scoreboard players set @s checkpoint_between_48 1

kill @e[type=minecraft:item,nbt={Item: {id: "minecraft:snowball",components: {"minecraft:custom_data": {kill_item: 1b}}}}]

execute as @a[scores={checkpoint=48}] at @s positioned 8 37 -34 if entity @s[distance=..1.5] run schedule function koncept:teleport8 5t append
execute as @a[scores={checkpoint=48}] at @s positioned 8 37 -34 if entity @s[distance=..1.5] run tp @s 15.41 34.00 -41.30 -1259.56 0.79

execute as @a[scores={checkpoint=48}] at @s positioned -2 36 -34 if entity @s[distance=..2] run tag @s add 48_snowball_no
clear @a[tag=48_snowball_no] minecraft:snowball

execute as @a[scores={checkpoint=48}] at @s if entity @e[type=minecraft:item,tag=snowball43,distance=..1] run tag @s add 43sn
execute as @a[tag=!48_snowball_no,tag=43sn,nbt=!{Inventory:[{id:"minecraft:snowball"}]}] at @s run give @s snowball[custom_data={kill_item:1b}] 1


execute unless block 8 41 -49 minecraft:target[power=0] unless score 208 timer_an2 matches 2 run scoreboard players set 208 timer_an2 1
execute if score 208 timer_an2 matches 1 run scoreboard players add 209 timer_an2 1

execute if score 209 timer_an2 matches 2 run fill 7 41 -50 9 41 -48 minecraft:red_wool replace minecraft:air
execute if score 209 timer_an2 matches 2 run fill 6 41 -51 10 41 -47 minecraft:white_wool replace minecraft:air
execute if score 209 timer_an2 matches 2 run execute positioned 8 41 -49 run playsound minecraft:block.stone.place block @a[distance=..6] 8 41 -49 1111 1

execute if score 209 timer_an2 matches 40 run fill 6 41 -51 10 41 -47 minecraft:air replace #minecraft:wool


execute if score 209 timer_an2 matches 40 run scoreboard players reset 208 timer_an2
execute if score 209 timer_an2 matches 40 run scoreboard players reset 209 timer_an2




execute unless block 1 41 -48 minecraft:target[power=0] unless score 210 timer_an2 matches 2 run scoreboard players set 210 timer_an2 1
execute if score 210 timer_an2 matches 1 run scoreboard players add 211 timer_an2 1

execute if score 211 timer_an2 matches 2 run fill 2 41 -47 0 41 -49 minecraft:red_wool replace air
execute if score 211 timer_an2 matches 2 run fill 3 41 -50 -1 41 -46 minecraft:white_wool replace minecraft:air
execute if score 211 timer_an2 matches 2 run execute positioned 1 41 -48 run playsound minecraft:block.stone.place block @a[distance=..6] 1 41 -48 1111 1

execute if score 211 timer_an2 matches 40 run fill 3 41 -50 -1 41 -46 minecraft:air replace #minecraft:wool

execute if score 211 timer_an2 matches 40 run scoreboard players reset 210 timer_an2
execute if score 211 timer_an2 matches 40 run scoreboard players reset 211 timer_an2




execute unless block -3 41 -41 minecraft:target[power=0] unless score 212 timer_an2 matches 2 run scoreboard players set 212 timer_an2 1
execute if score 212 timer_an2 matches 1 run scoreboard players add 213 timer_an2 1

execute if score 213 timer_an2 matches 2 run fill -4 41 -40 -2 41 -42 minecraft:red_wool replace air
execute if score 213 timer_an2 matches 2 run fill -5 41 -39 -1 41 -43 minecraft:white_wool replace minecraft:air
execute if score 213 timer_an2 matches 2 run execute positioned -3 41 -41 run playsound minecraft:block.stone.place block @a[distance=..6] -3 41 -41 1111 1

execute if score 213 timer_an2 matches 40 run fill -5 41 -39 -1 41 -43 minecraft:air replace #minecraft:wool

execute if score 213 timer_an2 matches 40 run scoreboard players reset 212 timer_an2
execute if score 213 timer_an2 matches 40 run scoreboard players reset 213 timer_an2




execute unless block 8 36 -49 minecraft:target[power=0] unless score 214 timer_an2 matches 2 run scoreboard players set 214 timer_an2 1
execute if score 214 timer_an2 matches 1 run scoreboard players add 215 timer_an2 1

execute if score 215 timer_an2 matches 2 run fill 7 36 -50 9 36 -48 minecraft:red_wool replace air
execute if score 215 timer_an2 matches 2 run fill 6 36 -51 10 36 -47 minecraft:white_wool replace minecraft:air
execute if score 215 timer_an2 matches 2 run execute positioned 8 36 -49 run playsound minecraft:block.stone.place block @a[distance=..6] 8 36 -49 1111 1

execute if score 215 timer_an2 matches 40 run fill 6 36 -51 10 36 -47 minecraft:air replace #minecraft:wool

execute if score 215 timer_an2 matches 40 run scoreboard players reset 214 timer_an2
execute if score 215 timer_an2 matches 40 run scoreboard players reset 215 timer_an2



execute unless block 1 36 -48 minecraft:target[power=0] unless score 216 timer_an2 matches 2 run scoreboard players set 216 timer_an2 1
execute if score 216 timer_an2 matches 1 run scoreboard players add 217 timer_an2 1

execute if score 217 timer_an2 matches 2 run fill 2 36 -47 0 36 -49 minecraft:red_wool replace air
execute if score 217 timer_an2 matches 2 run fill 3 36 -46 -1 36 -50 minecraft:white_wool replace minecraft:air
execute if score 217 timer_an2 matches 2 run execute positioned 1 36 -48 run playsound minecraft:block.stone.place block @a[distance=..6] 1 36 -48 1111 1

execute if score 217 timer_an2 matches 40 run fill 3 36 -46 -1 36 -50 minecraft:air replace #minecraft:wool

execute if score 217 timer_an2 matches 40 run scoreboard players reset 216 timer_an2
execute if score 217 timer_an2 matches 40 run scoreboard players reset 217 timer_an2




execute unless block -3 36 -41 minecraft:target[power=0] unless score 218 timer_an2 matches 2 run scoreboard players set 218 timer_an2 1
execute if score 218 timer_an2 matches 1 run scoreboard players add 219 timer_an2 1

execute if score 219 timer_an2 matches 2 run fill -2 36 -42 -4 36 -40 minecraft:red_wool replace air
execute if score 219 timer_an2 matches 2 run fill -1 36 -43 -5 36 -39 minecraft:white_wool replace minecraft:air
execute if score 219 timer_an2 matches 2 run execute positioned -3 36 -41 run playsound minecraft:block.stone.place block @a[distance=..6] -3 36 -41 1111 1

execute if score 219 timer_an2 matches 40 run fill -1 36 -43 -5 36 -39 minecraft:air replace #minecraft:wool

execute if score 219 timer_an2 matches 40 run scoreboard players reset 218 timer_an2
execute if score 219 timer_an2 matches 40 run scoreboard players reset 219 timer_an2








