Using Getkey but holding it instead,how do you make a Getkey thing that if you hold the button and it will work

You see what I want to do is, you know how if you use get key in scripting you have to press the key to do specific task, I want to hold the key and still be able to use it, If there is a answer pls reply?,What I mean is that if you make a Getkey pressed thing, you have to press the key that you said to do a specific task but I want to it so that you have to hold the key instead of pressing it, Can you please help?

There are 2 ways of going about this, the first being the way @ADiSiN and @tadadosi mentioned, and the second being, I suppose, the easiest to visualize for more novice users. Reverting back like you mention is specific to your use case as you may or may not need it.

Method 1:

private void Update()
 {
     //Set bool state of the key
     bool isHolding = Input.GetKey(Keycode.Space);

     if (isHolding)
           {
	            //Stuff
           }

     if (!isHolding)
           {
	            //Revert Stuff
           }
 }

Method 2:

private void Update()
{
	if (Input.GetButtonDown("Space"))
		{
		   //Stuff
		}

	if (Input.GetButtonUp("Space"))
		{
		   //Revert
		}
 }