
let lifebar = GetCurrentScriptDirectory ~ "ef\lifebar.png";
LoadGraphic(lifebar);
task Lifebar{
loop(GetLife){
SetTexture(life);
SetRenderState(ALPHA);
SetGraphicAngle(0,0,atan2(GetY-GetY-50*sin(lifeamt+90),GetX-GetX-50*cos(lifeamt-90)));
SetGraphicScale(1.2,1.2);
SetGraphicRect(0, 0, 5, 2);
SetAlpha(140);
SetColor(255,255,255);
DrawGraphic(GetX-50*cos(lifeamt-90), GetY-50*sin(lifeamt+90));
lifeamt += 360/360;
}
loop(72){
SetTexture(life);
SetRenderState(ALPHA);
SetGraphicAngle(0,0,atan2(GetY-GetY-50*sin(lifetot+90),GetX-GetX-50*cos(lifetot-90)));
SetGraphicScale(1.2,1.2);
SetGraphicRect(5, 0, 9, 4);
SetAlpha(255);
SetColor(255,255,255);
DrawGraphic(GetX-50*cos(lifetot-90), GetY-50*sin(lifetot+90));
lifetot += 360/72;
}

SetTexture(life);
SetRenderState(ALPHA);
SetGraphicAngle(0,0,atan2(GetY-GetY-50*sin(30),GetX-GetX-50*cos(30))+90);
SetGraphicScale(1.2,1.2);
SetGraphicRect(9, 0, 14, 6);
SetAlpha(255);
SetColor(255,255,255);
DrawGraphic(GetX-50*cos(30), GetY-50*sin(30));


lifeamt = 0;
lifetot = 0;
SetGraphicAngle(0,0,0);
		yield;
	}