
execute as @a[scores={checkpoint=34,checkpoint_between_34=0}] at @s positioned 3 76 -45 if entity @s[distance=..4] run tag @s add return_stage_checkpoint_message
execute as @a[scores={checkpoint=34,checkpoint_between_34=0}] at @s positioned 3 76 -45 if entity @s[distance=..4] run spawnpoint @s 3 76 -45 -453.48 0
execute as @a[scores={checkpoint=34,checkpoint_between_34=0}] at @s positioned 3 76 -45 if entity @s[distance=..4] run scoreboard players set @s checkpoint_between_34 1


execute as @e[type=minecraft:arrow,nbt={inGround:1b}] at @s positioned -22 86 -42 if entity @s[distance=..2] run scoreboard players add @s arrow_kill 1
kill @e[type=minecraft:arrow,scores={arrow_kill=50..}]


execute as @a[scores={checkpoint=34}] at @s if block ~ ~-0.1 ~ minecraft:grass_block run function koncept:return_stage

execute as @a[scores={checkpoint=34}] at @s positioned -6 80 -47 if entity @a[distance=..1,tag=!34_bow1] run tag @s add 34_bow
give @a[tag=34_bow] bow[unbreakable={},custom_data={NoPickup:1b},enchantments={infinity:1}] 1
item replace entity @a[tag=34_bow] container.9 with arrow[custom_data={NoPickup:1b}] 1
tag @a[tag=34_bow] add 34_bow1
tag @a[tag=34_bow] remove 34_bow
execute if block -23 86 -42 minecraft:target[power=14] run setblock -23 84 -42 minecraft:redstone_lamp[lit=true]
execute if block -23 86 -42 minecraft:target[power=0] run setblock -23 84 -42 minecraft:redstone_lamp[lit=false]

execute if block -23 86 -42 minecraft:target[power=0] run fill -1 79 -47 -1 79 -45 minecraft:polished_andesite_slab[type=top,waterlogged=false]
execute if block -23 86 -42 minecraft:target[power=0] run fill -1 80 -47 -1 80 -45 minecraft:iron_bars[east=false,north=true,south=false,waterlogged=false,west=false]
execute if block -23 86 -42 minecraft:target[power=0] run fill -1 81 -47 -1 81 -45 minecraft:polished_andesite_slab[type=bottom,waterlogged=false]

execute if block -23 86 -42 minecraft:target[power=14] run scoreboard players add 93 timer_an 1
execute if score 93 timer_an matches 1.. run scoreboard players add 94 timer_an 1
execute if score 94 timer_an matches 20 run execute positioned -23 86 -42 run kill @e[type=minecraft:arrow,distance=..2]
execute if score 94 timer_an matches 20.. run setblock -23 84 -42 minecraft:redstone_lamp[lit=true]
execute if score 94 timer_an matches 20.. run fill -1 79 -45 -1 81 -47 minecraft:air
execute if score 94 timer_an matches 150.. run scoreboard players reset 93 timer_an
execute if score 94 timer_an matches 150.. run scoreboard players reset 94 timer_an

execute as @a[scores={checkpoint=34}] at @s positioned 3 78 -45 if entity @s[distance=..5] run clear @s minecraft:bow
execute as @a[scores={checkpoint=34}] at @s positioned 3 78 -45 if entity @s[distance=..5] run clear @s minecraft:arrow
execute as @a[scores={checkpoint=34}] at @s positioned 3 78 -45 if entity @s[distance=..5] run tag @s remove 34_bow1

execute as @a[tag=!34_levl_heve] at @s run execute positioned 10 76 -51 if entity @a[distance=..5,tag=!34_levl_heve] run tp @s 2.37 77.00 -43.98 605.66 16.72

#70 71 72 73

execute positioned 5 77 -45 if entity @a[tag=34_levl_heve,distance=..3] unless score 70 timer_an matches 2 run scoreboard players set 70 timer_an 1
execute if score 70 timer_an matches 1 run scoreboard players add 71 timer_an 1

execute if score 71 timer_an matches 5 run fill 7 75 -49 6 75 -50 minecraft:oak_leaves
execute if score 71 timer_an matches 5 run execute positioned 10 75 -48 run playsound minecraft:block.stone.place block @a[distance=..10] 10 75 -48 1111 1

