#=========== First ===========#
scoreboard players operation SnowballLeaders LobbyTouched > @a[score_LobbyTouched_min=1] LobbyTouched
scoreboard players operation @a[score_LobbyTouched_min=1] LobbyTouched -= SnowballLeaders LobbyTouched
scoreboard players tag @a[score_LobbyTouched_min=0,score_LobbyTouched=0,c=1] add FirstSnowball
scoreboard players operation @a[score_LobbyTouched_min=-100000000] LobbyTouched += SnowballLeaders LobbyTouched
scoreboard players reset SnowballLeaders LobbyTouched
#=========== Second ===========#
scoreboard players operation SnowballLeaders LobbyTouched > @a[score_LobbyTouched_min=1,tag=!FirstSnowball] LobbyTouched
scoreboard players operation @a[score_LobbyTouched_min=1,tag=!FirstSnowball] LobbyTouched -= SnowballLeaders LobbyTouched
scoreboard players tag @a[score_LobbyTouched_min=0,score_LobbyTouched=0,c=1] add SecondSnowball
scoreboard players operation @a[score_LobbyTouched_min=-100000000,tag=!FirstSnowball] LobbyTouched += SnowballLeaders LobbyTouched
scoreboard players reset SnowballLeaders LobbyTouched
#=========== Third ===========#
execute @a[score_LobbyTouched_min=1,tag=!FirstSnowball] ~ ~ ~ scoreboard players operation SnowballLeaders LobbyTouched > @s[score_LobbyTouched_min=1,tag=!SecondSnowball] LobbyTouched
execute @a[score_LobbyTouched_min=1,tag=!FirstSnowball] ~ ~ ~ scoreboard players operation @s[score_LobbyTouched_min=1,tag=!SecondSnowball] LobbyTouched -= SnowballLeaders LobbyTouched
scoreboard players tag @a[score_LobbyTouched_min=0,score_LobbyTouched=0,c=1] add ThirdSnowball
execute @a[score_LobbyTouched_min=-100000000,tag=!FirstSnowball] ~ ~ ~ scoreboard players operation @s[score_LobbyTouched_min=-100000000,tag=!SecondSnowball] LobbyTouched += SnowballLeaders LobbyTouched
scoreboard players reset SnowballLeaders LobbyTouched
#=========== Writing ===========#
scoreboard teams leave @a[tag=FirstSnowball]
scoreboard teams leave @a[tag=SecondSnowball]
scoreboard teams leave @a[tag=ThirdSnowball]
blockdata 499 112 468 {Text1:"",Text2:"{\"text\":\"Nobody for\",\"italic\":true,\"color\":\"red\"}",Text3:"{\"text\":\"the moment.\",\"italic\":true,\"color\":\"red\"}",Text4:""}
blockdata 500 112 468 {Text1:"",Text2:"{\"text\":\"Nobody for\",\"italic\":true,\"color\":\"red\"}",Text3:"{\"text\":\"the moment.\",\"italic\":true,\"color\":\"red\"}",Text4:""}
blockdata 501 112 468 {Text1:"",Text2:"{\"text\":\"Nobody for\",\"italic\":true,\"color\":\"red\"}",Text3:"{\"text\":\"the moment.\",\"italic\":true,\"color\":\"red\"}",Text4:""}
execute @a[tag=FirstSnowball] ~ ~ ~ blockdata 499 112 468 {Text1:"",Text2:"{\"text\":\"First:\",\"bold\":true,\"color\":\"aqua\"}",Text3:"{\"selector\":\"@a[tag=FirstSnowball]\",\"bold\":true,\"color\":\"dark_aqua\"}",Text4:"[\"\",{\"text\":\"with\",\"color\":\"aqua\"},{\"text\":\" \",\"bold\":true,\"color\":\"dark_aqua\"},{\"score\":{\"name\":\"@a[tag=FirstSnowball]\",\"objective\":\"LobbyTouched\"},\"bold\":true,\"color\":\"dark_aqua\"},{\"text\":\" kills.\",\"color\":\"aqua\"}]"}
execute @a[tag=SecondSnowball] ~ ~ ~ blockdata 500 112 468 {Text1:"",Text2:"{\"text\":\"Second:\",\"bold\":true,\"color\":\"aqua\"}",Text3:"{\"selector\":\"@a[tag=SecondSnowball]\",\"bold\":true,\"color\":\"dark_aqua\"}",Text4:"[\"\",{\"text\":\"with\",\"color\":\"aqua\"},{\"text\":\" \",\"bold\":true,\"color\":\"dark_aqua\"},{\"score\":{\"name\":\"@a[tag=SecondSnowball]\",\"objective\":\"LobbyTouched\"},\"bold\":true,\"color\":\"dark_aqua\"},{\"text\":\" kills.\",\"color\":\"aqua\"}]"}
execute @a[tag=ThirdSnowball] ~ ~ ~ blockdata 501 112 468 {Text1:"",Text2:"{\"text\":\"Third:\",\"bold\":true,\"color\":\"aqua\"}",Text3:"{\"selector\":\"@a[tag=ThirdSnowball]\",\"bold\":true,\"color\":\"dark_aqua\"}",Text4:"[\"\",{\"text\":\"with\",\"color\":\"aqua\"},{\"text\":\" \",\"bold\":true,\"color\":\"dark_aqua\"},{\"score\":{\"name\":\"@a[tag=ThirdSnowball]\",\"objective\":\"LobbyTouched\"},\"bold\":true,\"color\":\"dark_aqua\"},{\"text\":\" kills.\",\"color\":\"aqua\"}]"}
function main:lobby/lobby/teams
scoreboard teams join MurderAI @a[tag=Freezed]
scoreboard teams join MurderAI @a[tag=Murder]
scoreboard teams join Innocent @a[tag=Innocent]
scoreboard teams join Spectators @a[tag=Spectator]
scoreboard players tag @a[tag=FirstSnowball] remove FirstSnowball
scoreboard players tag @a[tag=SecondSnowball] remove SecondSnowball
scoreboard players tag @a[tag=ThirdSnowball] remove ThirdSnowball