execute store result score #temp_red player_count if entity @a[team=red,tag=!dead,distance=..250]

# has none
$execute if score #time game$(map_id) matches 2.. unless entity @n[tag=blue_flag_dropoff,tag=captured_light_purple,tag=captured_yellow,scores={map_id=$(map_id)}] run title @s actionbar ["",{"text":"Coins: ","color":"gold"},{"score":{"name":"@s","objective":"coins"},"color":"gold"},{"text":" | ","color":"white"},{"text":"Gems: ","color":"green"},{"score":{"name":"@s","objective":"gems"},"color":"green"},{"text":" | ","color":"white"},{"text":"Time: ","color":"gray"},{"score":{"name":"#time","objective":"game$(map_id)"},"color":"gray"},{"text":"m","color":"gray"}]
# has both
$execute if score #time game$(map_id) matches 2.. if entity @n[tag=blue_flag_dropoff,tag=captured_light_purple,tag=captured_yellow,scores={map_id=$(map_id)}] run title @s actionbar ["",{"text":"Coins: ","color":"gold"},{"score":{"name":"@s","objective":"coins"},"color":"gold"},{"text":" | ","color":"white"},{"text":"Gems: ","color":"green"},{"score":{"name":"@s","objective":"gems"},"color":"green"},{"text":" | "},{"text":"👤 ","color":"red"},{"score":{"name":"#temp_red","objective":"player_count"},"color":"white"},{"text":" | "},{"text":"Time: ","color":"gray"},{"score":{"name":"#time","objective":"game$(map_id)"},"color":"gray"},{"text":"m","color":"gray"}]


# has none (seconds)
$execute if score #time game$(map_id) matches 1 unless entity @n[tag=blue_flag_dropoff,tag=captured_light_purple,tag=captured_yellow,scores={map_id=$(map_id)}] run title @s actionbar ["",{"text":"Coins: ","color":"gold"},{"score":{"name":"@s","objective":"coins"},"color":"gold"},{"text":" | ","color":"white"},{"text":"Gems: ","color":"green"},{"score":{"name":"@s","objective":"gems"},"color":"green"},{"text":" | ","color":"white"},{"text":"Time: ","color":"gray"},{"score":{"name":"#seconds","objective":"game$(map_id)"},"color":"gray"},{"text":"s","color":"gray"}]
# has both (seconds)
$execute if score #time game$(map_id) matches 1 if entity @n[tag=blue_flag_dropoff,tag=captured_light_purple,tag=captured_yellow,scores={map_id=$(map_id)}] run title @s actionbar ["",{"text":"Coins: ","color":"gold"},{"score":{"name":"@s","objective":"coins"},"color":"gold"},{"text":" | ","color":"white"},{"text":"Gems: ","color":"green"},{"score":{"name":"@s","objective":"gems"},"color":"green"},{"text":" | "},{"text":"👤 ","color":"red"},{"score":{"name":"#temp_red","objective":"player_count"},"color":"white"},{"text":" | "},{"text":"Time: ","color":"gray"},{"score":{"name":"#seconds","objective":"game$(map_id)"},"color":"gray"},{"text":"s","color":"gray"}]
