tag @n[tag=blue_flag_dropoff] add captured_light_purple

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

tellraw @a[distance=..250] ["",{"selector":"@s","bold":true},{"text":" has captured the ","bold":true},{"text":"Magenta Flag","bold":true,"color":"light_purple"},{"text":" for ","bold":true},{"text":"[BLUE]","bold":true,"color":"blue"},{"text":"!","bold":true}]

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

tag @s remove has_light_purple_flag

team modify light_purple_wool prefix {"text":"█ ","color":"light_purple"}

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