Advertisement
Guest User

nig

a guest
Jan 12th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. surface.CreateFont( "Black", {
  8. font = "Arial",
  9. size = 25,
  10. } )
  11. surface.CreateFont( "Bllack", {
  12. font = "Arial",
  13. size = 60,
  14. } )
  15. surface.CreateFont( "BBlack", {
  16. font = "Arial",
  17. size = 80,
  18. } )
  19.  
  20. local ply = LocalPlayer()
  21.  
  22.  
  23.  
  24. if ply:Alive() then
  25. local healthStatus = "Healthy";
  26. local hp = ply:Health()
  27. local armor = ply:Armor()
  28. local localplayer = LocalPlayer()
  29. local nick, plyTeam = localplayer:Nick(), localplayer:Team()
  30. local money = LocalPlayer():getDarkRPVar("money")
  31. local salary = LocalPlayer():getDarkRPVar("salary")
  32. local gunlisc = LocalPlayer():getDarkRPVar("HasGunlicense")
  33.  
  34. if (hp < 1) then healthStatus = "Unconcious"
  35. elseif (hp < 20) then healthStatus = "Critically Injured"
  36. elseif (hp < 40) then healthStatus = "Majorly Injured"
  37. elseif (hp < 60) then healthStatus = "Badly Injured"
  38. elseif (hp < 80) then healthStatus = "Mildly Injured"
  39. elseif (hp < 90) then healthStatus = "Slightly Injured"
  40. elseif (hp < 100) then healthStatus = "Slightly Bruised"
  41. end
  42.  
  43. local percent = hp / 100
  44.  
  45. local hpcolor = math.Clamp(percent * 255, 0, 255)
  46.  
  47. local percent2 = armor / 100
  48.  
  49.  
  50. local color2 = math.Clamp(percent2 * 255, 0, 255)
  51.  
  52.  
  53. hook.Add( "HUDPaint", "HUDPaint_DrawABox", function()
  54.  
  55. timer.Simple(1, function() draw.SimpleText(healthStatus,"Black",0,0,Color(255,255,255,255))end );
  56. end)
  57.  
  58. hook.Add("HudPaint" , "DrawMyHud" , function()
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. end)
  79. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement