SHARE
TWEET

Untitled

a guest Apr 18th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local ColorGreen = AUGMENTATIONS.HUDGreenColor
  2. local TranslucentGreen = AUGMENTATIONS.HUDTranslucentGreenColor
  3. local TranslucentBlack = AUGMENTATIONS.HUDTranslucentBlackColor
  4. local GrayColor = AUGMENTATIONS.HUDGrayColor
  5. local MainColor = AUGMENTATIONS.MainColor
  6. local WhiteColor = AUGMENTATIONS.HUDWhiteColor
  7. local DarkGray = AUGMENTATIONS.HUDDarkGrayColor
  8. local BlueColor = AUGMENTATIONS.HUDBlueColor
  9. local RedColor = AUGMENTATIONS.HUDRedColor
  10. local BlueColorTranslucent = AUGMENTATIONS.HUDTranslucentBlueColor
  11.  
  12. local BarLerp = 0
  13. local traceBarLerp = 0
  14. local apBarLerp = 0
  15. local stamBarLerp = 0
  16. local velocity = 20
  17. local augEnergylerp = 0
  18. local aVelocity = 40
  19. local smooth = 0
  20. local smoothHunger = 0
  21. local smoothStam = 0
  22. local smoothTrace = 0
  23.  
  24. local hideTabl = {}
  25. hideTabl["CHudHealth"] = true
  26. hideTabl["CHudBattery"] = true
  27. hideTabl["CHudAmmo"] = true
  28. hideTabl["CHudSecondaryAmmo"] = true
  29. hideTabl["CHudCrosshair"] = true
  30. hideTabl["DarkRP_LocalPlayerHUD"] = true
  31. hideTabl["DarkRP_Hungermod"] = true
  32. hideTabl["DarkRP_EntityDisplay"] = true
  33. hideTabl["DarkRP_Agenda"] = true
  34. hideTabl["DarkRP_ArrestedHUD"] = true
  35. hideTabl["DarkRP_LockdownHUD"] = true
  36.  
  37.  
  38. if CLIENT then
  39. surface.CreateFont( "AmmoFont1", {
  40.     font = "Roboto",
  41.     size = ScrW() * 0.025,
  42.     weight = 100,
  43.     antialias = true,
  44.     extended = true,
  45. })
  46.  
  47. surface.CreateFont( "AmmoFont2", {
  48.     font = "Roboto",
  49.     size = ScrW() * 0.0183,
  50.     weight = 100,
  51.     antialias = true,
  52.     extended = true,
  53. })
  54.  
  55. surface.CreateFont( "MediumFont", {
  56.     font = "DeusEx",
  57.     size = ScrW() * 0.014 ,
  58.     weight = 100,
  59.     antialias = true,
  60.     extended = true,
  61.     shadow = true,
  62. })
  63.  
  64. surface.CreateFont( "DisplayFont", {
  65.     font = "DeusEx",
  66.     size = ScrW() * 0.012 ,
  67.     weight = 100,
  68.     antialias = true,
  69.     extended = true,
  70.     shadow = true,
  71. })
  72.  
  73. surface.CreateFont( "DisplayFont2", {
  74.     font = "DeusEx",
  75.     size = ScrW() * 0.008 ,
  76.     weight = 100,
  77.     antialias = true,
  78.     extended = true,
  79.     shadow = true,
  80. })
  81.  
  82.  
  83. surface.CreateFont( "WeaponNameFont", {
  84.     font = "Roboto",
  85.     size = ScrW() * 0.013,
  86.     weight = 100,
  87.     antialias = true,
  88.     extended = true,
  89. })
  90.  
  91. surface.CreateFont( "RadarFont", {
  92.     font = "DeusEx",
  93.     size = ScrW() * 0.006,
  94.     weight = 100,
  95.     antialias = true,
  96.     extended = true,
  97. })
  98.  
  99. surface.CreateFont( "DeusExFont", {
  100.     font = "DeusEx",
  101.     size = ScrW() * 0.007,
  102.     weight = 100,
  103.     antialias = true,
  104.     extended = true,
  105. })
  106.  
  107. surface.CreateFont( "NonAugmentFont", {
  108.     font = "CloseCaption_Bold",
  109.     size = ScrW() * 0.015,
  110.     weight = 1000,
  111.     antialias = true,
  112.     extended = true,
  113.     shadow = true,
  114. })
  115.     surface.CreateFont( "NonAugmentFont2", {
  116.     font = "CloseCaption_Bold",
  117.     size = ScrW() * 0.013,
  118.     weight = 1000,
  119.     antialias = true,
  120.     extended = true,
  121.     shadow = true,
  122. })
  123.  
  124. surface.CreateFont( "AgendaTitle", {
  125.     font = "DeusEx",
  126.     size = ScrW() * 0.009,
  127.     weight = 100,
  128.     antialias = true,
  129.     extended = true,
  130. })
  131. end
  132. local crosshairsizemul = 0
  133. hook.Add("EntityFireBullets", "AUGDetectAttack", function(ent, data)
  134.         crosshairsizemul = math.Clamp(crosshairsizemul + 1, 0, 3)
  135. end)
  136.  
  137.  
  138. hook.Add( "RenderScreenspaceEffects", "CyberPostProcess", function()
  139.     if (AUGMENTATIONS.EnableHUDandDataLink == false) then return end
  140.     if (AUGMENTATIONS.HUDPostProcess == false) then return end
  141.     local tab = {}
  142.  
  143.     tab[ "$pp_colour_brightness" ] = -0.07
  144.     tab[ "$pp_colour_contrast" ] = 1.18
  145.     tab[ "$pp_colour_colour" ] = 0.5
  146.     tab[ "$pp_colour_mulr" ] = 0
  147.     tab[ "$pp_colour_mulg" ] = 0
  148.     tab[ "$pp_colour_mulb" ] = 2
  149.  
  150.     DrawColorModify( tab )
  151.  end )
  152.  
  153.  
  154. hook.Add( "RenderScreenspaceEffects", "LowHP", function()
  155.     if (AUGMENTATIONS.EnableHUDandDataLink == false) then return end
  156.  
  157.     if LocalPlayer():Health() < 30 and LocalPlayer():GetNWInt("datalink") > 0 then
  158.     DrawMotionBlur( 0.4, 0.8, 0.01 )
  159.     DrawSharpen( 1.8 + math.random(-10, 16), 0.2 )
  160.     else
  161.         DrawSharpen( 1.8 , 0.1 )
  162.     end
  163.    
  164.     if LocalPlayer():GetNWInt("IsCloaked") == 1 then
  165.         DrawColorModify({
  166.             ["$pp_colour_colour"] = 0.3,
  167.             ["$pp_colour_mulg"] = 0,
  168.             ["$pp_colour_contrast"] = 1,
  169.             ["$pp_colour_brightness"] = 0.1
  170.         })
  171.          DrawToyTown( 2, ScrH()/2 )
  172.     end
  173.  end )
  174.  
  175. hook.Add("HUDShouldDraw","HideHUDElements",function(name)
  176.     if hideTabl[name] then
  177.         return false
  178.     end
  179. end)
  180.  
  181. local function getClip()
  182.     if LocalPlayer():GetActiveWeapon():IsValid() and LocalPlayer():GetActiveWeapon():Clip1() then
  183.         return LocalPlayer():GetActiveWeapon():Clip1()
  184.     else
  185.         return 0
  186.     end
  187. end
  188.  
  189. local function getAmmoType()
  190.     if IsValid(LocalPlayer():GetActiveWeapon()) and LocalPlayer():GetActiveWeapon():GetPrimaryAmmoType() then
  191.         if LocalPlayer():GetActiveWeapon().Base == "fas2_base" then
  192.             return LocalPlayer():GetActiveWeapon().Primary.Ammo
  193.         end
  194.         return LocalPlayer():GetActiveWeapon():GetPrimaryAmmoType() or 0
  195.     else
  196.         return 0
  197.     end
  198. end
  199.  
  200. local function getAmmo()
  201.     if IsValid(LocalPlayer():GetActiveWeapon()) and LocalPlayer():GetActiveWeapon():GetPrimaryAmmoType() then
  202.         return LocalPlayer():GetAmmoCount(getAmmoType())
  203.     else
  204.         return 0
  205.     end
  206. end
  207.  
  208. -- local fps = -1
  209. -- local ping = -1
  210. -- hook.Add("Think", "PingFPS", function()
  211.     -- if CurTime() > infoRefreshDelay then
  212.       -- infoRefreshDelay = CurTime() + 1
  213.       -- fps = math.Round(1/RealFrameTime())
  214.       -- ping = LocalPlayer():Ping()
  215.     -- end
  216. -- end)
  217.  
  218. local glitch = 0
  219. local function EnergyBar()
  220.     local Language = ALanguage[AUGMENTATIONS.Language]
  221.     local ply = LocalPlayer()
  222.    
  223.     local AEnergyP = ply:GetNWFloat("AugmentEnergy") or 0
  224.     local AEnergy = math.Clamp(AEnergyP, 0, 100)
  225.     augEnergylerp = Lerp(FrameTime() * velocity, augEnergylerp, AEnergy)
  226.    
  227.     local x = (ScrW() * AUGMENTATIONS.HUDEnergyPositionX) + glitch
  228.     local y = (ScrH() * AUGMENTATIONS.HUDEnergyPositionY) + glitch
  229.  
  230.     local w = ScrW() + glitch
  231.     local h = ScrH() + glitch
  232.    
  233.     local DrawEnergy = math.Clamp( math.Min(augEnergylerp / 100, 1), 0, 100)
  234.     --Aug Energy
  235.     surface.SetDrawColor(TranslucentBlack)
  236.     surface.DrawRect(x - 10, y + 2.5, w / 9, h / 35)
  237.     surface.SetDrawColor(GrayColor)
  238.     surface.DrawOutlinedRect(x - 10, y + 2.5, w / 9, h / 35)
  239.    
  240.     surface.SetDrawColor(BlueColor)
  241.     surface.SetMaterial(Material("hudelements/battery.png"))
  242.     surface.DrawTexturedRect(x + 165, y + 10, w / 70, h / 70)  
  243.    
  244.     draw.RoundedBox(0, x - 10, y + 2.5, w / 9, h / 35, BlueColorTranslucent)
  245.     draw.RoundedBox(0, x + 15, y + 15, w / 14 * DrawEnergy, h / 240, BlueColor)
  246.    
  247.     if AEnergyP >= 80 then
  248.     draw.RoundedBox(0, x + 130, y + 10, w / 70, h / 70, BlueColor)
  249.     end
  250.    
  251.     if AEnergyP >= 60 then
  252.     draw.RoundedBox(0,  x + 90, y + 10, w / 70, h / 70, BlueColor)
  253.     end
  254.    
  255.     if AEnergyP >= 40 then
  256.     draw.RoundedBox(0, x + 50, y + 10, w / 70, h / 70, BlueColor)
  257.     end
  258.    
  259.     if AEnergyP >= 20 then
  260.     draw.RoundedBox(0, x + 10, y + 10, w / 70, h / 70, BlueColor)
  261.     end
  262.    
  263.     if AEnergyP < 10 then
  264.         draw.DrawText(Language.OutOfEnergy, "MediumFont", x - 10 , y - 250, Color(math.Clamp(math.sin(RealTime() * 5) * 220, 75, 255), 25, 25), TEXT_ALIGN_LEFT)
  265.     end
  266. end
  267.  
  268. hook.Add("HUDPaint", "DrawElements", function()
  269.     local ply = LocalPlayer()
  270.     if ply:GetNWInt("datalink") > 0 then
  271.     if ( AUGMENTATIONS.HUDDrawEnergy == true ) then
  272.         EnergyBar()
  273.     end
  274.     end
  275. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top