scoreboard players add @e[name=StartGame,type=armor_stand,tag=StartInit] StartInit 1
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ scoreboard players tag @a[tag=Lobby] add Starting
function main:scoreboard/display if @e[name=StartGame,score_StartInit_min=1,score_StartInit=1]
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ scoreboard players tag @a[tag=Starting] remove Lobby
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ clear @a[tag=Starting]
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ scoreboard players tag @a[tag=Starting] remove LobbyJump

execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ effect @a[tag=Starting] slowness 3 6 true
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ effect @a[tag=Starting] jump_boost 3 128 true
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ spreadplayers 500 500 0 5 false @a[tag=Starting]

execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ clear @a[tag=Starting] minecraft:snowball
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ clear @a[tag=Starting] minecraft:barrier
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ scoreboard players reset @a[tag=Starting] GiveSecret
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ scoreboard players tag @a[tag=Starting] remove TestforSecretItem
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ scoreboard players tag @a[tag=Starting] remove TestforSecretItem1

execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ scoreboard players tag @a[tag=Starting] remove WhatIsFreezun
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ scoreboard players reset @a[tag=Starting] WhatIsFreezun

execute @e[name=StartGame,score_StartInit_min=20,score_StartInit=20] ~ ~ ~ function main:start/startfunctions/randommap if @e[name=FunctionRunner,type=armor_stand,tag=RandomMap]

execute @e[name=StartGame,score_StartInit_min=20,score_StartInit=20] ~ ~ ~ scoreboard players operation @e[name=SpawnAI,type=armor_stand] Options = @e[name=ArtificialPlayer,type=armor_stand] Options
execute @e[name=StartGame,score_StartInit_min=20,score_StartInit=20] ~ ~ ~ function main:start/startfunctions/spawnairandomsummon
execute @e[name=SpawnAI,type=armor_stand,score_Options_min=1] ~ ~ ~ function main:start/startfunctions/spawnai
execute @e[name=StartGame,score_StartInit_min=40,score_StartInit=40] ~ ~ ~ scoreboard players operation @e[name=MurderSelector,type=armor_stand] Options = @e[name=MurderNumber,type=armor_stand] Options
execute @e[name=MurderSelector,type=armor_stand,score_Options_min=1] ~ ~ ~ function main:start/startfunctions/murderselector
execute @e[name=StartGame,score_StartInit_min=60,score_StartInit=60] ~ ~ ~ function main:start/startfunctions/initneedtp
execute @e[name=StartGame,score_StartInit_min=62,score_StartInit=62] ~ ~ ~ function main:start/startfunctions/needtp
execute @e[name=StartGame,score_StartInit_min=60,score_StartInit=60] ~ ~ ~ scoreboard teams join Innocent @e[tag=Starting]
function main:start/startfunctions/testconditions if @e[name=StartGame,score_StartInit_min=60,score_StartInit=281]

function main:game/mainspectator if @e[name=StartGame,score_StartInit_min=65,score_StartInit=282]
function main:game/mainspectator2 if @e[name=StartGame,score_StartInit_min=65,score_StartInit=282]

