tag @s add unlucky_temp
execute as @a[distance=..250,gamemode=!spectator] if score @s ctf_ID = @n[tag=unlucky_temp] ctf_ID at @s run function pctf:logic/items/lucky_block/summon/unlucky
tag @s remove unlucky_temp