Well, I believe their is a function on GM (A drag and drop one.) which is Friction, I came across it in a few tutorials at Yoyogames.com by Mark Overmars, when the character stops moving, he/she slides a little bit on the floor, if I remember. Setting it to just 2 doesn't matter, cause it'll make you slide -2 aswell.
The code that could slow retract speed is if(speed < 2) speed = min(2,speed+0.4), but this is for accelerating, instead of deaccelerating, so you'd just have to flip a few things around to get it to gradulally slow down, I use to have this script in one of my games, but I don't remember which ones, sadly.
I believe it was Friction that handled this, but, you can also make Gravity do this aswell. (Highly unrecommended, but it's worth a shot.)
Edit: You could also use that "Able to change direction" variable to your advantage, since when Link is slipping on ice, and you suddenly go down or up, he stays in that same frame for a second then changes direction.
Edit2: Slight mistake on my part.