play sound when moving stop sound when not

I am working on a tank game but whenever i use this code and move around a lot it starts bugging out and plays weird parts of the audio. can someone ether give me a reference or add on to my script. Thank you for all your help unity answers.

function Update() 
{
 if(Input.GetButtonDown("Vertical"))
 	{
 	  audio.Play ();
 	}	
 if (Input.GetButtonUp("Vertical"))
 	{
 		 audio.Pause();
 	}	

}

and another script for moving up and down

function Update() 
{
 if(Input.GetButtonDown("Horizontal"))
 	{
 	  audio.Play ();
 	}	
 if (Input.GetButtonUp("Horizontal"))
 	{
 		 audio.Pause();
 	}	

}

try

function Update()
{
    if(Input.GetButton("Vertical")
    {
        if(!audio.isPlaying)
        {
            audio.Play()
        }
    }
    else
    {
        audio.Stop();
    }

    if(Input.GetButton("Horizontal")
    {
        if(!audio.isPlaying)
        {
            audio.Play()
        }
    }
    else
    {
        audio.Stop();
    }
}