function button:level/emptyinv
team join nameTag @s
gamemode adventure @a

#Level 1
execute if score levelSel levelSelect matches 1 run tp @s 18.50 51.00 99.50 35.53 -0.00
	execute if score levelSel levelSelect matches 1 run title @s actionbar {"text":"Level 1: The Plains","bold":true,"color":"green"}
	execute if score levelSel levelSelect matches 1 run scoreboard players set @s level 1
	execute if score levelSel levelSelect matches 1 run item replace entity @s container.4 with oak_button{RepairCost:40,display:{Name:'[{"text":"Oak Button","italic":false}]',Lore:['[{"text":"You must find an ","italic":false,"color":"gray"},{"text":"Oak Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 2
execute if score levelSel levelSelect matches 2 run tp @s 6.51 49.00 102.62 181.18 1.20
	execute if score levelSel levelSelect matches 2 run title @s actionbar {"text":"Level 2: Marshlands","bold":true,"color":"dark_green"}
	execute if score levelSel levelSelect matches 2 run scoreboard players set @s level 2
	execute if score levelSel levelSelect matches 2 run item replace entity @s container.4 with spruce_button{RepairCost:40,display:{Name:'[{"text":"Spruce Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Spruce Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 3
execute if score levelSel levelSelect matches 3 run tp @s -5.48 49.00 105.50 -919.41 1.50
	execute if score levelSel levelSelect matches 3 run title @s actionbar {"text":"Level 3: The Igloo","bold":true,"color":"aqua"}
	execute if score levelSel levelSelect matches 3 run scoreboard players set @s level 3
	execute if score levelSel levelSelect matches 3 run item replace entity @s container.4 with stone_button{RepairCost:40,display:{Name:'[{"text":"Stone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Stone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 4
execute if score levelSel levelSelect matches 4 run tp @s -20.34 52.00 105.51 -1234.44 12.77
	execute if score levelSel levelSelect matches 4 run title @s actionbar {"text":"Level 4: The Savannah","bold":true,"color":"gold"}
	execute if score levelSel levelSelect matches 4 run scoreboard players set @s level 4
	execute if score levelSel levelSelect matches 4 run item replace entity @s container.4 with oak_button{RepairCost:40,display:{Name:'[{"text":"Oak Button","italic":false}]',Lore:['[{"text":"You must find an ","italic":false,"color":"gray"},{"text":"Oak Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 5
execute if score levelSel levelSelect matches 5 run tp @s -33.63 49.00 101.46 -803.61 0.30
	execute if score levelSel levelSelect matches 5 run title @s actionbar {"text":"Level 5: The Nether Bridge","bold":true,"color":"red"}
	execute if score levelSel levelSelect matches 5 run scoreboard players set @s level 5
	execute if score levelSel levelSelect matches 5 run item replace entity @s container.4 with polished_blackstone_button{RepairCost:40,display:{Name:'[{"text":"Polished Blackstone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Polished Blackstone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 6
execute if score levelSel levelSelect matches 6 run tp @s -38.52 51.00 105.49 111.83 0.90
	execute if score levelSel levelSelect matches 6 run title @s actionbar {"text":"Level 6: The Cave","bold":true,"color":"white"}
	execute if score levelSel levelSelect matches 6 run scoreboard players set @s level 6
	execute if score levelSel levelSelect matches 6 run item replace entity @s container.4 with stone_button{RepairCost:40,display:{Name:'[{"text":"Stone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Stone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 7
execute if score levelSel levelSelect matches 7 run tp @s -52.47 49.00 102.51 -229.80 0.25
	execute if score levelSel levelSelect matches 7 run title @s actionbar {"text":"Level 7: Mush-Room","bold":true,"color":"light_purple"}
	execute if score levelSel levelSelect matches 7 run scoreboard players set @s level 7
	execute if score levelSel levelSelect matches 7 run item replace entity @s container.4 with polished_blackstone_button{RepairCost:40,display:{Name:'[{"text":"Polished Blackstone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Polished Blackstone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 8
execute if score levelSel levelSelect matches 8 run tp @s -67.52 49.00 102.52 270.45 1.50
	execute if score levelSel levelSelect matches 8 run title @s actionbar {"text":"Level 8: Amethyst Geode","bold":true,"color":"dark_purple"}
	execute if score levelSel levelSelect matches 8 run scoreboard players set @s level 8
	execute if score levelSel levelSelect matches 8 run item replace entity @s container.4 with polished_blackstone_button{RepairCost:40,display:{Name:'[{"text":"Polished Blackstone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Polished Blackstone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 9
execute if score levelSel levelSelect matches 9 run tp @s -80.62 50.06 98.52 -46.20 9.45
	execute if score levelSel levelSelect matches 9 run title @s actionbar {"text":"Level 9: Jungle Excalibur","bold":true,"color":"green"}
	execute if score levelSel levelSelect matches 9 run scoreboard players set @s level 9
	execute if score levelSel levelSelect matches 9 run item replace entity @s container.4 with warped_button{RepairCost:40,display:{Name:'[{"text":"Warped Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Warped Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 10
execute if score levelSel levelSelect matches 10 run tp @s -90.03 48.00 104.51 0.13 -0.28
	execute if score levelSel levelSelect matches 10 run title @s actionbar {"text":"Level 10: Forges Hollow","bold":true,"color":"gray"}
	execute if score levelSel levelSelect matches 10 run scoreboard players set @s level 10
	execute if score levelSel levelSelect matches 10 run item replace entity @s container.4 with crimson_button{RepairCost:40,RepairCost:40,display:{Name:'[{"text":"Crimson Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Crimson Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 11
execute if score levelSel levelSelect matches 11 run tp @s -62.29 48.00 110.55 60 0
	execute if score levelSel levelSelect matches 11 run title @s actionbar {"text":"Level 11: Ocean Floor","bold":true,"color":"blue"}
	execute if score levelSel levelSelect matches 11 run scoreboard players set @s level 11
	execute if score levelSel levelSelect matches 11 run item replace entity @s container.4 with birch_button{RepairCost:40,RepairCost:40,display:{Name:'[{"text":"Birch Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Birch Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 12
execute if score levelSel levelSelect matches 12 run tp @s -57.47 50.00 110.55 310.60 13.80
	execute if score levelSel levelSelect matches 12 run title @s actionbar {"text":"Level 12: Sandy Tombs","bold":true,"color":"gold"}
	execute if score levelSel levelSelect matches 12 run scoreboard players set @s level 12
	execute if score levelSel levelSelect matches 12 run item replace entity @s container.4 with oak_button{RepairCost:40,display:{Name:'[{"text":"Oak Button","italic":false}]',Lore:['[{"text":"You must find an ","italic":false,"color":"gray"},{"text":"Oak Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 13
execute if score levelSel levelSelect matches 13 run tp @s -14.30 50.00 114.41 89.84 -0.30
	execute if score levelSel levelSelect matches 13 run title @s actionbar {"text":"Level 13: Urban Alley","bold":true,"color":"gray"}
	execute if score levelSel levelSelect matches 13 run scoreboard players set @s level 13
	execute if score levelSel levelSelect matches 13 run item replace entity @s container.4 with polished_blackstone_button{RepairCost:40,display:{Name:'[{"text":"Polished Blackstone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Polished Blackstone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 14
execute if score levelSel levelSelect matches 14 run tp @s 21.41 50.00 117.47 72.38 1.67
	execute if score levelSel levelSelect matches 14 run title @s actionbar {"text":"Level 14: Stranded Beach","bold":true,"color":"aqua"}
	execute if score levelSel levelSelect matches 14 run scoreboard players set @s level 14
	execute if score levelSel levelSelect matches 14 run item replace entity @s container.4 with birch_button{RepairCost:40,display:{Name:'[{"text":"Birch Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Birch Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 15
execute if score levelSel levelSelect matches 15 run tp @s -5.36 48.00 127.41 1530.06 -0.30
	execute if score levelSel levelSelect matches 15 run title @s actionbar {"text":"Level 15: Abandoned Lush Mineshaft","bold":true,"color":"green"}
	execute if score levelSel levelSelect matches 15 run scoreboard players set @s level 15
	execute if score levelSel levelSelect matches 15 run item replace entity @s container.4 with dark_oak_button{RepairCost:40,display:{Name:'[{"text":"Dark Oak Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Dark Oak Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

#Level 16
execute if score levelSel levelSelect matches 16 run tp @s -49.55 49.00 127.56 260.23 -4.80
	execute if score levelSel levelSelect matches 16 run title @s actionbar {"text":"Level 16: Soulsand Pass","bold":true,"color":"red"}
	execute if score levelSel levelSelect matches 16 run scoreboard players set @s level 16
	execute if score levelSel levelSelect matches 16 run item replace entity @s container.4 with polished_blackstone_button{RepairCost:40,display:{Name:'[{"text":"Polished Blackstone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Polished Blackstone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

execute if score levelSel levelSelect matches 17 run tp @s -66.46 48.00 131.55 7020.10 1.05
	execute if score levelSel levelSelect matches 17 run title @s actionbar {"text":"Level 17: Castle Keep","bold":true,"color":"gray"}
	execute if score levelSel levelSelect matches 17 run scoreboard players set @s level 17
	execute if score levelSel levelSelect matches 17 run item replace entity @s container.4 with spruce_button{RepairCost:40,display:{Name:'[{"text":"Spruce Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Spruce Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

execute if score levelSel levelSelect matches 18 run tp @s -90.46 53.06 125.52 810.45 0.16
	execute if score levelSel levelSelect matches 18 run title @s actionbar {"text":"Level 18: Brewery","bold":true,"color":"dark_purple"}
	execute if score levelSel levelSelect matches 18 run scoreboard players set @s level 18
	execute if score levelSel levelSelect matches 18 run item replace entity @s container.4 with warped_button{RepairCost:40,display:{Name:'[{"text":"Warped Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Warped Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

execute if score levelSel levelSelect matches 19 run tp @s 11.47 46.00 138.31 0.20 0.45
	execute if score levelSel levelSelect matches 19 run title @s actionbar {"text":"Level 19: The Witch Hut","bold":true,"color":"light_purple"}
	execute if score levelSel levelSelect matches 19 run scoreboard players set @s level 19
	execute if score levelSel levelSelect matches 19 run item replace entity @p[x=11.47,y=46.00,z=138.31,distance=..1] container.4 with polished_blackstone_button{RepairCost:40,display:{Name:'[{"text":"Polished Blackstone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Polished Blackstone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1

execute if score levelSel levelSelect matches 20 run tp @s -37.46 48.00 154.50 270.15 -0.60
	execute if score levelSel levelSelect matches 20 run title @s actionbar {"text":"Level 20: The End","bold":true,"color":"light_purple"}
	execute if score levelSel levelSelect matches 20 run scoreboard players set @s level 20
	execute if score levelSel levelSelect matches 20 run item replace entity @s container.4 with polished_blackstone_button{RepairCost:40,display:{Name:'[{"text":"Polished Blackstone Button","italic":false}]',Lore:['[{"text":"You must find a ","italic":false,"color":"gray"},{"text":"Polished Blackstone Button","underlined":true},{"text":" to progress","underlined":false}]']}} 1


