How do i decrease a variable when i hold mouse button?

Just as the question title states. Except i need script, help please!!

Basically, do a simple check when the mouse button is down.
The GetMouseButtonDown function returns true when the given button is down, and
returns false if the given button is not down.
And when the function returns true (see example below),
you just decrease the value of your variable.

Input.GetMouseButtonDown(0) is equal to the left mouse button.

Input.GetMouseButtonDown(1) is equal to the right mouse button.

Input.GetMouseButtonDown(2) is equal to the middle mouse button.

Simple example:

int variable;
     variable = 0;
     if(Input.GetMouseButtonDown(0) == true)
      variable -= 1;

Read in the Input documentation for more information about GetMouseButtonDown and other inputs.

Good luck!