tag @s add temp
execute as @a[distance=..250,gamemode=!spectator] unless score @s ctf_ID = @n[tag=temp] ctf_ID run tag @s add tp_temp

execute as @a[tag=tp_temp,sort=random,limit=1] run tag @s add tp_the_one

tag @a[tag=tp_temp] remove tp_temp

execute as @n[tag=tp_the_one] run tp @s ~ ~ ~
execute as @n[tag=tp_the_one] at @s run function pctf:motion/push {power: "1", x: "~", y: "~-0.5", z: "~"}

execute as @n[tag=tp_the_one] run effect give @s minecraft:slowness 10 1 true

tag @a[tag=tp_the_one] remove tp_the_one

tag @s remove temp