execute at @s if entity @e[type=#entity_hit_matching:targets,distance=..2,sort=nearest,limit=1] run function custom_items:arrow/poison/apply
execute at @s run particle dust_color_transition{from_color:[0.027,0.820,0.000],scale:1,to_color:[0.118,0.290,0.000]} ~ ~ ~ 0 0 0 1 0 normal