Scoring with positions

Hi, I am working on a small unity project. I am trying to implement a scoring system where one would put there first person controller in a positions, say off the plane, and their score would go down. This is the code I have so far which currently does not work properly:

static var Counter : int =5;
function Update ()
var player = GameObject.Find("First Person Controller");
   if(player.transform.position.y <-10)
     Counter++ -1;

Here is the gui script:

var windowRect : Rect = Rect (20, 20, 120, 50);

function OnGUI(){

windowRect = GUI.Window (0, windowRect, WindowFunction, "Score: " +addToScore.Counter); }

function WindowFunction (windowID : int) {

Counter++ increments the counter every time that function is called. Essentially, you are adding 1 (+1) to your counter. Immediately afterward, you subtract 1 (-1), bringing your grand total for the function call back to what it started at. You can either do...



Counter -= 1;