Problems with Player Health Script C#

Hey Guys I have got a C# Sharp Health Script that does that my Player has got 10 Lives if he collides with an Enemy one live will be deleted from his 10 Lives. But the problem is that the player can´t see his lives or anything. I dont know how I could make a Health Bar that will show the player how many lives he has at the moment. Could somebody maybe add that to the Script that would be sooo nice!

Heres the code:

using UnityEngine;
using System.Collections;

public class HealthController: MonoBehaviour {
public float currentHealth = 10;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	void ApplyDamage(float damage)
	{
	if (currentHealth > 0)
		{
			currentHealth -= damage;
			
			if(currentHealth < 0)
				
			currentHealth= 0;
		
		if (currentHealth == 0)
		{
		//GameOver?	
		RestartScene();
		}

	}
}
void RestartScene()
{
	Application.LoadLevel (Application.loadedLevel);
}
	
	
}

As a simple start for testing, add the following to your script:

void OnGUI()
{
   GUILayout.Label("HEALTH" + currentHealth);
}
using UnityEngine;
using System.Collections;

public class HealthController: MonoBehaviour 
{
    public float currentHealth = 10;

    void ApplyDamage(float damage)
    {
        if (currentHealth > 0)
        {
            currentHealth -= damage;
            if(currentHealth < 0)
                currentHealth= 0;
    
            if (currentHealth == 0)
            {
                //GameOver? 
                RestartScene();
            }
        }
    }
    void RestartScene()
    {
        Application.LoadLevel (Application.loadedLevel);
    }



    void OnGUI()
    {
        if(currentHealth > 0)
        {
            for(int i = 0; i < currentHealth; i++)
            {
                //Create a box that represents one of the lives..
                GUI.Box(new Rect(10+(i*21), 10, 20, 20), "");
            }
        }
    }
}

Thx that helped me out :smile: