tag @s add weak_knees_temp
execute as @a[distance=..250,gamemode=!spectator] if score @s ctf_ID = @n[tag=weak_knees_temp] ctf_ID at @s run function pctf:logic/items/lucky_block/effects/weak_knees/start {duration: "400"}
tag @s remove weak_knees_temp

tellraw @a[distance=..250] ["",{"selector":"@s","color":"white"},{"text":" and their entire team has had their knees weakened!","color":"dark_aqua"}]