function pctf:logic/player/capture_flag/helmet
tag @s remove has_flag

execute if entity @s[tag=has_aqua_flag] run function pctf:logic/player/capture_flag/aqua
execute if entity @s[tag=has_green_flag] run function pctf:logic/player/capture_flag/green

function pctf:logic/player/capture_flag/reward