how to put a timer on my game

this is how it goes. How will I be able to implement a timer that will trigger a specific action. for example. I have timer, when it reach 0 seconds a gui button will appear. I know to implement gui’s but dont know how to put the timer that will trigger ta appearance of the gui and after it reach 0 seconds it will become 10 seconds again and it will count down again . any help? thanks

You could do something like this:

var countdown : float;

private var showButton = false;

function Update() {
    if(!showButton){
        countdown -= Time.deltaTime;
    
        if(countdown <= 0){
            showButton = false;
        }
    }

}

function OnGUI() {
    if(showButton){
        //Button
    } else {
        //Show Countdown
    }
}