On/Off script component in gameObject

Currently I’m learning to work in Unity program, appears to me the problem with switching on and off script component. I watched the tutorial http://unity3d.com/learn/tutorials/modules/beginner/scripting/enabling-disabling-components
I read the other questions that had a similar problem but i need help.

I want to enable/disable script on my Camera on Key or UIButton press.

using UnityEngine;
using System.Collections;

public class Changer1 : MonoBehaviour {

	private Camera myCamera;

	void Start () {
		myCamera = GetComponent<NameOfMyScript> ();
	}
	
	// Update is called once per frame
	void Update () {
		if(Input.GetKeyUp(KeyCode.Space))
		{
			myCamera.enabled = false;
		}
	}
}

I am getting an error CS0029: Cannot implicitly convert type ‘NameOfMyScript’ to 'UnityEngine.Camera

What am I doing wrong?
Please give me some hint?

Thanks in advance!

If you want to enable/disable a self written script u will have to use another variable type than Camera, since your variable ‘myCamera’ is currently only able to store Camera-components.
Try the following and be sure to swap every ‘NameOfMyScript’ with the actual name of your script.

 using UnityEngine;
 using System.Collections;
 
 public class Changer1 : MonoBehaviour {
 
     private NameOfMyScript myScript;
 
     void Start () {
         myScript= GetComponent<NameOfMyScript> ();
     }
     
     // Update is called once per frame
     void Update () {
         if(Input.GetKeyUp(KeyCode.Space))
         {
             myScript.enabled = false;
         }
     }
 }

This should fix the error but still won’t pose the toggle functionalty you asked for.
For that you have to replace your if statement with

if(Input.GetKeyUp(KeyCode.Space))
{
myScript.enabled = !myScript.enabled;
}

Edit 2:
A Unityscript(.js) version of the above script:

#pragma strict

var myScript : DepthOfFieldScatter;

function Start ()
{
     myScript = GetComponent(DepthOfFieldScatter);
}

function Update ()
{
    if(Input.GetKeyUp(KeyCode.Space))
    {
	myScript.enabled = !myScript.enabled;
    }
}