How do I make a pause menu?

I have no idea how to make a pause menu. I want to make my game have a cursor lock but have the ability to unlock it by pausing. I use javascripts but C# and the others are fine if needed

Well, you can unlock the cursor anytime with Screen.lockCursor = false; As for the menu, I guess taking a look at GUI in the docs might be enough.

copy and paste that code then apply it to the button

http://unity3d.com/support/documentation/ScriptReference/Screen-lockCursor.html

You can also just hide the cursor and show it on your pause menu :

Screen.showCursor = false;
Screen.showCursor = true;