scoreboard players tag @e[type=item] add DisableLobbySpectate {Item:{id:"minecraft:dye",tag:{display:{Name:"§b§lSpectator §6§o(drop to disable)"}}}}
execute @e[type=Item,tag=DisableLobbySpectate] ~ ~-1 ~ scoreboard players tag @a[r=2,c=1] remove LobbySpectate
execute @e[type=Item,tag=DisableLobbySpectate] ~ ~-1 ~ scoreboard players tag @a[r=2,c=1] add InitLobby
kill @e[type=Item,tag=DisableLobbySpectate]

scoreboard players tag @a[tag=InitLobby] add Lobby
title @a[tag=InitLobby] actionbar ["",{"text":"You are ","bold":true,"color":"aqua"},{"text":"Ready to play","bold":true,"color":"green"},{"text":". You are going to play.","bold":true,"color":"aqua"}]
replaceitem entity @a[tag=InitLobby] slot.hotbar.8 minecraft:dye 1 10 {display:{Name:"§a§lReady to play§r §6§o(drop to switch)"}}
stopsound @a[tag=InitLobby] master minecraft:entity.villager.no
execute @a[tag=InitLobby] ~ ~ ~ playsound minecraft:entity.villager.yes ambient @s
function main:scoreboard/lobby if @a[tag=InitLobby]
scoreboard players tag @a[tag=InitLobby] remove InitLobby