C# to Java Script Conversion

I have this line of code… What would it be in Java Script:

	Application.LoadLevel("Character Generation");

I also would like to be able to click a text, and it would activate this. What would be the function… OnMouseClick?

In the documentation you can see that the line of code that you provided, is exactly the same as used in javascript. (http://docs.unity3d.com/Documentation/ScriptReference/Application.LoadLevel.html)

The text you want to click, is that GUI text? If that is the case, you would use the OnGUI function:

function OnGUI () {
    if (GUI.Button (Rect (10,10,150,100), "Text"))
        print ("You clicked the text!");
}

This creates a box with your text. If you don’t like the box around your text, you can create a GUI Skin and remove the background under the menu Button and then assigning the GUI Skin to your button like this:

var myGUISkin : GUISkin;

function OnGUI () {
	GUI.skin = myGUISkin;
    if (GUI.Button (Rect (10,10,150,100), "Text"))
        print ("You clicked the text!");
}

Documentation can be found here:
http://docs.unity3d.com/Documentation/ScriptReference/GUI.Button.html?from=MonoBehaviour

In Javascript that would be written as:

Application.LoadLevel("Character Generation");