turn on and off gameobject with one button

I have an object that I want to be able to turn on and off with an oculus controller, I have another script that works but uses two different buttons. Is there a way to do it with one button? Here is the code I tried it only turns it off.

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using OVRTouchSample;

public class ScreenSwitch2 : MonoBehaviour
{

public GameObject SCREEN;

void Start() {
        SCREEN.gameObject.SetActive(true); 
        if (OVRInput.Get(OVRInput.RawButton.Y)){

     if (SCREEN != false) SCREEN.gameObject.SetActive(false);     
}
}
void Update()
{
    if (OVRInput.Get(OVRInput.RawButton.Y)){

     if (SCREEN != true) SCREEN.gameObject.SetActive(true);
    
   
     }

}

}

Checking SCREEN == true or SCREEEN == false doesn’t really make sense because SCREEN is a gameobject. I would try something more like this -

public class ScreenSwitch2 : MonoBehaviour {

        public GameObject SCREEN;

        private bool screenActive;

        void Start () {
            screenActive = true;
            SCREEN.SetActive(true);
        }

        void Update () {
            if (OVRInput.Get (OVRInput.RawButton.Y)) {
                screenActive = !screenActive;
                SCREEN.SetActive(screenActive);
            }
        }

public void OnAndOff()
{
if (!object1.activeInHierarchy)
{
object1.SetActive(true);
}
else
{
object1.SetActive(false);
}
}