execute @a[tag=OptionAddMurder] ~ ~ ~ scoreboard players add @e[name=MurderNumber,type=armor_stand] Options 1
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderNumber,score_Options_min=4] ~ ~ ~ scoreboard players set @s Options 1
#Operations:
scoreboard players set @e[name=ReadyToBeMurder,type=armor_stand] ReadyToPlay 0
execute @e[name=CanBeMurder,score_Options=1] ~ ~ ~ execute @a[tag=Lobby] ~ ~ ~ scoreboard players add @e[name=ReadyToBeMurder,type=armor_stand] ReadyToPlay 1
execute @e[name=CanBeMurder,score_Options_min=1] ~ ~ ~ scoreboard players operation @e[name=ReadyToBeMurder] ReadyToPlay += @e[name=ArtificialPlayer] Options
scoreboard players set @e[name=ReadyToPlay,type=armor_stand] ReadyToPlay 0
execute @a[tag=Lobby] ~ ~ ~ scoreboard players add @e[name=ReadyToPlay,type=armor_stand] ReadyToPlay 1
scoreboard players operation @e[name=ReadyToPlay] ReadyToPlay += @e[name=ArtificialPlayer] Options
scoreboard players operation @e[name=MurderNumberTest] ReadyToPlay = @e[name=ReadyToBeMurder] ReadyToPlay
scoreboard players operation @e[name=MurderNumberTest] ReadyToPlay -= @e[name=MurderNumber] Options
scoreboard players operation @e[name=AtLeast1Innocent] ReadyToPlay = @e[name=ReadyToPlay] ReadyToPlay
scoreboard players operation @e[name=AtLeast1Innocent] ReadyToPlay -= @e[name=MurderNumber] Options
scoreboard players operation @e[name=AtLeast1Innocent] ReadyToPlay -= @e[name=ReadyToPlay1] ReadyToPlay
scoreboard players tag @e[name=MurderTest] remove Impossible
execute @e[name=MurderNumberTest,score_ReadyToPlay=-1] ~ ~ ~ scoreboard players tag @e[name=MurderTest] add Impossible
execute @e[name=AtLeast1Innocent,score_ReadyToPlay=-1] ~ ~ ~ scoreboard players tag @e[name=MurderTest] add Impossible
#Fin opérations
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @s[tag=OptionFailAddMurder] ~ ~ ~ scoreboard players set @e[name=MurderNumber,type=armor_stand] OptionsFail 0
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderTest,tag=Impossible] ~ ~ ~ scoreboard players tag @a[tag=OptionAddMurder] add OptionFailAddMurder
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderNumberTest,score_ReadyToPlay=-1] ~ ~ ~ scoreboard players tag @a[tag=OptionAddMurder] add Tellraw1
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=AtLeast1Innocent,score_ReadyToPlay=-1] ~ ~ ~ execute @a[tag=!Tellraw1] ~ ~ ~ scoreboard players tag @s[tag=OptionAddMurder] add Tellraw2
execute @e[name=MurderTest,tag=Impossible] ~ ~ ~ execute @e[name=MurderNumber,score_Options_min=2] ~ ~ ~ scoreboard players set @e[name=MurderNumber,type=armor_stand,score_OptionsFail=0] OptionsFail 1
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderNumber,score_Options_min=1,score_Options=1] ~ ~ ~ blockdata 3 101 12 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddMurder\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Hunter:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[name=MurderNumber,type=armor_stand]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"green\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderNumber,score_Options_min=1,score_Options=1] ~ ~ ~ blockdata 499 101 524 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddMurder\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Hunter:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[name=MurderNumber,type=armor_stand]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"green\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderNumber,score_Options_min=2,score_Options=2] ~ ~ ~ blockdata 3 101 12 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddMurder\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Hunters:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[name=MurderNumber,type=armor_stand]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"gold\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderNumber,score_Options_min=2,score_Options=2] ~ ~ ~ blockdata 499 101 524 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddMurder\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Hunters:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[name=MurderNumber,type=armor_stand]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"gold\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderNumber,score_Options_min=3,score_Options=3] ~ ~ ~ blockdata 3 101 12 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddMurder\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Hunters:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[name=MurderNumber,type=armor_stand]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"red\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}
execute @a[tag=OptionAddMurder] ~ ~ ~ execute @e[name=MurderNumber,score_Options_min=3,score_Options=3] ~ ~ ~ blockdata 499 101 524 {Text1:"{\"text\":\"-==*O*==-\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"scoreboard players tag @p add OptionAddMurder\"},\"color\":\"dark_gray\"}",Text2:"{\"text\":\"Hunters:\",\"color\":\"dark_aqua\"}",Text3:"{\"score\":{\"name\":\"@e[name=MurderNumber,type=armor_stand]\",\"objective\":\"Options\"},\"bold\":true,\"color\":\"red\"}",Text4:"{\"text\":\"-==*O*==-\",\"color\":\"dark_gray\"}"}

title @a[tag=OptionAddMurder] times 0 50 10
title @a[tag=OptionAddMurder] title {"text":""}
execute @e[name=MurderNumber,score_Options_min=1,score_Options=1] ~ ~ ~ title @a[tag=OptionAddMurder] subtitle ["",{"text":"There will be ","color":"aqua"},{"text":"1 ","color":"green","bold":"true"},{"text":"Hunter ","color":"dark_aqua"},{"text":"in the game.","color":"aqua"}]
execute @e[name=MurderNumber,score_Options_min=2,score_Options=2] ~ ~ ~ title @a[tag=OptionAddMurder] subtitle ["",{"text":"There will be ","color":"aqua"},{"text":"2 ","color":"gold","bold":"true"},{"text":"Hunters ","color":"dark_aqua"},{"text":"in the game.","color":"aqua"}]
execute @e[name=MurderNumber,score_Options_min=3,score_Options=3] ~ ~ ~ title @a[tag=OptionAddMurder] subtitle ["",{"text":"There will be ","color":"aqua"},{"text":"3 ","color":"red","bold":"true"},{"text":"Hunters ","color":"dark_aqua"},{"text":"in the game.","color":"aqua"}]

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