execute store result score #kb temp run attribute @s minecraft:knockback_resistance base get
execute if score #kb temp matches 0 run attribute @s minecraft:knockback_resistance base set 0.625
damage @s 1.1 pctf:mob_attack_no_cooldown by @n[tag=raycaster]
execute if score #kb temp matches 0 run attribute @s minecraft:knockback_resistance base reset
execute at @n[type=player,tag=raycaster] run playsound minecraft:entity.arrow.hit_player player @n[type=player,tag=raycaster] ~ ~ ~ 1 1.5

scoreboard players set #distance raycast_time 0