How to make a functon run for a certain amount of time?

So i made a function in a pick up i made that lets the character “run” faster now im trying to make it that it runs for 5 seconds and then stops and goes to the “normal” characte speed.

Use timers:

Use it to turn on and off the running state