scoreboard players remove @s generic_timer2 1
execute store result storage pctf:scrolls input.x int 1 run random value -1..1
execute store result storage pctf:scrolls input.y int 1 run random value -1..1
execute at @s run function pctf:logic/items/scrolls/silence_beam/move with storage pctf:scrolls input
tag @s add collide_temp
execute at @s positioned ~ ~-1 ~ as @e[type=!#pctf:cannot_be_hit,tag=!spectator,distance=..1.5] unless score @s ctf_ID = @n[type=marker,tag=collide_temp] ctf_ID as @n[type=marker,tag=collide_temp] at @s run function pctf:logic/items/scrolls/silence_beam/detonate
tag @s remove collide_temp
execute at @s unless block ~ ~ ~ #pctf:projectile_pass run function pctf:logic/items/scrolls/silence_beam/detonate
execute at @s run function pctf:logic/items/scrolls/silence_beam/fx

function pctf:logic/items/scrolls/collide_check

execute if score @s generic_timer2 matches 1.. run function pctf:logic/items/scrolls/silence_beam/loop