Score/Points counter #Javascript

I’ve gone ahead and made a public function which would control the adding or subtracting of the score based on what object is hit. My only concern is how do I place that into a GUI so it updates the text when the scoreManipulator is run?
These are the lines of code I’ve come up with but the value does not update nor does it work. The convert to string bugs out. Hope this makes sense.
Thanks everyone for the help.

I have these placed on an empty object in the scene. But how do I call the function then to run?

static var currentScore : int = 0

public function scoreManipulator(p : int)
{
 currentScore += p;
 Debug.Log(currentScore);
}

function OnGUI () {
    currentScore .ToString(); // convert the variable scoreNumber which is an integer to a string
    var centeredStyle = GUI.skin.GetStyle("Label");
    centeredStyle.alignment = TextAnchor.UpperRight;
    GUI.Label (Rect (Screen.width - 110,10,100,50),  currentScore  , centeredStyle);
}

This is how I do it:

static int level;
static int goal;
GUISkin statusInfoSkin;

etc

    function OnGUI () {
    
             GUI.skin = statusInfoSkin;
            GUI.Box (Rect (10,10,110,100), "level:" + level);
     
     GUI.Box (Rect (10,60,180,100), "goal:" + counter + " out of " + goal);
    }

this is how I usually do it, I guess it should work with Label too
(example from a current project)

Note: I’m using javascript, tried to convert but forgive me if I missed something
(not sure if I need “new” Rect…)