Turn on/off on same key press

Ok i have this script that does that i can hide when im in the tigger collider at a closet. It turns off the different components so you cant walk, the sprite is turned off and the collider. All that happens when i press “e”. But i want all the components to go back again when i press “e”. How do i do that?

Script:

if(hide == true && Input.GetKey("e"))
{

 
  
//Collider
gameObject.Find("Graphic").GetComponent(BoxCollider2D).enabled = false;
//Sprite
gameObject.Find("Graphic").GetComponent(SpriteRenderer).enabled = false;
//Controls
gameObject.Find("Hubert").GetComponent(PlayerControl).enabled = false;
Debug.Log("Invisible");

{
//Then press "e" again and they get turned on again.
//Collider
gameObject.Find("Graphic").GetComponent(BoxCollider2D).enabled = true;
//Sprite
gameObject.Find("Graphic").GetComponent(SpriteRenderer).enabled = true;
//Controls
gameObject.Find("Hubert").GetComponent(PlayerControl).enabled = true;
}
}



}

If(Input.GetKey(“e”)){
if(hide){
// put your hide lines in here
}else{
// put your unhide lines in here
}
}

did you put this script on the same script that you disabled? (PlayerControl)

If(Input.GetKey(“e”)){

 hide = !hide;         //<===========Try this.

 if(hide){
      // put your hide lines in here
 }else{
      // put your unhide lines in here
 }

}