Gamespider! Really good cleaning up of the code. It is quite messy and buggy, it was my first attempt at a movement script like that.

The difference between:
if(movement_mode==2) and if (movement_mode==12)

I think I used one for climbing up when you were at the top of a ladder and the other was for climbing up if you had grabbed onto a ledge, as there may have been slightly different behaviour and different code for each if statement.

The (movement_mode == 3), I think I added that to stop the player getting stuck in certain circumstances or just so it can work in with whatever animation may be used. I think it was meant to move the player forward when it nears the top of pulling itself up onto a ledge.

But if you can understand this code, how it is working, and be able to clean it up like that, you are on your way to doing some great stuff. Soon you'll be making code alot better than that 8)