How can i reset the count down timer when my player collides with an object

This is my code in java script:

#pragma strict

var timer : float = 10.0;
var plusTime : float = 10.0;

var guiShow : boolean = false;

function Update()
{
timer -= Time.deltaTime;

if(timer <= 0)
{
Application.LoadLevel("juego");
	timer = 0;
}

}

function OnGUI()
{
GUI.Box(Rect(300, 10, 50, 20), “” + timer.ToString(“0”));

if(guiShow == true)
{
	GUI.Box(Rect(65, 10, 50, 20), "+" + plusTime.ToString("0"));
	ShowGUI();
	
}

}

function ShowGUI()
{
yield WaitForSeconds(2);
guiShow = false;
}

function OnCollisionEnter(col:Collision) {
timer=10.0;
}

You are missing the “2D” that comes after the word “Enter” when using 2D stuff.
So it becomes OnCollisionEnter2D