execute if score 71 timer_an matches 25 run fill 9 75 -51 10 75 -52 minecraft:oak_leaves
execute if score 71 timer_an matches 25 run execute positioned 10 75 -48 run playsound minecraft:block.stone.place block @a[distance=..10] 10 75 -48 1111 1

execute if score 71 timer_an matches 45 run fill 13 75 -51 14 75 -50 minecraft:oak_leaves
execute if score 71 timer_an matches 45 run execute positioned 10 75 -48 run playsound minecraft:block.stone.place block @a[distance=..10] 10 75 -48 1111 1

execute if score 71 timer_an matches 65 run fill 12 74 -47 13 74 -46 minecraft:oak_leaves
execute if score 71 timer_an matches 65 run execute positioned 10 75 -48 run playsound minecraft:block.stone.place block @a[distance=..10] 10 75 -48 1111 1


execute if score 71 timer_an matches 70 run scoreboard players set 70 timer_an 2

execute if score 70 timer_an matches 2 run execute positioned 4 77 -46 unless entity @a[tag=34_levl_heve,distance=..3] run scoreboard players set 72 timer_an 1

execute if score 72 timer_an matches 1.. run scoreboard players add 73 timer_an 1

execute if score 73 timer_an matches 25 run fill 7 75 -49 6 75 -50 minecraft:air
execute if score 73 timer_an matches 25 run execute positioned 10 75 -48 run playsound minecraft:block.stone.place block @a[distance=..10] 10 75 -48 1111 1

execute if score 73 timer_an matches 35 run fill 9 75 -51 10 75 -52 minecraft:air
execute if score 73 timer_an matches 35 run execute positioned 10 75 -48 run playsound minecraft:block.stone.place block @a[distance=..10] 10 75 -48 1111 1

execute if score 73 timer_an matches 45 run fill 13 75 -51 14 75 -50 minecraft:air
execute if score 73 timer_an matches 45 run execute positioned 10 75 -48 run playsound minecraft:block.stone.place block @a[distance=..10] 10 75 -48 1111 1

execute if score 73 timer_an matches 65 run fill 12 74 -47 13 74 -46 minecraft:air
execute if score 73 timer_an matches 65 run execute positioned 10 75 -48 run playsound minecraft:block.stone.place block @a[distance=..10] 10 75 -48 1111 1

execute if score 73 timer_an matches 70 run scoreboard players reset 70 timer_an
execute if score 73 timer_an matches 70 run scoreboard players reset 71 timer_an
execute if score 73 timer_an matches 70 run scoreboard players reset 72 timer_an
execute if score 73 timer_an matches 70 run scoreboard players reset 73 timer_an








execute positioned 2 73 -35 if entity @a[distance=..1.5,tag=34_levl_heve] run fill 2 73 -35 2 74 -35 minecraft:air
execute positioned 2 73 -35 unless entity @a[distance=..1.5,tag=34_levl_heve] run fill 2 74 -35 2 73 -35 minecraft:stone_bricks

execute positioned 4 73 -41 if entity @a[distance=..1.5,tag=34_levl_heve] run fill 4 73 -41 4 74 -41 minecraft:air
execute positioned 4 73 -41 unless entity @a[distance=..1.5,tag=34_levl_heve] run fill 4 73 -41 4 74 -41 minecraft:stone_bricks

execute as @a[tag=!34_levl_heve] at @s run execute positioned 3 73 -35 if entity @a[distance=..1,tag=!34_levl_heve] run tp @s -0.55 69.00 -44.62 -8639.16 3.48

execute as @a[scores={checkpoint=34}] at @s run execute positioned -1 74 -35 if entity @s[distance=..2] run tag @s add 34_levl

execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s 34_9
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s 34_8
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s 34_7
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s 34_6
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s 34_5
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s 34_4
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s 34_3
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s 34_2
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s timer_an
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run scoreboard players reset @s timer_an1
execute as @a[scores={checkpoint=34}] at @s run execute as @s[tag=34_levl] at @s run execute positioned -1 74 -35 unless entity @a[distance=..4] run tag @s remove 34_levl

execute as @a[scores={checkpoint=34}] at @s run scoreboard players add @s[tag=34_levl] timer_an 1

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an matches 1 run scoreboard players set @s timer_an1 1

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an matches 1 run tellraw @s ["",{"text":"Click on the answers[] in the chat room, selecting the correct characters\n"},{"text":"The first character is:\n"},{"text":"[→]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↓]",click_event:{action:'run_command',command:"/trigger 34_2"}},{"text":" "},{"text":"[↑]",click_event:{action:'run_command',command:"/trigger 34_1"}}]

scoreboard players enable @a[tag=34_levl] code_34_tp
scoreboard players enable @a[tag=34_levl] 34_1
scoreboard players enable @a[tag=34_levl] 34_2
scoreboard players enable @a[tag=34_levl] 34_3
scoreboard players enable @a[tag=34_levl] 34_4
scoreboard players enable @a[tag=34_levl] 34_5
scoreboard players enable @a[tag=34_levl] 34_6
scoreboard players enable @a[tag=34_levl] 34_7
scoreboard players enable @a[tag=34_levl] 34_8
scoreboard players enable @a[tag=34_levl] 34_9


execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 1 if score @s 34_2 matches 1.. run tellraw @s ["",{"text":"The second character is:\n"},{"text":"[→]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↓]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↑]",click_event:{action:'run_command',command:"/trigger 34_3"}}]

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 1 if score @s 34_2 matches 1.. run scoreboard players add @s timer_an1 1


execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 2 if score @s 34_3 matches 1.. run tellraw @s ["",{"text":"The third character is:\n"},{"text":"[→]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↓]",click_event:{action:'run_command',command:"/trigger 34_5"}},{"text":" "},{"text":"[↑]",click_event:{action:'run_command',command:"/trigger 34_1"}}]
execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 2 if score @s 34_3 matches 1.. run scoreboard players add @s timer_an1 1

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 3 if score @s 34_5 matches 1.. run tellraw @s ["",{"text":"The fourth character is:\n"},{"text":"[→]",click_event:{action:'run_command',command:"/trigger 34_6"}},{"text":" "},{"text":"[↓]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↑]",click_event:{action:'run_command',command:"/trigger 34_1"}}]
execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 3 if score @s 34_5 matches 1.. run scoreboard players add @s timer_an1 1


execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 4 if score @s 34_6 matches 1.. run tellraw @s ["",{"text":"The fifth character is:\n"},{"text":"[→]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↓]",click_event:{action:'run_command',command:"/trigger 34_7"}},{"text":" "},{"text":"[↑]",click_event:{action:'run_command',command:"/trigger 34_1"}}]
execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 4 if score @s 34_6 matches 1.. run scoreboard players add @s timer_an1 1

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 5 if score @s 34_7 matches 1.. run tellraw @s ["",{"text":"The sixth character is:\n"},{"text":"[→]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↓]",click_event:{action:'run_command',command:"/trigger 34_8"}},{"text":" "},{"text":"[↑]",click_event:{action:'run_command',command:"/trigger 34_1"}}]
execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 5 if score @s 34_7 matches 1.. run scoreboard players add @s timer_an1 1

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 6 if score @s 34_8 matches 1.. run tellraw @s ["",{"text":"The seventh character is:\n"},{"text":"[→]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↓]",click_event:{action:'run_command',command:"/trigger 34_1"}},{"text":" "},{"text":"[↑]",click_event:{action:'run_command',command:"/trigger 34_9"}}]
execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 6 if score @s 34_8 matches 1.. run scoreboard players add @s timer_an1 1

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 7 if score @s 34_9 matches 1.. run tellraw @s ["",{"text":"Excellent! Your memory has been successfully checked. You can go now."}]

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 7 if score @s 34_9 matches 1.. run tag @s add 34_levl_heve

execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] timer_an1 matches 7 if score @s 34_9 matches 1.. run scoreboard players add @s timer_an1 1



execute as @a[scores={checkpoint=34}] at @s run execute if score @s[tag=34_levl] 34_1 matches 1.. run function koncept:level/34.0
execute as @a[scores={checkpoint=34}] at @s run execute if score @s code_34_tp matches 1.. run function koncept:level/34.1
