execute store result score @s jjc_x1 run data get entity @s Motion[0] 1000
execute store result score @s jjc_y1 run data get entity @s Motion[1] 1000
execute store result score @s jjc_z1 run data get entity @s Motion[2] 1000
playsound entity.generic.explode hostile @a ^ ^ ^ 1 2
particle large_smoke ^ ^ ^0.45 0 0 0 0.05 20 normal

summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}
summon arrow ^ ^ ^ {damage:1d,Tags:["jjc_pillager_shotgun_detected","jjc_pillager_shotgun_j0","jjc_pillager_shotgun_j"],Passengers:[{id:"marker",Tags:["jjc_pillager_shotgun_j_m","jjc_nov"]}]}

execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s run data modify entity @s Owner set from entity @n[distance=..200,type=pillager,tag=jjc_pillager_shotgun] UUID
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result score @s jjc_x1 run scoreboard players get @n[type=#arrows,distance=..2,nbt=!{LeftOwner:1b},tag=!jjc_pillager_shotgun_detected] jjc_x1
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result score @s jjc_y1 run scoreboard players get @n[type=#arrows,distance=..2,nbt=!{LeftOwner:1b},tag=!jjc_pillager_shotgun_detected] jjc_y1
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result score @s jjc_z1 run scoreboard players get @n[type=#arrows,distance=..2,nbt=!{LeftOwner:1b},tag=!jjc_pillager_shotgun_detected] jjc_z1
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result score @s jjc_random run random value -500..500
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result entity @s Motion[0] double 0.001 run scoreboard players operation @s jjc_x1 += @s jjc_random
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result score @s jjc_random run random value -500..500
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result entity @s Motion[1] double 0.001 run scoreboard players operation @s jjc_y1 += @s jjc_random
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result score @s jjc_random run random value -500..500
execute as @e[type=arrow,tag=jjc_pillager_shotgun_j0] at @s store result entity @s Motion[2] double 0.001 run scoreboard players operation @s jjc_z1 += @s jjc_random
tag @e[type=arrow,tag=jjc_pillager_shotgun_j0] remove jjc_pillager_shotgun_j0
kill @s[type=#arrows,tag=!jjc_pillager_shotgun_detected]
schedule function colosseum_of_fools:ss/pillager/shotgun/j 1t replace