Deactivating a power up script after a certain amount of time

Hello I’m working on a simple power up script that allows the user to click on a button to slow down the movement of the player.
Here’s the script I’m using:

var mySkin : GUISkin;
function OnGUI () {
	
	GUI.skin = mySkin;    
	
	if (GUI.Button (Rect (10, 50, 80, 30), "Slow Down")) {
	var script4 = GetComponent("Movement"); 
    script4.enabled = false;
    var script5 = GetComponent("Movement - Easier"); 
    script5.enabled = true;
	}
}

What’s got me stumped is how to make the power up script only activate for a certain amount of time before it becomes deactivated and the player’s movement goes back to normal.

Thank you for any answers or feedback. -Ben

You can use coroutine like

var mySkin : GUISkin;
function OnGUI () {

    GUI.skin = mySkin;    

    if (GUI.Button (Rect (10, 50, 80, 30), "Slow Down")) {
        StartCoroutine( SlowDown( 2.0 ) );// deactivate for 2 secs
    }
}

function SlowDown( float deactivateInSeconds )
{
    var script4 = GetComponent("Movement"); 
    script4.enabled = false;
    var script5 = GetComponent("Movement - Easier"); 
    script5.enabled = true;
    
    yield WaitForSeconds( deactivateInSeconds );

    script5.enabled = false;
    script4.enabled = true;

}