tag @e[tag=MenuSim] remove WillMenuLive
tag @e[tag=MenuSim] remove WillMenuDie
tag @e[tag=MenuSim] remove BecomeMenuRed
scoreboard players set @e[tag=MenuSim] MenuAdjacent 0
scoreboard players set @e[tag=MenuSim] AdjMenuRed 0
scoreboard players set @e[tag=MenuSim] AdjMenuBlue 0
execute as @e[tag=MenuSim,tag=MenuAlive] at @s run scoreboard players add @e[tag=MenuSim,distance=..1.9] MenuAdjacent 1
execute as @e[tag=MenuSim,tag=MenuAlive,tag=MenuRed] at @s run scoreboard players add @e[tag=MenuSim,distance=..1.9] AdjMenuRed 1
execute as @e[tag=MenuSim,tag=MenuAlive,tag=!MenuRed] at @s run scoreboard players add @e[tag=MenuSim,distance=..1.9] AdjMenuBlue 1
scoreboard players remove @e[tag=MenuAlive] MenuAdjacent 1
scoreboard players remove @e[tag=MenuAlive,tag=MenuRed] AdjMenuRed 1
scoreboard players remove @e[tag=MenuAlive,tag=!MenuRed] AdjMenuBlue 1
execute as @e[tag=MenuSim,tag=MenuAlive] unless score @s MenuAdjacent = 2 Integer unless score @s MenuAdjacent = 3 Integer run tag @s add WillMenuDie
execute as @e[tag=MenuSim,tag=!MenuAlive] if score @s MenuAdjacent = 3 Integer run tag @s add WillMenuLive
execute as @e[tag=MenuSim,tag=WillMenuLive] if score @s AdjMenuRed > @s AdjMenuBlue run tag @s add BecomeMenuRed
scoreboard players set TimeMenu Time 0