Change colour of int when reaches specific number

Hey guys, just wondering if you could help me out. I’m a bit of a freshy with JavaScript but I’m learning a lot quite quickly from you guys :slight_smile: What I am trying to do is change the colour of my integer when it reaches 10 (it starts on 100 and ticks down at a set rate). When the int reaches 10 I would like it to change to red from yellow. I already have the text printed on the screen and have tried several ways of implementing it but to no avail. Just wondering if you guys can show me the ropes with GUI :slight_smile: Here’s the code!

var speed : float = 3.0;
var rotateSpeed : float = 3.0;
var bulletPrefab:Transform;
var shotDelay = 2;
var status1 = "Loaded";
var fuel : float = 100.0;
var fuelDeduct = 2.0;
var percentage = "%";
var style : GUIStyle;

   function Start () {

    while (true) {
        while (!Input.GetButtonDown("Jump")) yield;
       bullet = Instantiate(bulletPrefab, GameObject.Find("SpawnPoint").transform.position, transform.rotation);
         bullet.tag = "bulletShot";
         status1 = "Reloading";
         bullet.rigidbody.AddForce(transform.forward * 5000);
        yield WaitForSeconds(shotDelay);
        status1 = "Loaded";
    }
}

function Update ()
{
    var controller : CharacterController = GetComponent(CharacterController);
    transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
    var forward : Vector3 = transform.TransformDirection(Vector3.forward); var curSpeed : float = speed * Input.GetAxis ("Vertical");
    controller.SimpleMove(forward * curSpeed);
    
        if(Input.GetKey("w") || Input.GetKey("s"))
    {
        fuel -= fuelDeduct * Time.deltaTime;
    }

if (fuel<0){
		Application.LoadLevel(0);
    }
    }
@script RequireComponent(CharacterController)





function OnGUI()
{

        GUI.Label(Rect(250, 70, 100, 20), status1, style);
        GUI.Label(Rect(250, 100, 100, 20), fuel.ToString("f0") + percentage, style);
   		GUI.Label(Rect(150, 100, 100, 20), "FUEL:", style);
   		
   		if (fuel<10){
	**********************
	}
}  


Ignore the majority of it, but where the **** are is where I believe the code should be, can anyone help me out a little? Thank you :) I've been at it for a while.

Additional information: Script name : Movement.js

One way is to have two ‘style’ instead of one, set the other one to have the different color for normal text, then use it instead when the count reaches 10