hp bar/begingroup

Hi, i have a problem over here. I am making a hp bar. The following code shows the hpbar texture being covered as hp is decreasing.

But it is decreasing from right to left. What I need was to get the hp bar decrease from left to right? Any idea how to get it done? Thanks

var hpBar1 : Texture2D;

function OnGUI()
{
	GUI.BeginGroup(Rect(50, 50, hp1 * hpBar1.width, hpBar1.height));
	GUI.Label(Rect(0, 0, hpBar1.width, hpBar1.height), hpBar1);
	GUI.EndGroup();
}

You need to decide on a horizontal position for the bar’s right hand side. Then, subtract the width of the bar from this and use that as the value for the bar’s left hand side:-

var barWidth: float = hp1 * hpBar1.width;
var barRect: Rect = new Rect(rightPos - barWidth, 50, barWidth, hpBar1.height);
   ...