Simple run/sprint with shift key + animations

Another way you may do it is to decrease your speed gradually when you release the run modifier key (usually shift). Take your current speed, drop it a few notches, wait 0.2 seconds or so, repeat until you are back at your normal speed. Make it a function, put it in a Timer and you’ll be all set with a gradual sprint to run or run to walk or sprint to walk or whatever.

The speed control is easy, as for the animations you will have to set that up yourself like Commander Shepard said.