tag @n[tag=red_flag_dropoff] add captured_aqua

title @a[distance=..250] times 5 60 10
title @a[distance=..250] subtitle ["",{"selector":"@s","bold":true},{"text":" has captured the "},{"text":"Aqua Flag","bold":true,"color":"aqua"},{"text":" for ","color":"white"},{"text":"[RED]","color":"red"},{"text":"!"}]
title @a[distance=..250] title ""

tellraw @a[distance=..250] ["",{"selector":"@s","bold":true},{"text":" has captured the ","bold":true},{"text":"Aqua Flag","bold":true,"color":"aqua"},{"text":" for ","bold":true},{"text":"[RED]","bold":true,"color":"red"},{"text":"!","bold":true}]

execute as @a[team=red,distance=..250] at @s run playsound minecraft:item.goat_horn.sound.1 player @a[team=red] ~ ~ ~ 10 1
execute as @a[team=blue,distance=..250] at @s run playsound minecraft:entity.elder_guardian.curse player @s ~ ~ ~ 10 1

tag @s remove has_aqua_flag

team modify aqua_wool prefix {"text":"█ ","color":"aqua"}

execute if score .elimination settings matches 1 if entity @n[tag=red_flag_dropoff,tag=captured_aqua,tag=captured_green] run tellraw @a[tag=playing] [{"text": "Blue Team","color": "blue"},{"text": " has lost both flags! They will no longer respawn on death.","color": "white"}]