execute at @s positioned ~ ~1.5 ~ if entity @e[type=arrow,distance=...5,nbt={life:0s,inGround:0b}] run function survivalplus:tools/archer/limitammo/shoot
execute if score @s timer matches 1.. run scoreboard players remove @s timer 1
execute if score @s burst matches ..20 at @s if entity @e[type=item,distance=...5,nbt={Item:{id:"minecraft:arrow"}}] run function survivalplus:tools/archer/limitammo/pickupitem
execute if score @s burst matches ..20 at @s if entity @e[type=arrow,distance=...5,nbt={inGround:1b}] run function survivalplus:tools/archer/limitammo/pickuparrow