Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. local HUD_POS = 1 -- 1 = Bottom Left, 2 = Top Left
  2. local HUD_W, HUD_H = 420, 175
  3. local HUD_USE_PRESTIGE = true
  4. local mat_err = Material("error")
  5.  
  6. local hmats = {
  7. ["hud_bg"] = {
  8. mat = mat_err,
  9. url = "aio/bg.png"
  10. },
  11. ["bar_inside"] = {
  12. mat = mat_err,
  13. url = "aio/bar_inside.png"
  14. },
  15. ["bar_main"] = {
  16. mat = mat_err,
  17. url = "aio/joepat.png"
  18. },
  19. ["bar_small"] = {
  20. mat = mat_err,
  21. url = "aio/joesmall.png"
  22. },
  23. ["bar_alt"] = {
  24. mat = mat_err,
  25. url = "aio/joe.png"
  26. },
  27. ["gold"] = {
  28. mat = mat_err,
  29. url = "aio/gold.png"
  30. }
  31. }
  32.  
  33. timer.Create("HUD_AIO_REFRESH", 5, 0, function()
  34. for k, v in pairs(hmats) do
  35. v.mat = Material(v.url)
  36. end
  37. end)
  38.  
  39. for k, v in pairs(hmats) do
  40. v.mat = Material(v.url)
  41. end
  42.  
  43. function SetupAvatar()
  44. if IsValid(h_avatar) then
  45. h_avatar:Remove()
  46. end
  47.  
  48. h_avatar = vgui.Create("AvatarImage")
  49. h_avatar:SetSize(80, 80)
  50. local w, h = HUD_W, HUD_H
  51. local x, y = 5, 0
  52.  
  53. if HUD_POS == 1 then
  54. y = ScrH() - h - 5
  55. elseif HUD_POS == 2 then
  56. y = 5
  57. end
  58.  
  59. h_avatar:SetPos(x + 5, y + h - 85)
  60. h_avatar:SetPlayer(ply, 70)
  61. h_avatar:ParentToHUD()
  62. end
  63.  
  64. local hp = 0
  65. local color_hp = Color(230, 0, 0)
  66. local armor = 0
  67. local color_armor = Color(0, 160, 220)
  68. local money = 0
  69. local xpPerc = 0
  70. local color_xp = Color(122, 200, 50)
  71.  
  72. surface.CreateFont("HUD_AIO_NAME", {
  73. font = "Enchanted Land",
  74. size = 38,
  75. antialias = true
  76. })
  77.  
  78. surface.CreateFont("HUD_AIO_JOB", {
  79. font = "Enchanted Land",
  80. size = 29,
  81. antialias = true
  82. })
  83.  
  84. surface.CreateFont("HUD_AIO_MONEY", {
  85. font = "Enchanted Land",
  86. size = 32,
  87. antialias = true,
  88. italicized = true
  89. })
  90.  
  91. for i = 5, 30 do
  92. surface.CreateFont("HUD_AIO_SMALL." .. tostring(i), {
  93. font = "Enchanted Land",
  94. size = i,
  95. antialias = true
  96. })
  97. end
  98.  
  99. hook.Add("HUDPaint", "HUD_AIO", function()
  100. local ply = LocalPlayer()
  101. surface.SetMaterial(hmats["hud_bg"].mat)
  102. surface.SetDrawColor(color_white)
  103. local w, h = HUD_W, HUD_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement