

execute as @a[scores={checkpoint=50}] at @s positioned 14 50 -45 if entity @s[distance=..0.5] run schedule function koncept:teleport9 5t append
execute as @a[scores={checkpoint=50}] at @s positioned 14 50 -45 if entity @s[distance=..0.5] run tp @s 25.50 10.20 3.51 91.72 28.91
execute as @a[scores={checkpoint=50}] at @s positioned 15 50 -45 if entity @s[distance=..0.5] run schedule function koncept:teleport9 5t append
execute as @a[scores={checkpoint=50}] at @s positioned 15 50 -45 if entity @s[distance=..0.5] run tp @s 25.50 10.20 3.51 91.72 28.91

execute as @a[scores={checkpoint=50,checkpoint_between_50=0}] at @s positioned 16 49 -34 if entity @s[distance=..2] run tag @s add return_stage_checkpoint_message
execute as @a[scores={checkpoint=50,checkpoint_between_50=0}] at @s positioned 16 49 -34 if entity @s[distance=..2] run spawnpoint @s 16 50 -33 180 0
execute as @a[scores={checkpoint=50,checkpoint_between_50=0}] at @s positioned 16 49 -34 if entity @s[distance=..2] run scoreboard players set @s checkpoint_between_50 1

execute as @a[scores={checkpoint=50}] at @s run execute at @s[tag=45levl_lava1] if block ~ ~-0.5 ~ waxed_oxidized_copper run kill @s
#tag @s[scores={kill45=1}] remove damage4
execute as @a[scores={checkpoint=50}] at @s run tag @s[tag=damage4,scores={deathCount=1..}] remove damage4
scoreboard players reset @a[scores={deathCount=1..}] deathCount


execute as @a[scores={checkpoint=50}] at @s run execute positioned 16 51 -34 if entity @s[distance=..1] run tag @s remove 45levl_lava1
execute as @a[scores={checkpoint=50}] at @s run execute positioned 16 51 -34 if entity @s[distance=..1] run tag @s remove 45levl_lava

execute as @a[scores={checkpoint=50}] at @s run execute positioned 14 46 -44 if entity @s[distance=..2] as @s run scoreboard players set @s checkpoint_between_50 0
execute as @a[scores={checkpoint=50}] at @s run execute positioned 14 46 -44 if entity @s[distance=..2] as @s run effect give @s minecraft:regeneration 1 10 true
execute as @a[scores={checkpoint=50}] at @s run execute positioned 14 46 -44 if entity @s[distance=..2] as @s run attribute @s minecraft:max_health base set 20
execute as @a[scores={checkpoint=50}] at @s run execute positioned 14 46 -44 if entity @s[distance=..2] as @s run spawnpoint @s 14 45 -45
execute as @a[scores={checkpoint=50}] at @s run execute positioned 14 46 -44 if entity @s[distance=..2] run tag @s remove 45levl_lava1
execute as @a[scores={checkpoint=50}] at @s run execute positioned 14 46 -44 if entity @s[distance=..2] run tag @s remove 45levl_lava
execute as @a[scores={checkpoint=50}] at @s run execute positioned 16 42 -43 if entity @s[distance=..1] run tag @s add 45levl_lava
execute as @a[scores={checkpoint=50}] at @s run clear @a[scores={checkpoint=50}] minecraft:arrow
execute as @a[scores={checkpoint=50}] at @s run clear @a[scores={checkpoint=50}] minecraft:tipped_arrow
execute as @a[scores={checkpoint=50}] at @s run execute positioned 17 51 -34 if entity @s[tag=!damage4,distance=..2] run tag @s add damage
execute as @a[scores={checkpoint=50}] at @s run execute positioned 17 51 -34 if entity @s[distance=..2] run tag @s add damage4
execute as @a[scores={checkpoint=50}] at @s run execute positioned 17 51 -34 run effect give @a[tag=!damage4,distance=..2] minecraft:slowness 1 33 true
execute as @a[scores={checkpoint=50}] at @s run execute positioned 17 51 -34 if entity @s[distance=..2] run attribute @s minecraft:max_health base set 1
execute as @a[scores={checkpoint=50}] at @s run execute positioned 17 51 -34 if entity @s[distance=..2] run tag @s add 45levl_lava1
execute as @a[scores={checkpoint=50}] at @s run execute positioned 17 51 -34 if entity @s[distance=..2] run spawnpoint @s 16 50 -33 180 0

#310 311

execute as @a[scores={checkpoint=50}] at @s run execute if entity @s[tag=45levl_lava] unless score 310 timer_an matches 2 run scoreboard players set 310 timer_an 1
execute unless entity @a[tag=45levl_lava] run execute if score 310 timer_an matches 1 run function koncept:level/50.1
execute unless entity @a[tag=45levl_lava] run execute if score 310 timer_an matches 2.. run scoreboard players add 311 timer_an 9
execute if score 310 timer_an matches 1.. run scoreboard players add 311 timer_an 1

