tag @s add smite_temp
execute as @a[distance=..250,gamemode=!spectator] if score @s ctf_ID = @n[tag=smite_temp] ctf_ID run tag @s add smite_group

execute as @a[tag=smite_group,sort=random,limit=1] at @s run function pctf:logic/items/lucky_block/outcomes/negative/team/smite/activate

tag @a[tag=smite_group] remove smite_group

tag @s remove smite_temp