Lowering a variable 1 number lowering it entirely?

I have this script that triggers a bomb explosion when clicked on with the left mouse button. When you click the right mouse button, it blows up all the bombs, but you only have a limited number of right mouse button clicks before that function is disabled. Unfortunately, the number goes down by however many bombs were blown up, instead of just once per use of the right mouse button. How could I fix that? My code seems sound to me. The GUI that is used to keep track of the “nukes” I have left is in the HUD script.

var prefab : Rigidbody;
var Stuff : Transform; 

function OnMouseDown() { 
	HUD.Score += 1;
	Destroy(gameObject);
	var Spawn : Rigidbody;
	Spawn = Instantiate(prefab, Stuff.position, Stuff.rotation);
	}
	
function Update() { 
	if(renderer.isVisible)
	{
		if(HUD.Nukes >= 0)
		{
			if(Input.GetMouseButtonDown(1))
			{
				HUD.Nukes -= 1;
				Destroy(gameObject);
				var Spawn : Rigidbody;
				Spawn = Instantiate(prefab, Stuff.position, Stuff.rotation);
				}
			}
		}
	}

Any help would be appreciated! Thanks!

I take it the script you provided is attached to the bombs themselves, which is the problem. It means that each bomb is separately lowering the number instead of lowering it by one in total. I would recommend removing the line HUD.Nukes -= 1; and adding a statement to the HUD script itself that lowers the variable by one each time the right mouse button is pressed.