2D shooting problem please help!

Hi, i have created a simple Javascript that allows the player to shoot in the direction they are facing, with the left mouse. But i have a problem that i cant fix. I have also created a basic pause game script (JS also), but whenever i pause the game and click the GUI buttons (Like options etc), the game character fires the bullets while paused! (The projectiles remain static but build on each click). On resume, the bullets shoot in the direction i’m facing, depending on how many times i have clicked in the pause menu screen. Is there anyway to deactivate the shooting script when the escape key is press (When paused)?

Scripts used:

var Bullet:Transform; 
var shootForce:float;

function Update() {

	if(Input.GetButtonDown("Fire1")) {

		var instanceBullet = Instantiate(Bullet, transform.position, Quaternion.identity);
		instanceBullet.rigidbody.AddForce(transform.forward * shootForce); 
	} 
} 

And:

var paused : boolean = false; 

var myCheck : boolean = false;

function Update () {

	if(Input.GetButtonDown("Pause")) {

		if(!paused){

			Time.timeScale = 0; paused = true;
		} else {

			Time.timeScale = 1;
			paused = false;
		} 
	} 
}

function OnGUI() {

	if(paused) {

		if(GUI.Button (Rect (10, 50, 100, 30), "Resume")) {

			Time.timeScale = 1.0f;
			paused = false;
		}

		if(GUI.Button (Rect (10, 90, 100, 30), "Options")) { 
			//Pause Game Options
		}

		if(GUI.Button (Rect (10, 130, 100, 30), "Exit")) { 
			Application.Quit(); 
		} 
	} 
}

Setting the timescale to 0 will not prevent your code from getting inputs and instantiating projectiles. You also need to check if the game is paused or not in your bullet shooting script before checking for mouse input and instantiating the projectile.

void Update()
{
if (!paused)
    //check for mouse input and shoot bullet
}

Hope it helps.
Also, next time use the 101010 button to make your code easier to read.

Can’t you just check the area, where the mouse cursor is being placed and exclude the buttons’ area ?
I mean - sth like:
if(Input.GetButtonDown(“Fire1”) && Input.mousePosition.y > yourValue && input.mousePosition.x > yourValue2)
{ … }