Handgun animation to play once when gun is shot in-game

Okay, so I've made a basic animation... how would I go about linking the animation so that it plays when gun is shot and for it to not loop of course, only to play once upon weapon being used...?

Thank you!

You would have to mod it but this works well for my shotgun reload:

function Reload () {

    // Wait for reload time first - then add more bullets!
    yield WaitForSeconds(1);
    audio.PlayOneShot (reloadSound);
    yield WaitForSeconds(reloadTime);

    // We have a clip left reload
    if (shells > 0) {
        shellsLeft = shells;