execute if entity @s[tag=has_flag] if score @s pause_main_actionbar matches 60.. run title @s actionbar {"text":"You got a flag! Bring it back to your base!"}

execute if score @s pause_main_actionbar matches 1.. run scoreboard players remove @s pause_main_actionbar 1
execute if score @s pause_main_actionbar matches 1.. run return 0

execute store result storage pctf:map input.id int 1 run scoreboard players get @s on_map
execute unless score @s pause_main_actionbar matches 1.. run function pctf:logic/game/actionbar/display with storage pctf:map input