Attach existing Unity Pro sript into a button

Can I attach GrayscaleEffec on to a camera button. As you can tell I am new,…

using UnityEngine;

public class BWButton : MonoBehaviour {
    void OnGUI () {
        if(GUI.Button(new Rect(20,40,80,20), "Night"))
            Get GrayScale = GetComponent("GrayscaleEffect");
    }
}

OK, thanks, I appreciate all the responses, I have it now!