Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GM:HUDPaint( )
- self.BaseClass:HUDPaint()
- local ply = LocalPlayer()
- local ob = ply:GetObserverTarget()
- if ob and IsValid(ob) and ob:IsPlayer() and ob:Alive() then
- draw.AAText( ob:Nick(), "Deathrun_SmoothBig", ScrW()/2, 5, Color(255,255,255,255), TEXT_ALIGN_CENTER)
- ply = ob
- draw_keys = true
- else
- draw_keys = false
- end
- if not keys[ply] then
- keys[ply] = {}
- end
- local hy = ScrH() - 35
- draw.RoundedBox( 0, hx, hy, hw, hh, Color( 44, 44, 44, 175 ) )
- draw.RoundedBox( 0, hx + border, hy + border, hw - border*2, hh - border*2, Color( 180, 80, 80, 255 ) )
- local thp = ply:Alive() and ply:Health() or 0
- local hp = thp
- if hp > 0 then
- hp = ( hw - border*2 ) * ( math.Clamp(ply:Health(),0,100)/100)
- draw.RoundedBox( 0, hx + border, hy + border, hp, hh - border*2, Color( 80, 180, 60, 255 ) )
- end
- draw.AAText( tostring( thp > 999 and "dafuq" or math.max(thp, 0) ), "Deathrun_SmoothBig", hx + 5, hy - 3, Color(255,255,255,255), TEXT_ALIGN_LEFT )
- surface.SetFont( "Deathrun_SmoothBig" )
- local rt = string.ToMinutesSeconds(self:GetRoundTime())
- local ttw, _ = surface.GetTextSize( rt )
- local tw = hw/2 + 5
- draw.WordBox( 4, tw - ttw/2, hy - 45, rt, "Deathrun_SmoothBig", Color( 44, 44, 44, 200 ), Color( 255, 255, 255, 255 ) )
- if draw_keys then
- local w, h = 25, 25
- local scrh = ScrH()/2 + h
- local center = ScrW()/2 - w/2
- local back_pos_y = scrh + h + 5
- local Keys = keys[ply] or {}
- surface.SetDrawColor( Color( 34, 45, 56, 50 ) )
- surface.DrawRect( center, scrh, w, h )
- surface.SetDrawColor( Color( 34, 45, 56, 200 ) )
- if Keys[IN_FORWARD] then
- surface.DrawRect( center, scrh, w, h )
- end
- surface.SetDrawColor( Color( 34, 45, 56, 50 ) )
- surface.DrawRect( center, back_pos_y, w, h )
- if Keys[IN_BACK] then
- surface.SetDrawColor( Color( 55, 66, 77, 200 ) )
- surface.DrawRect( center, back_pos_y, w, h )
- end
- surface.SetDrawColor( Color( 34, 45, 56, 50 ) )
- surface.DrawRect( center - w - 5, back_pos_y, w, h )
- surface.SetDrawColor( Color( 123, 123, 123, 200 ) )
- if Keys[IN_MOVELEFT] then
- surface.DrawRect( center - w - 5, back_pos_y, w, h )
- end
- surface.SetDrawColor( Color( 34, 45, 56, 50 ) )
- surface.DrawRect( center + w + 5, back_pos_y, w, h )
- surface.SetDrawColor( Color( 123, 123, 123, 200 ) )
- if Keys[IN_MOVERIGHT] then
- surface.DrawRect( center + w + 5, back_pos_y, w, h )
- end
- end
- local VEL = math.Round(LocalPlayer():GetVelocity():Length())
- surface.CreateFont( "MyFont", {
- font = "DefaultLarge",
- size = 50,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false
- })
- surface.CreateFont( "VelFont", {
- font = "DefaultLarge",
- size = 40,
- weight = 600,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- } )
- surface.SetTextColor( 46, 46, 254, 255)
- surface.SetTextPos( 950, 1008 )
- surface.SetFont( "MyFont" )
- surface.DrawText( VEL )
- hook.Add( "HUDPaint", "Velocity", function()
- draw.DrawText( "Velocity:", "VelFont", ScrW() * 0.457, ScrH() * 0.936, Color( 46, 46, 254, 255 ), TEXT_ALIGN_CENTER )
- end )
- function CoolHUD()
- draw.RoundedBox( 0, ScrW() * 0.4195, ScrH() * 0.973, (LocalPlayer():GetVelocity():Length()/130)*100,25,Color(46, 46, 254, 255))
- draw.RoundedBox( 4, ScrW() * 0.4195, ScrH() * 0.973, 500, 25, Color( 40, 40, 40, 120 ) )
- end
- hook.Add( "HUDPaint", "CoolHUD", CoolHUD )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement