I want to recreate the sculk crossbow from hoplite

how can I recreate the sculk crossbow from hoplite but for a sword (basically when you right click holding the item it shoots an invisible arrow that leaves behind a trail of particles and deals a said amount of damage if you touch those particles) how can I do that?
Continue to help post