----------------------------------------------
--Made by: XxLMM13xXgaming
----------------------------------------------
--[[ Getting rid of the old HUD ]]--
function HUDHide( myhud )
for k, v in pairs{"CHudHealth","CHudBattery"} do
if myhud == v then return false end
end
end
hook.Add("HUDShouldDraw","HudHide",HUDHide)
--[[ Making the words/boxes ]]--
--[[ Font ]]--
surface.CreateFont("TheDefaultSettings", {
font = "Arial",
size = 20,
weight = 500,
blursize = 0,
scanlines = 0,
antialias = true,
underline = false,
italic = true,
strikeout = false,
symbol = false,
rotary = false,
shadow = false,
additive = false,
outline = false,
})
function HUDPaint()
local ply = LocalPlayer()
local HP = LocalPlayer():Health()
local ARM = LocalPlayer():Armor()
surface.SetTextColor( 0, 0, 0, 255 )
surface.SetTextPos( 125, 638 )
surface.SetFont( "TheDefaultSettings" )
surface.DrawText( "HP: "..HP)
end
function LMMHUD()
local ply = LocalPlayer()
local HP = ply:Health()
local ARM = ply:Armor()
draw.RoundedBox( 10, 50, ScrH() - 140, 275, 125, Color( 94, 94, 94, 255 ) )
--Health Box +
draw.RoundedBox( 4, 90, ScrH() - 130, 200, 25, Color( 40, 40, 40, 150 ) )
draw.RoundedBox( 4, 90, ScrH() - 130, math.Clamp( HP, 1, 100 )*2, 25, Color( 255, 0, 0, 255 ) )
draw.RoundedBox( 4, 90, ScrH() - 130, 200, 50, Color( 40, 40, 40, 150 ) )
draw.RoundedBox( 4, 90, ScrH() - 105, math.Clamp( ARM, 1, 100 )*2, 25, Color( 0, 0, 255, 255 ) )
end
hook.Add( "HUDPaint", 'HUDPaint', HUDPaint )