Translate code from C# to Javascript

Can someone please help translate this script? I’ve got this script from someone else, but I can only read unityjava. I’ve tryed something, but it’s not working yet…

GameMenu.cs

using UnityEngine;
using gui = UnityEngine.GUILayout;

public class GameMenu : MonoBehaviour
{
public GameObject PlayerPrefab;
string ip = “127.0.0.1”;

public void CreatePlayer()
{
    connected = true;
    var g = (GameObject)Network.Instantiate(PlayerPrefab, transform.position, transform.rotation, 1);
    g.camera.enabled = true;
    camera.enabled = false;
}
void OnDisconnectedFromServer()
{
    connected = false;
}
void OnPlayerDisconnected(NetworkPlayer pl)
{
    Network.DestroyPlayerObjects(pl);
}
void OnConnectedToServer()
{
    CreatePlayer();
}
void OnServerInitialized()
{
    CreatePlayer();
}
bool connected;
void OnGUI()
{
    if (!connected)
    {
        ip = gui.TextField(ip);
        if (gui.Button("connect"))
        {
            Network.Connect(ip, 1990);
        }
        if (gui.Button("host"))
        {
            Network.InitializeServer(10, 1990, false);
        }
    }
}

}

The only things that should really be different are the function headers and the stuff at the beginning. Try just creating a blank js file and see i you can translate it out. You might be surprised. Also defining variables will be different. All the unity specific stuff should be exactly the same.