Powerup Script to increase speed

I need to know how to increase the movement speed of my player for a short amount of time after he touches a power up. No where on the forums have I found an answer yet. So how can I accomplish this? Here’s my script:

public class PowerupScript : MonoBehaviour {

	void OnTriggerEnter2D(Collider2D other)
	{
		if (other.tag == "Player"){
			Destroy (gameObject);
		}

		{

	  }
  }
}

You need to declare a public variable in ControllerScript, like for example :

private float coeffSpeedUp = 1.0;

Now you need to multiply every displacement your player make by this coefficient :

float move = Input.GetAxis ("Horizontal") * coeffSpeedUp;

For now these modicications won’t impact your game. You need to make some changes in your other script that is attached to your power up :

public class PowerupScript : MonoBehaviour {
 
    void OnTriggerEnter2D(Collider2D other)
    {
       if (other.tag == "Player"){
           ControllerScript playerScript = other.gameObject.GetComponent(ControllerScript); // not sure about the syntax here...
           if (playerScript)
           {
               // We speed up the player and then tell to stop after a few seconds
               playerScript.coeffSpeedUp = 1.5;
               playerScript.StopSpeedUp();
           }
           Destroy (gameObject);
       }
    }
}

Only one thing missing now : implement the method to stop the speed up after a few seconds into the ControllerScript :

void StopSpeedUp() {
    WaitForSeconds (2.5f); // the number corresponds to the nuber of seconds the speed up will be applied
    coeffSpeedUp = 1.0; // back to normal !
}

This code is not tested, tell me if you have problems.