It's based on orb of purge.
The triggering was done by Jass, so I doubt you will be able to replicate it. A somewhat inferior GUI version would go as follows:
Create custom spell based off Orb of Purge
Set "purge" trigger rate to 100%, and give it a cooldown.
Give the triggered ability the same missile animation as your hero, and give it a buff.
Trigger:
Event: Unit is attacked
Condition: Unit has buff
Action:
Pick every unit matching matching unit has buff.
turn of this trigger
Order Unit to deal integer(AGIofHero) + randomintegar(dice1 to dice1 x dice2) + base attack targeted
wait 1 seconds
turn on this trigger
Set the buff duration to atleast 1 second
The damage timing is sloppy but that can be fixed.
"You're useless, but you somehow manage to get things done."