damage @s[type=!player] 30 pctf:mob_attack_no_cooldown by @n[tag=raycaster]
execute at @n[type=player,tag=raycaster] run playsound minecraft:entity.arrow.hit_player player @n[type=player,tag=raycaster] ~ ~ ~ 1 1.5

execute if entity @s[type=player] run function pctf:logic/items/railgun/hit_player

scoreboard players set #distance raycast_time 0