-- LUA Script - by Dvader -- Custom HUD function custom_hud_init(e) HideHuds() HUD=0 keycheck=0 respawned=0 cursor_im=LoadImage ( "scriptbank\\images\\healthbar\\health.png" ) end function custom_hud_main(e) PlayerDist = GetPlayerDistance(e) if respawned==0 then respawned=1 initialhealth=g_PlayerHealth end if g_Scancode==41 and HUD==0 and keycheck==0 then HUD=1 keycheck=1 cursor_sp=CreateSprite ( cursor_im ) end if HUD==1 then Text(1,1,6,"Health "..math.floor(g_PlayerHealth/10)) SetSpritePosition ( cursor_sp , 1 , 4 ) SetSpriteSize( cursor_sp,g_PlayerHealth/(initialhealth/10),3) end if g_Scancode==41 and HUD==1 and keycheck==0 then DeleteSprite(cursor_sp) HUD=0 keycheck=1 end if keycheck==1 and g_Scancode==0 then keycheck=0 end --Text(50,90,6,g_MouseX.." "..g_MouseY) --Text(50,90,6,g_Scancode) end