advancement revoke @s only minecraft:suhc/flaregun
execute as @s[nbt={Inventory:[{id:"minecraft:torch"}]}] run execute at @s run summon marker ~ ~1 ~ {Tags:["KyuFlareGun","KyuFlareGunMain"]}
execute at @s run tp @e[type=marker,limit=1,sort=nearest,tag=KyuFlareGun,distance=..2,tag=KyuFlareGunMain] ~ ~2 ~ ~ ~

execute as @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:multishot"}]}}}] run execute at @s[nbt={Inventory:[{id:"minecraft:torch"}]}] positioned ~ ~1 ~ run summon marker ^ ^ ^ {Tags:["KyuFlareGun","KyuFlareGunLeft"]}
execute as @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:multishot"}]}}}] run execute at @s[nbt={Inventory:[{id:"minecraft:torch"}]}] positioned ~ ~1 ~ run summon marker ^ ^ ^ {Tags:["KyuFlareGun","KyuFlareGunRight"]}
execute at @s run tp @e[type=marker,limit=1,sort=nearest,tag=KyuFlareGun,distance=..2,tag=KyuFlareGunLeft] ~ ~2 ~ ~5 ~
execute at @s run tp @e[type=marker,limit=1,sort=nearest,tag=KyuFlareGun,distance=..2,tag=KyuFlareGunRight] ~ ~2 ~ ~-5 ~

scoreboard players set @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] KyuDummy -22

execute at @s[nbt=!{SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing"}]}}}] run tag @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] add Tier0P
execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:1s}]}}}] run tag @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] add Tier1P
execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:2s}]}}}] run tag @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] add Tier2P
execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:3s}]}}}] run tag @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] add Tier3P
execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:4s}]}}}] run tag @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] add Tier4P
execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:5s}]}}}] run tag @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] add Tier5P



#execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:1s}]}}}] run scoreboard players set @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] KyuDummy -11
#execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:2s}]}}}] run scoreboard players set @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] KyuDummy -16
#execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:3s}]}}}] run scoreboard players set @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] KyuDummy -18
#execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:4s}]}}}] run scoreboard players set @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] KyuDummy -20
#execute at @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:piercing",lvl:5s}]}}}] run scoreboard players set @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] KyuDummy -25

#scoreboard players set @e[distance=..3,type=marker,limit=3,sort=nearest,tag=KyuFlareGun] KyuDummy -20


execute as @s[nbt={SelectedItem:{tag:{Enchantments:[{id:"minecraft:multishot"}]}}}] run clear @s torch 3
execute as @s[nbt=!{SelectedItem:{tag:{Enchantments:[{id:"minecraft:multishot"}]}}}] run clear @s torch 1
kill @e[type=arrow,distance=..2]
execute in overworld run data merge block 999978 123 999971 {auto:1b}
#effect give @s wither 1 1
#effect give @s poison 1 1
#give @s emerald 1