On Press Change script?

Ok what I am trying to do is that when I press on a button it changes the script of another button.

Like, if button 1 has the script “On press Gotoandplay 4”, and you press button 2, it will change button 1’s script to “On press GotoandStop 5”.

THANKS :D!