scoreboard players remove #distance raycast_time 1
execute positioned ^-0.15 ^-0.1 ^ run function pctf:logic/items/minigun/fx

execute positioned ~-0.1 ~-0.1 ~-0.1 as @n[type=!#pctf:cannot_be_hit,dx=0.2,dy=0.2,dz=0.2,tag=!spectator] unless score @s ctf_ID = @n[tag=raycaster] ctf_ID at @s run function pctf:logic/items/minigun/collide

execute if score #distance raycast_time matches 1.. positioned ^ ^ ^0.25 if block ~ ~ ~ #pctf:breakable_wools run function pctf:logic/items/minigun/destroy_block
execute if score #distance raycast_time matches 1.. positioned ^ ^ ^0.25 if block ~ ~ ~ #pctf:projectile_pass run function pctf:logic/items/minigun/loop_raycast