How do I make the counter stop and give a score bonus?

So my game is a game where you have to put objects in containers. Once all the objects are in the containers. I want the timer to stop and pull up an end level GUI that shows the score, the time it took and the bonus… which gives you the final score. Problem is… I am not REALLY a programmer…
I was able to program the timer counter
Code:

var min : int;
var sec : int;
var fraction : int;
var timecount : float;
var starttime : float;
var timeCounter : GUIText;
 
function Start ()
{
    starttime = Time.time;
}
 
function Update () 
{
    timecount = Time.time - starttime;
    min = (timecount/60f);
    sec = (timecount % 60f);
    fraction = ((timecount * 10) %10);
    timeCounter.text = String.Format("{00:00}:{1:00}:{2:00}",min,sec,fraction);
}

and the score
Code:

//This keeps count of the score
static var playerScore : int;
// This variable is a string
var scorePrint;
//boolean that changes the ball's status
var IsInside : boolean;
//gets the game object from inspector
var Trigger : GameObject;
//This variable allows us to put a GUIText game object in the inspector
var Scorecount : GUIText;
 
function start()
{
    IsInside =false ;
}
 
function OnTriggerEnter(other : Collider)
{
    if (other.gameObject== Trigger && IsInside == false){
        playerScore =playerScore+10;
        IsInside = true;
    }
    else if (other.gameObject==Trigger && IsInside == true){
        playerScore =playerScore-10;
        IsInside = false;          
    }
}
       
function Update()
{
    scorePrint = playerScore.ToString();
    Scorecount.text = String.Format(scorePrint);
}

Now I want to stop the timer when the Scorecount.text hits 60
the script was put on each of the objects hitting the trigger…
sample of the game here…

http://rblumenschein.webs.com/demooftiltgame.htm

PLEASE someone… how should I write the stop time counter code and should I attach that to the timer code or should I create another code

AND how do I get GUI to actually pull up on the screen once the level is ended…


Edit :

The container are the blue circle things in the middle… I am going to have to make it more obvious, you are the second person who were not able to tell what the containers are… they look like part of the art…

Also there is no way to go above 60 since these are attached to the actual ball so the is no need to lock the score.

What I need is for the time counter to stop when all the balls are in the containers…

Oh and I don’t think a tag will work since I have two triggers reading two different balls the small ball are on top and the big balls are on bottom

To lock the timer at playerScore = 60, you have to either put the timer code in the score script, or you can access the timer component from its gameobject with a “GetComponent” (UnityScript Reference)

var min : int;
var sec : int;
var fraction : int;
var timecount : float;
var starttime : float;
var timeCounter : GUIText;
// You have to make a bool variable in your timer script
var scoreReached : boolean;

function Start ()
{
    starttime = Time.time;
    scoreReached = false;
}

function Update () 
{
    if (!scoreReached) 
    {
    timecount = Time.time - starttime;
    min = (timecount/60f);
    sec = (timecount % 60f);
    fraction = ((timecount * 10) %10);
    timeCounter.text = String.Format("{00:00}:{1:00}:{2:00}",min,sec,fraction);
    }
}

Then you access the script through a GetComponent

var timerScript : /*Insert name of timer class here*/;
var timerObject : GameObject;

timerObject = GameObject.Find("name of gameobject with script");
timerScript = /*gameObject that has the timer script*/.GetComponent(/*Insert name of timer class here*/);

if (playerScore >= 60)
    {
         timerScript.scoreReached = true;
    }

…and yet theres more!

GUI

Basically you would have something like this:

var showGUI : boolean;

function Start() 
{
    showGUI = false;
}

function Update () 
{
    if (scoreReached) 
    {
       showGUI = true;
    }
    if (!scoreReached) 
    {
        timecount = Time.time - starttime;
        min = (timecount/60f);
        sec = (timecount % 60f);
        fraction = ((timecount * 10) %10);
        timeCounter.text = String.Format("{00:00}:{1:00}:{2:00}",min,sec,fraction);
    }
}
      
function OnGUI () {
   if (showGUI) {
       GUI.Box (Rect (10,10,100,50), GUIContent("400", launcherUpgrade1));
       ... rest of the GUI ...
   }
}