Turns out it actually works
var _v = keyboard_check(ord("S")) - keyboard_check(ord("W"));
var _h = keyboard_check(ord("D")) - keyboard_check(ord("A"));
direction = point_direction(0, 0, _h, _v);
if ((_v != 0) or (_h != 0)) {
spd = lerp(spd, spd_max, 0.2);
} else {
spd = 0;
}
spd_final = spd + spd_f;
spd_f = spd_final - floor(abs(spd_final))*sign(spd_final);
spd_final -= spd_f;
movement_and_collision(direction, spd_final, "Walls");
btw, its a fantastic script the one you made PixelatedPope