Hold Down Button

I’m making a FNaF game, and I am making my own ‘puppet’ how could I make a button that’ll slowly go down and then when I hold the button it’ll go up, and if it reaches nothing (i’ll make something happen’
Can someone help me with this? I have found no tutorials for this.

You can make something like:

        float value = 1;
        Update()
        {
            if(ButtonNotBeingPressed() )
                  value -= Time.deltaTime/10; 
              //it will take 10 seconds for the value to reach 0
             else if(value < 1) 
                   value+= Time.deltaTime / 3;
              // 3 seconds to reach value 1
        }