Game dosen't pause

I am making a pause script and i am using the first person controller. when ever I hit the key I set for pause, the game for some reason doesn’t pause. Here is the code :

`var paused : boolean = false;

function Start ()
{
Screen.showCursor = false;
}

function Update()
{
if (Input.GetKeyDown(KeyCode.Escape) && !paused)
{
Screen.lockCursor = false;
Time.timeScale = 0;
paused = true;
Debug.Log(“paused”);
}
else
{
Screen.lockCursor = true;
Time.timeScale = 1;
paused = false;
Debug.Log(“paused”);
}
}`

try this if (Input.GetKeyDown("escape")