execute if score 311 timer_an matches 150 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 150 run fill 12 40 -24 24 40 -42 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 300 run fill 12 41 -24 24 41 -42 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 300 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 300 run setblock 16 44 -43 minecraft:warped_trapdoor[facing=south,half=top,open=false,powered=false,waterlogged=false]
execute if score 311 timer_an matches 300 run fill 16 45 -43 16 48 -43 minecraft:barrier
execute if score 311 timer_an matches 500 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 500 run fill 12 42 -24 24 42 -43 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 610 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 610 run fill 12 43 -24 24 43 -43 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 680 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 680 run fill 12 44 -24 24 44 -42 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 700 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 700 run fill 24 45 -42 11 45 -31 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 720 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 720 run fill 18 46 -41 11 45 -31 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 750 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 750 run fill 24 47 -42 4 47 -31 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 790 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 790 run fill 24 48 -42 4 48 -31 minecraft:lava replace minecraft:light[level=15,waterlogged=false]
execute if score 311 timer_an matches 850 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 850 run fill 24 49 -42 4 49 -31 minecraft:lava replace minecraft:light[level=15,waterlogged=false]


execute if score 311 timer_an matches 1000 run fill 24 49 -42 4 49 -31 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1050 run fill 24 48 -42 4 48 -31 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1100 run fill 24 47 -42 4 47 -31 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1150 run fill 24 46 -42 4 46 -31 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1200 run fill 24 45 -42 11 45 -31 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1250 run fill 12 44 -24 24 44 -42 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1300 run fill 12 43 -24 24 43 -43 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1350 run fill 12 42 -24 24 42 -43 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1400 run fill 12 41 -24 24 41 -42 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1450 run fill 12 40 -24 24 40 -42 minecraft:light[level=15,waterlogged=false] replace minecraft:lava
execute if score 311 timer_an matches 1000 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1050 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1100 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1150 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1200 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1250 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1300 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1350 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1400 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1
execute if score 311 timer_an matches 1450 run execute positioned 16 45 -36 run playsound minecraft:block.lava.pop block @a[distance=..15] 16 45 -36 1111 1

execute if score 311 timer_an matches 1450.. run setblock 16 44 -43 minecraft:warped_trapdoor[facing=south,half=top,open=true,powered=false,waterlogged=false]
execute if score 311 timer_an matches 1450.. run fill 16 45 -43 16 48 -43 minecraft:air
execute if score 311 timer_an matches 1450.. run scoreboard players reset 310 timer_an
execute if score 311 timer_an matches 1450.. run scoreboard players reset 311 timer_an



execute if block 17 50 -44 minecraft:tripwire_hook[attached=true,facing=west,powered=true] run setblock 14 49 -44 minecraft:warped_trapdoor[facing=east,half=top,open=true,powered=false,waterlogged=false]
execute if block 17 50 -44 minecraft:tripwire_hook[attached=true,facing=west,powered=true] run setblock 14 49 -43 minecraft:warped_trapdoor[facing=east,half=top,open=true,powered=false,waterlogged=false]
execute if block 17 50 -44 minecraft:tripwire_hook[attached=true,facing=west,powered=true] run setblock 15 49 -44 minecraft:warped_trapdoor[facing=west,half=top,open=true,powered=false,waterlogged=false]
execute if block 17 50 -44 minecraft:tripwire_hook[attached=true,facing=west,powered=true] run setblock 15 49 -43 minecraft:warped_trapdoor[facing=west,half=top,open=true,powered=false,waterlogged=false]

execute unless block 17 50 -44 minecraft:tripwire_hook[attached=true,facing=west,powered=true] if block 15 49 -43 minecraft:warped_trapdoor[facing=west,half=top,open=true,powered=false,waterlogged=false] run setblock 15 49 -44 minecraft:warped_trapdoor[facing=west,half=top,open=false,powered=false,waterlogged=false]
execute unless block 17 50 -44 minecraft:tripwire_hook[attached=true,facing=west,powered=true] if block 15 49 -43 minecraft:warped_trapdoor[facing=west,half=top,open=true,powered=false,waterlogged=false] run setblock 14 49 -43 minecraft:warped_trapdoor[facing=east,half=top,open=false,powered=false,waterlogged=false]
execute unless block 17 50 -44 minecraft:tripwire_hook[attached=true,facing=west,powered=true] if block 15 49 -43 minecraft:warped_trapdoor[facing=west,half=top,open=true,powered=false,waterlogged=false] run setblock 14 49 -44 minecraft:warped_trapdoor[facing=east,half=top,open=false,powered=false,waterlogged=false]
execute unless block 17 50 -44 minecraft:tripwire_hook[attached=true,facing=west,powered=true] if block 15 49 -43 minecraft:warped_trapdoor[facing=west,half=top,open=true,powered=false,waterlogged=false] run setblock 15 49 -43 minecraft:warped_trapdoor[facing=west,half=top,open=false,powered=false,waterlogged=false]


execute positioned 16 51 -38 if entity @a[distance=..2] unless score 307 timer_an2 matches 2 run scoreboard players set 307 timer_an2 1
execute if score 307 timer_an2 matches 1 run scoreboard players add 308 timer_an2 1

