Boost Script Time problems

So I have a script in my game for a plane. And I want to give it a speed boost, which I have. But I just can’t figure out time vairables. soooo here’s my script. I’ts apparently wrong, because the update() function can’t coroutine. Any Ideas how to fix this?

    //speed variables  
    var speed = 5.0;  
      
    //boost variables  
    var boost = 1.0;  
    var strength = 1.0;  
    var boostLength = 5.0;  
    var boostReload = 10.0;  
    var hasBoost = false;  
    
    function Update () {  
    	//Sets Constant speed for Plane * Boost  
    	transform.Translate(0, 0, (Time.deltaTime * speed * strength));  
          
    if(Input.GetButtonDown("Boost")) {  
    	    if (hasBoost==false){  
    		    hasBoost = true;  
    	        strength +=boost;  
    		    //figure out time count down  
    			yield WaitForSeconds(boostLength);  
    			strength -=boost;  
    			yield WaitForSeconds(boostReload);  
    			hasBoost = false;  
    		}  
    	}  
}

Nevermind, I figured it out…

//Boost variables
var boost = 1.0;
var strength = 1.0;
var boostLength = 5.0;
var boostReloadTime = .5;
var boostLimit = 5.0;
var hasBoost = false;

//BOOOOOSSSSTTTTTTTTTT
	if(Input.GetButtonDown("Boost")) {
	    if (hasBoost==false){
		    hasBoost = true;
	        strength +=boost;
		}
	}
	
	if(hasBoost == true){
		if(boostLength > 0){
			boostLength -= 1 * Time.deltaTime;
		}
		else{
			strength -=boost;
			hasBoost = false;
		}
	}
	//Boost Reload
	if(hasBoost == false){
		if(boostLength < boostLimit){
			boostLength += boostReloadTime *Time.deltaTime;
		}
	}