execute @a[tag=InitLobbySpectator] ~ ~ ~ playsound minecraft:entity.villager.no master @s[tag=Starting]
execute @a[tag=InitLobbySpectator] ~ ~ ~ scoreboard players tag @s[tag=Starting] remove InitLobbySpectator

execute @a[tag=InitLobbySpectator] ~ ~ ~ playsound minecraft:block.stone_button.click_on master @s

execute @a[tag=InitLobbySpectator] ~ ~ ~ scoreboard players tag @s[tag=LobbySpectate] add LobbySpectateRemove
replaceitem entity @a[tag=LobbySpectateRemove] slot.container.8 air
scoreboard players tag @a[tag=LobbySpectateRemove] add Lobby
function main:scoreboard/lobby if @a[tag=LobbySpectateRemove]
title @a[tag=LobbySpectateRemove] actionbar ["",{"text":"You are ","bold":true,"color":"aqua"},{"text":"not going to","bold":"true","color":"red"},{"text":" Spectate the next game.","bold":true,"color":"aqua"}]
scoreboard players tag @a[tag=LobbySpectateRemove] remove LobbySpectate
scoreboard players tag @a[tag=LobbySpectateRemove] remove InitLobbySpectator
scoreboard players tag @a[tag=LobbySpectateRemove] remove LobbySpectateRemove

scoreboard players tag @a[tag=InitLobbySpectator] add LobbySpectate
scoreboard players tag @a[tag=InitLobbySpectator] remove Lobby
scoreboard players tag @a[tag=InitLobbySpectator] remove LobbyAFK
replaceitem entity @a[tag=InitLobbySpectator] slot.container.8 air
function main:scoreboard/lobby if @a[tag=LobbySpectate]
title @a[tag=InitLobbySpectator] actionbar ["",{"text":"You are ","bold":true,"color":"aqua"},{"text":"going to","bold":"true","color":"green"},{"text":" Spectate the next game.","bold":true,"color":"aqua"}]
scoreboard players tag @a[tag=InitLobbySpectator] remove InitLobbySpectator