execute if score 308 timer_an2 matches 2 run execute positioned 11 51 -38 run kill @e[distance=..2,type=minecraft:arrow,nbt={inGround:1b}]
execute if score 308 timer_an2 matches 2 run setblock 18 53 -38 minecraft:observer[facing=up,powered=false]
execute if score 308 timer_an2 matches 2 run setblock 18 51 -38 minecraft:dispenser[facing=west,triggered=false]{Items:[{Count:1b,Slot:4b,id:"minecraft:tipped_arrow",tag:{Potion:"minecraft:long_weakness"}}]}
execute if score 308 timer_an2 matches 10 run setblock 18 51 -38 minecraft:dropper[facing=west,triggered=false]{Items:[]}

execute if score 308 timer_an2 matches 20 run execute positioned 17 51 -40 run kill @e[distance=..2,type=minecraft:arrow,nbt={inGround:1b}]
execute if score 308 timer_an2 matches 20 run setblock 11 51 -41 minecraft:observer[facing=north,powered=false]
execute if score 308 timer_an2 matches 20 run setblock 11 51 -40 minecraft:dispenser[facing=east,triggered=false]{Items:[{Count:1b,Slot:4b,id:"minecraft:arrow"}]}
execute if score 308 timer_an2 matches 28 run setblock 11 51 -40 minecraft:dropper[facing=east,triggered=false]{Items:[]}

execute if score 308 timer_an2 matches 30 run scoreboard players reset 307 timer_an2
execute if score 308 timer_an2 matches 30 run scoreboard players reset 308 timer_an2





execute positioned 21 43 -32 if entity @a[distance=..1] unless score 300 timer_an2 matches 2 run scoreboard players set 300 timer_an2 1
execute if score 300 timer_an2 matches 1 run scoreboard players add 301 timer_an2 1

execute if score 301 timer_an2 matches 2 run execute positioned 22 43 -31 run kill @e[distance=..2,type=minecraft:arrow,nbt={inGround:1b}]
execute if score 301 timer_an2 matches 2 run setblock 19 45 -31 minecraft:observer[facing=up,powered=false]
execute if score 301 timer_an2 matches 2 run setblock 19 43 -31 minecraft:dispenser[facing=east,triggered=false]{Items:[{Count:1b,Slot:4b,id:"minecraft:tipped_arrow",tag:{Potion:"minecraft:slowness"}}]}
execute if score 301 timer_an2 matches 10 run setblock 19 43 -31 minecraft:dropper[facing=east,triggered=false]{Items:[]}

execute if score 301 timer_an2 matches 20 run scoreboard players reset 300 timer_an2
execute if score 301 timer_an2 matches 20 run scoreboard players reset 301 timer_an2



execute positioned 13 42 -29 if entity @a[distance=..2] unless score 303 timer_an2 matches 2 run scoreboard players set 303 timer_an2 1
execute if score 303 timer_an2 matches 1 run scoreboard players add 304 timer_an2 1

execute if score 304 timer_an2 matches 2 run execute positioned 13 42 -26 run kill @e[distance=..2,type=minecraft:arrow,nbt={inGround:1b}]
execute if score 304 timer_an2 matches 2 run setblock 11 42 -32 minecraft:observer[facing=west,powered=false]
execute if score 304 timer_an2 matches 2 run setblock 13 42 -32 minecraft:dispenser[facing=south,triggered=false]{Items:[{Count:1b,Slot:4b,id:"minecraft:arrow"}]}
execute if score 304 timer_an2 matches 10 run setblock 13 42 -32 minecraft:dropper[facing=south,triggered=false]{Items:[]}

execute if score 304 timer_an2 matches 20 run scoreboard players reset 303 timer_an2
execute if score 304 timer_an2 matches 20 run scoreboard players reset 304 timer_an2


execute positioned 9 51 -33 if entity @a[distance=..3] unless score 305 timer_an2 matches 2 run scoreboard players set 305 timer_an2 1
execute if score 305 timer_an2 matches 1 run scoreboard players add 306 timer_an2 1

execute if score 306 timer_an2 matches 2 run execute positioned 10 52 -35 run kill @e[distance=..2,type=minecraft:arrow,nbt={inGround:1b}]
execute if score 306 timer_an2 matches 2 run setblock 10 52 -29 minecraft:observer[facing=south,powered=false]
execute if score 306 timer_an2 matches 2 run setblock 10 52 -30 minecraft:dispenser[facing=north,triggered=false]{Items:[{Count:1b,Slot:4b,id:"minecraft:arrow"}]}
execute if score 306 timer_an2 matches 10 run setblock 10 52 -30 minecraft:dropper[facing=north,triggered=false]{Items:[]}

execute if score 306 timer_an2 matches 20 run scoreboard players reset 305 timer_an2
execute if score 306 timer_an2 matches 20 run scoreboard players reset 306 timer_an2

scoreboard players reset @a[scores={checkpoint=50}] kill45