java script for a bullet shooting out to target

Hi all,
Could anyone here advise me how to write a script so that the bullet animation is shooting from player gun to target?thanks in advanced .
Are you wanting to learn how, or do you just want a plugin that will do it? If the second, here:
you have some mathematical example here for calcul collision and distance.
https://forums.rpgmakerweb.com/index.php?threads/6-essential-js-game-dev-snippet-for-rmmv.90189/
i use it for my bullet systems
Thanks Jonforum.

Original thread: https://forums.rpgmakerweb.com/threads/java-script-for-a-bullet-shooting-out-to-target.90578/