How to make a Character run?

I wanted to know if anybody knew how to make it when i click the shift button on my keyboard my character would accelerate in a FPS?

at this to your fpswalker:

    var run = false;
    var timer : float = 0.0;

    if(Input.GetButton ("left shift"))
    {   
    speed = 30;
    run = true;
    }
if(run)
    {
    timer += Time.deltaTime;
    }
if(timer >= 5)
    {
    run = false;
    speed = 15;
    timer = 0;
    }

maybe you must set leftshift in you input i hope this helps