#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

execute as @e[tag=cauldron] at @s run tp @s ~ ~-20 ~
execute as @e[tag=option_game_villager] at @s run tp @s ~ ~-20 ~
kill @e[tag=stats]
kill @e[tag=lobbyp]
kill @e[tag=option]

summon minecraft:armor_stand 315.5 107.4 -327.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_wins"],CustomName:'{"translate":"stats.wins","bold":true,"color":"gold"}'}
summon minecraft:armor_stand 315.5 106.9 -327.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_wins","1spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.6 -327.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_wins","2spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.3 -327.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_wins","3spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.0 -327.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_wins","4spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 105.7 -327.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_wins","5spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}

summon minecraft:armor_stand 315.5 107.4 -330.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_kills"],CustomName:'{"translate":"stats.kills","bold":true,"color":"gold"}'}
summon minecraft:armor_stand 315.5 106.9 -330.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_kills","1spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.6 -330.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_kills","2spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.3 -330.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_kills","3spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.0 -330.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_kills","4spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 105.7 -330.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_kills","5spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}

summon minecraft:armor_stand 315.5 107.4 -333.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_pumpkins"],CustomName:'{"translate":"stats.pumpkins","bold":true,"color":"gold"}'}
summon minecraft:armor_stand 315.5 106.9 -333.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_pumpkins","1spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.6 -333.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_pumpkins","2spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.3 -333.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_pumpkins","3spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 106.0 -333.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_pumpkins","4spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}
summon minecraft:armor_stand 315.5 105.7 -333.0 {Marker:1,Invisible:1,NoGravity:1,CustomNameVisible:1,Tags:["stats","stats_player","stats_pumpkins","5spot"],CustomName:'{"text":"N/A","italic":"true","color":"gray"}'}

summon minecraft:armor_stand 328.5 113.61 -373.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 296.5 115.61 -363.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 312.5 104.61 -360.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 331.5 104.61 -352.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 341.5 109.61 -352.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 344.5 106.61 -342.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 336.5 104.61 -336.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 333.5 105.61 -340.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 309.5 103.61 -349.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 296.5 103.61 -337.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 294.5 115.61 -350.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 273.5 114.61 -348.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 284.5 114.61 -346.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 270.5 114.61 -337.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 271.5 115.61 -347.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 342.5 105.61 -328.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 272.5 116.61 -328.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 352.5 108.61 -318.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 339.5 108.61 -292.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 338.5 104.61 -315.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 331.5 107.61 -300.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 291.5 103.61 -306.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 296.5 102.61 -307.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 275.5 111.61 -302.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 279.5 111.61 -317.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 276.5 113.61 -315.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 270.5 115.61 -311.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 302.5 108.61 -275.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}
summon minecraft:armor_stand 286.5 108.61 -285.5 {DisabledSlots:2039552,Invisible:1,NoGravity:1,Tags:["lobbyp"],ArmorItems:[{},{},{},{id:"lime_dye",Count:1b,tag:{CustomModelData:10}}]}

function f:lobby/options/game_type/summon
execute if score $game_type main matches 0 as @e[tag=classic] at @s run function f:lobby/options/game_type/switch
execute if score $game_type main matches 1 as @e[tag=ctp] at @s run function f:lobby/options/game_type/switch
execute if score $game_type main matches 2 as @e[tag=deathmatch] at @s run function f:lobby/options/game_type/switch
execute if score $game_type main matches 3 as @e[tag=hide_and_seek] at @s run function f:lobby/options/game_type/switch

execute positioned 323.0 107.0 -345.0 run function f:lobby/options/summon_cauldron
tag @e[tag=cauldron] add cauldron1
tag @e[tag=option_text] add option_text1

execute positioned 323.0 107.0 -342.0 run function f:lobby/options/summon_cauldron
tag @e[tag=cauldron,tag=!cauldron1] add cauldron2
tag @e[tag=option_text,tag=!option_text1] add option_text2

function f:lobby/options/game_type/cauldron
