Nice script! But one thing I noticed is that running in a diagonal direction (x and z) the character moves faster than just running in the x direction.
This project appears a bit dodgy. If you run into the blocks you seem to trigger like a current effect, where the player continues to get sucked in one direction. Please test.
I just needed it in C#, so I uploaded the translated script, I hope that's all right ^^