Health GUI Problem

Hello all,

I currently have a gui with my textures in. They work fine except for the fact when the players health starts to go down the gui should only shrink on the x value however it is completely resizing in order to keep its aspect ratio.

   function OnGUI()
{   
    var lifefullsizeX = Screen.width/size.x;
    // draw the background:
    GUI.BeginGroup (new Rect (Screen.width/pos.x, Screen.height/pos.y, Screen.width/size.x, Screen.height/size.y));
    GUI.Box (Rect (0,0, Screen.width/size.x, Screen.height/size.y),progressBarEmpty);
    // draw the filled-in part:
    GUI.BeginGroup (new Rect (0, 0, Screen.width/size.x, Screen.height/size.y));
    GUI.Box (Rect (0,0, lifefullsizeX*(life/100), Screen.height/size.y),progressBarFull);

    GUI.EndGroup ();
    GUI.EndGroup ();

How do i fix this? either by telling it to ignor its aspect ratio or by some other method? stupid thing is we got it to work on an old project.

function OnGUI()
{

    //draw character frame background shading
    GUI.BeginGroup (new Rect (backpos.x, backpos.y, backsize.x, backsize.y));
    GUI.Box (Rect (0,0, backsize.x, backsize.y),lifeFrameShadow);

    // draw the heath bar background:
    GUI.BeginGroup (new Rect (pos.x, pos.y, size.x, size.y));
    GUI.Box (Rect (0,0, size.x, size.y),progressBarEmpty);

    // draw the filled-in part:
    GUI.BeginGroup (new Rect (0, 0, size.x * (PLAYERLIFE/100), size.y));
    GUI.Box (Rect (0,0, size.x, size.y),progressBarFull);

    GUI.EndGroup ();
    GUI.EndGroup ();
    GUI.EndGroup ();

http://answers.unity3d.com/questions/328/how-do-i-make-a-progress-bar

try this

var progressBarFull : Texture2D;
var pos : Vector2 = new Vector2 (10,10);
var size : Vector2 = new Vector2 (10,10);

GUI.DrawTexture (Rect (pos.x,pos.y, size.x*(lifebar/100), size.y),progressBarFull,ScaleMode.StretchToFill);