convert c# to javascript

hi guys, can you help me to convert this to Javasript?? coz i don’t know how to get the score from different script… thanks in advance…

using UnityEngine;
using System.Collections;

public class GameControlScript : MonoBehaviour {
   
    public GUISkin skin;
    float timeRemaining = 500;
    float timeExtension = 3f;
    float timeDeduction = 2f;
    float totalTimeElapsed = 0;
    float score=0f;
    public bool isGameOver = false;
   
    void Start(){
        Time.timeScale = 1;  // set the time scale to 1, to start the game world. This is needed if you restart the game from the game over menu
    }
   
    void Update () {
        if(isGameOver)
            return;
       
        totalTimeElapsed += Time.deltaTime;
        score = totalTimeElapsed*100;
        timeRemaining -= Time.deltaTime;
        if(timeRemaining <= 0){
            isGameOver = true;
        }
    }
   
    public void PowerupCollected()
    {
        timeRemaining += timeExtension;
    }
   
    public void AlcoholCollected()
    {
        timeRemaining -= timeDeduction;
    }
   
    void OnGUI()
    {
        GUI.skin=skin; //use the skin in game over menu
        //check if game is not over, if so, display the score and the time left
        if(!isGameOver)   
        {
            //GUI.Label(new Rect(10, 10, Screen.width/5, Screen.height/6),"TIME LEFT: "+((int)timeRemaining).ToString());
            GUI.Label(new Rect(Screen.width-(Screen.width/10), 10, Screen.width/10, Screen.height/10), "SCORE: "+((int)score).ToString());
        }
        //if game over, display game over menu with score
        else
        {
            Time.timeScale = 0; //set the timescale to zero so as to stop the game world
           
            //display the final score
            GUI.Box(new Rect(Screen.width/4, Screen.height/4, Screen.width/2, Screen.height/2), "GAME OVER\nYOUR SCORE: "+(int)score);
           
            //restart the game on click
            if (GUI.Button(new Rect(Screen.width/4+10, Screen.height/4+Screen.height/10+10, Screen.width/2-20, Screen.height/10), "RESTART")){
                Application.LoadLevel(Application.loadedLevel);
            }
           
            //load the main menu, which as of now has not been created
            if (GUI.Button(new Rect(Screen.width/4+10, Screen.height/4+2*Screen.height/10+10, Screen.width/2-20, Screen.height/10), "MAIN MENU")){
                Application.LoadLevel(0);
            }
           
            //exit the game
            if (GUI.Button(new Rect(Screen.width/4+10, Screen.height/4+3*Screen.height/10+10, Screen.width/2-20, Screen.height/10), "EXIT GAME")){
                Application.Quit();
            }
        }
    }
}

Try giving this a shot…

i got this error…
No appropriate version of ‘UnityEngine.GUI.Label’ for the argument list ‘(UnityEngine.Rect, float)’ was found.
coz i’m getting a float not a variable… how to fix this??

What is the line of C# code ?
What is your line of UnityJs code ?

What do you expect the parameters should be for UnityEngine.GUI.Label ?

Learn this first in whatever language you prefer. You won’t get far without understanding the mysteries of GetComponent.

This script is so trivial that you would be better off writing it from scratch in your preferred language. There is also no reason to use OnGUI anymore. Why not do yourself a favour and switch to the latest UI tools?

Just posted this question and answer yesterday about how to call methods and get/set variables that are in another script (in C#):