execute @e[name=StartGame,score_StartInit_min=80,score_StartInit=80] ~ ~ ~ scoreboard players tag @e[name=Decompte,type=armor_stand] add Decompte
execute @e[name=StartGame,score_StartInit_min=80,score_StartInit=80] ~ ~ ~ execute @e[name=Map,score_Options_min=2,score_Options=2] ~ ~ ~ summon minecraft:armor_stand -36 115 253 {CustomName:"ArmorRun",Motion:[0.8,0.0,0.0],Small:1b,Marker:1b,Rotation:[90f,0.0f],Invisible:1b,Passengers:[{id:"boat",CustomName:"BoatRun",Type:"oak",Tags:["WaitForLanding"],Passengers:[{id:"area_effect_cloud",CustomName:"BoatPassenger",CustomNameVisible:0b,Particle:mobSpell,Duration:2000000000}]}]}
execute @e[name=StartGame,score_StartInit_min=80,score_StartInit=80] ~ ~ ~ execute @e[name=Map,score_Options_min=2,score_Options=2] ~ ~ ~ tp @e[type=boat,name=BoatRun,tag=WaitForLanding] ~ ~ ~ -90 ~
execute @e[name=Decompte,type=armor_stand,tag=Decompte] ~ ~ ~ function main:start/startfunctions/decompte
execute @e[name=StartGame,score_StartInit_min=80,score_StartInit=80] ~ ~ ~ execute @e[type=villager] ~ ~ ~ summon zombie ~ ~ ~ {IsBaby:1b,CustomName:"MooveVillager",NoAI:1b,Silent:1b} 
execute @e[name=StartGame,score_StartInit_min=120,score_StartInit=120] ~ ~ ~ tp @e[type=zombie,name=MooveVillager] ~ ~-256 ~
execute @e[name=StartGame,score_StartInit_min=280,score_StartInit=280] ~ ~ ~ scoreboard players tag @e[tag=Starting] add Innocent
execute @e[name=StartGame,score_StartInit_min=280,score_StartInit=280] ~ ~ ~ scoreboard players tag @e[tag=MurderInit] remove Innocent
execute @e[name=StartGame,score_StartInit_min=282,score_StartInit=282] ~ ~ ~ scoreboard players tag @e[name=FunctionRunner,type=armor_stand] remove Innocent
execute @e[name=StartGame,score_StartInit_min=281,score_StartInit=281] ~ ~ ~ function main:start/startfunctions/murderinit
execute @e[name=StartGame,score_StartInit_min=281,score_StartInit=281] ~ ~ ~ function main:start/startfunctions/survivefor
execute @e[name=StartGame,score_StartInit_min=282,score_StartInit=282] ~ ~ ~ scoreboard players tag @e[tag=Starting] add InGame
execute @e[name=StartGame,score_StartInit_min=282,score_StartInit=282] ~ ~ ~ scoreboard players tag @e[name=FunctionRunner,type=armor_stand] add InGame
execute @e[name=StartGame,score_StartInit_min=282,score_StartInit=282] ~ ~ ~ scoreboard players tag @e[tag=Starting,name=!FunctionRunner,type=!armor_stand] remove Starting
execute @e[name=StartGame,score_StartInit_min=282,score_StartInit=282] ~ ~ ~ scoreboard players set @e[type=armor_stand,name=Powerups] Powerups 1
execute @e[name=StartGame,score_StartInit_min=282,score_StartInit=282] ~ ~ ~ scoreboard players set @e[name=CurrentlyEliminated,type=armor_stand] FreezunGameCount 0
function main:scoreboard/game if @e[name=StartGame,score_StartInit_min=282,score_StartInit=282]

title @a[tag=Starting] times 0 50 0
execute @e[name=StartGame,score_StartInit_min=1,score_StartInit=1] ~ ~ ~ title @a[tag=Starting] subtitle {"text":"Game is starting","color":"aqua"}
execute @e[name=StartGame,score_StartInit_min=5,score_StartInit=5] ~ ~ ~ title @a[tag=Starting] title ["",{"text":"[","color":"dark_aqua","bold":"true"},{"text":"IIIIII","color":"white"},{"text":"]","color":"dark_aqua","bold":"true"}]
execute @e[name=StartGame,score_StartInit_min=20,score_StartInit=20] ~ ~ ~ title @a[tag=Starting] subtitle {"text":"Creating artificial players","color":"aqua"}
execute @e[name=StartGame,score_StartInit_min=20,score_StartInit=20] ~ ~ ~ execute @a[tag=Starting] ~ ~ ~ playsound minecraft:block.note.pling master @s ~ ~ ~ 1 1
execute @e[name=StartGame,score_StartInit_min=20,score_StartInit=20] ~ ~ ~ title @a[tag=Starting] title ["",{"text":"[","color":"dark_aqua","bold":"true"},{"text":"II","color":"aqua"},{"text":"IIII","color":"white"},{"text":"]","color":"dark_aqua","bold":"true"}]
execute @e[name=StartGame,score_StartInit_min=40,score_StartInit=40] ~ ~ ~ title @a[tag=Starting] subtitle {"text":"Selecting Hunter","color":"aqua"}
execute @e[name=StartGame,score_StartInit_min=40,score_StartInit=40] ~ ~ ~ execute @a[tag=Starting] ~ ~ ~ playsound minecraft:block.note.pling master @s ~ ~ ~ 1 1.5
execute @e[name=StartGame,score_StartInit_min=40,score_StartInit=40] ~ ~ ~ title @a[tag=Starting] title ["",{"text":"[","color":"dark_aqua","bold":"true"},{"text":"IIII","color":"aqua"},{"text":"II","color":"white"},{"text":"]","color":"dark_aqua","bold":"true"}]
execute @e[name=StartGame,score_StartInit_min=60,score_StartInit=60] ~ ~ ~ title @a[tag=Starting] subtitle {"text":"Teleporting players","color":"aqua"}
execute @e[name=StartGame,score_StartInit_min=60,score_StartInit=60] ~ ~ ~ execute @a[tag=Starting] ~ ~ ~ playsound minecraft:item.chorus_fruit.teleport master @s
execute @e[name=StartGame,score_StartInit_min=60,score_StartInit=60] ~ ~ ~ title @a[tag=Starting] title ["",{"text":"[","color":"dark_aqua","bold":"true"},{"text":"IIIIII","color":"aqua"},{"text":"","color":"white"},{"text":"]","color":"dark_aqua","bold":"true"}]
scoreboard players tag @e[type=armor_stand,score_StartInit_min=300] remove StartInit
scoreboard players set @e[type=armor_stand,score_StartInit_min=300] StartInit 0