execute as @a[tag=!playing,team=blue,sort=random,limit=1] run function pctf:logic/lobby/join/red
$execute store result score #red_players game$(map_id) run execute if entity @a[team=red]
$execute store result score #blue_players game$(map_id) run execute if entity @a[team=blue]
$execute if score #blue_players game$(map_id) > #red_players game$(map_id) run function pctf:logic/lobby/balance_players/blue_has_more {map_id: "$(map_id)"}