scoreboard players add @e[name=ArtificialPlayer,type=armor_stand] Options 1
execute @a[tag=OptionAddArtificialPlayer] ~ ~ ~ execute @e[name=ArtificialPlayer,score_Options_min=11] ~ ~ ~ scoreboard players set @s Options 0
execute @a[tag=OptionAddArtificialPlayer] ~ ~ ~ execute @s[tag=OptionFailArtificialPlayer] ~ ~ ~ scoreboard players set @e[name=ArtificialPlayer,type=armor_stand] OptionsFail 0
execute @e[name=ArtificialPlayer,score_Options=0] ~ ~ ~ execute @e[name=CanBeMurder,score_Options_min=2,score_Options=2] ~ ~ ~ scoreboard players tag @a[tag=OptionAddArtificialPlayer] add OptionFailArtificialPlayer
execute @e[name=ArtificialPlayer,score_Options=0] ~ ~ ~ execute @e[name=CanBeMurder,score_Options_min=2,score_Options=2] ~ ~ ~ scoreboard players set @e[name=ArtificialPlayer,type=armor_stand] OptionsFail 1
execute @e[name=ArtificialPlayer,score_Options_min=1,score_Options=1] ~ ~ ~ blockdata 5 101 12 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddArtificialPlayer\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Artificial player:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[type=armor_stand,name=ArtificialPlayer]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"green\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @e[name=ArtificialPlayer,score_Options_min=1,score_Options=1] ~ ~ ~ blockdata 501 101 524 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddArtificialPlayer\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Artificial player:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[type=armor_stand,name=ArtificialPlayer]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"green\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @e[name=ArtificialPlayer,score_Options_min=2] ~ ~ ~ blockdata 5 101 12 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddArtificialPlayer\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Artificial players:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[type=armor_stand,name=ArtificialPlayer]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"green\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @e[name=ArtificialPlayer,score_Options_min=2] ~ ~ ~ blockdata 501 101 524 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddArtificialPlayer\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Artificial players:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[type=armor_stand,name=ArtificialPlayer]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"green\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @e[name=ArtificialPlayer,score_Options=0] ~ ~ ~ blockdata 5 101 12 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddArtificialPlayer\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Artificial player:\",\"color\":\"dark_aqua\"}",Text3:"{\"text\":\"Off\",\"bold\":true,\"color\":\"red\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @e[name=ArtificialPlayer,score_Options=0] ~ ~ ~ blockdata 501 101 524 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddArtificialPlayer\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Artificial player:\",\"color\":\"dark_aqua\"}",Text3:"{\"text\":\"Off\",\"bold\":true,\"color\":\"red\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}

title @a[tag=OptionAddArtificialPlayer] times 0 50 10
title @a[tag=OptionAddArtificialPlayer] title {"text":""}
execute @e[name=ArtificialPlayer,score_Options=0] ~ ~ ~ title @a[tag=OptionAddArtificialPlayer] subtitle ["",{"text":"There ","color":"aqua"},{"text":"won't be any artificial player ","color":"dark_aqua"},{"text":"in the game","color":"aqua"}]
execute @e[name=ArtificialPlayer,score_Options=1,score_Options_min=1] ~ ~ ~ title @a[tag=OptionAddArtificialPlayer] subtitle ["",{"text":"There will be ","color":"aqua"},{"score":{"name":"@e[name=ArtificialPlayer,score_Options_min=1,score_Options=1]","objective":"Options"},"color":"dark_aqua"},{"text":" artificial player","color":"dark_aqua"},{"text":" in the game.","color":"aqua"}]
execute @e[name=ArtificialPlayer,score_Options_min=2] ~ ~ ~ title @a[tag=OptionAddArtificialPlayer] subtitle ["",{"text":"There will be ","color":"aqua"},{"score":{"name":"@e[name=ArtificialPlayer,score_Options_min=2]","objective":"Options"},"color":"dark_aqua"},{"text":" artificial players","color":"dark_aqua"},{"text":" in the game.","color":"aqua"}]

execute @a[tag=OptionAddArtificialPlayer] ~ ~ ~ playsound minecraft:ui.button.click master @s ~ ~ ~
function main:scoreboard/lobby if @a[tag=OptionAddArtificialPlayer]
scoreboard players tag @a[tag=OptionAddArtificialPlayer] remove OptionAddArtificialPlayer