How to make a player climb the wall?

How would i make a player climb a wall. For example if i have a cube as a player and a wall dead ahead if the player collides with the wall i want the players input to change so if they press up the player will go on the wall if the player presses down the player will go down and left and right. can some one please start me off and then i will be able to pick it up from there. I would be really happy if some one could just make code for the climbing up part after that i can implement and bring in the left right down and etc thank you in an advance :)

Check this question out, I asked it a while back and I got a good answer: