The details of the problem aren't language-specific, so it really shouldn't matter whether the code is in UnityScript or C#. At its most basic, the solution will just involve an 'if' statement (which both languages have) and the Input class (which is accessible via either language).
Specific functions to look into would include Input.GetKey() and Input.GetButton() (you could use either for this, depending on your preference).