Using a Key to Activate Camera Mouse Look

So I'm creating this third person game using the Third Person Controller script from Unity's 3D platform tutorial to move my character. I want to add on another feature which allows the player to hold down a specific key (for example the F-key) that will freeze the Third Person Controller (not allowing the player to move) and activate my mouse look script. What script would I need to do this?

function Update (){

if (Input.GetKey (KeyCode.F)){

GetComponent(" Put the script name over here ").enabled = false;

}

 }

hope it helps :) this will disable the script when the F key is pressed. the script above only disables the script. The script Below will allow you to on and off the script with the same key:

var OnScript : boolean = true; 

function Update()
{

if(Input.GetKey(KeyCode.F) && OnScript ){

GetComponent(AnimationScript).enabled = false;
OnScript = false; 

 }
 else if (Input.GetKey(KeyCode.F) && OnScript == false ){

 GetComponent(AnimationScript).enabled = true;

OnScript = true;

}
 }

it may look confusing but it is easy to under stand on the new script on top of the update function i have created a check box using a boolean. The check box will be set as true when you run the game and the player script will be enabled. if you press the F key once it will disable the script. You may notice underneath the line

                 **"  if(Input.GetKey(KeyCode.I) && OnScript ){"**

it says OnScript = false this is disabling the check box if it is off the script goes off. and if you press the F key again it will make the check box true again and the script will come back on. I hope this helps :)

if you have any questions regarding this script please ask :)

Try this :

  var OnScript : boolean = true; 

   function Update() {

     if(Input.GetKeyUp(KeyCode.K) && OnScript) {

       OnScript = false; 

        GetComponent(AnimationScript).enabled = false;
      }

      else if (Input.GetKeyUp(KeyCode.K) && !OnScript) {

       OnScript = true;

       GetComponent(AnimationScript).enabled = true;
      }
 }

the problem was using Input.GetKey()returns true while the user is holding the key. if you use Input.GetKeyUp() this would return true only when the user releases the key