tellraw @a[distance=..250] ["",{"text":"FLITHY RICH!","bold":true,"color":"gold"},{"text":"\n"},{"text":"All players on ","color":"aqua"},{"selector":"@s","color":"white"},{"text":"'s","color":"white"},{"text":" team have gained a boat load of coins!","color":"aqua"}]
playsound minecraft:block.chain.break player @a ~ ~ ~ 5 0

tag @s add rich_temp
execute as @a[distance=..250] if score @s ctf_ID = @n[tag=rich_temp] ctf_ID run function pctf:logic/player/coins/set_coins_to_add {amount: "200"}
tag @s remove rich_temp