Advertisement
quintosh

integra

Dec 24th, 2011
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 29.40 KB | None | 0 0
  1. include('includes/compat.lua')
  2. include('includes/util.lua')
  3. include('includes/util/sql.lua')
  4. require('concommand')
  5. require('saverestore')
  6. require('gamemode')
  7. require('weapons')
  8. require('hook')
  9. require('timer')
  10. require('schedule')
  11. require('scripted_ents')
  12. require('player_manager')
  13. require('numpad')
  14. require('team')
  15. require('undo')
  16. require('cleanup')
  17. require('duplicator')
  18. require('constraint')
  19. require('construct')   
  20. require('filex')
  21. require('vehicles')
  22. require('usermessage')
  23. require('list')
  24. require('cvars')
  25. require('http')
  26. require('datastream')
  27. require('draw')
  28. require('markup')
  29. require('effects')
  30. require('killicon')
  31. require('spawnmenu')
  32. require('controlpanel')
  33. require('presets')
  34. require('cookie')
  35.  
  36. include('includes/util/model_database.lua')
  37. include('includes/util/vgui_showlayout.lua')
  38. include('includes/util/tooltips.lua')
  39. include('includes/util/client.lua')
  40.  
  41. local math = math
  42. local string = string
  43. local debug = debug
  44. local table = table
  45. local pcall = pcall
  46. local error = error
  47. local ErrorNoHalt = ErrorNoHalt
  48. local MsgN = MsgN
  49. local Msg = Msg
  50. local print = print
  51. local surface = surface
  52. local util = util
  53. local type = type
  54. local RunConsoleCommand = RunConsoleCommand
  55. local CreateClientConVar = CreateClientConVar
  56. local _R = _R
  57. local _G = _G
  58.  
  59. local aiming = false
  60. local target = nil
  61. local xrayents = {}
  62. local integra = {}
  63.     integra.modules = {}
  64.  
  65. // Derma used
  66. local IDerma = {}
  67. IDerma.CreateDFrame = function(parent)
  68.     local Frame = vgui.Create("DFrame", parent)
  69.         Frame:SetSize(100, 20)
  70.         Frame:SetPos(10, 10)
  71.         Frame.Paint = function(self)
  72.             surface.SetDrawColor(Color(0, 0, 0, 192))
  73.             surface.DrawRect(0, 0, self:GetWide(), self:GetTall())
  74.             surface.SetDrawColor(Color(0, 0, 0, 96))
  75.             surface.DrawRect(0, 0, self:GetWide(), 22)
  76.         end
  77.     return Frame
  78. end
  79. IDerma.CreateDPanel = function(parent)
  80.     local Panel = vgui.Create("DPanel", parent)
  81.         Panel.Paint = function(self)
  82.             surface.SetDrawColor(Color(0, 0, 0, 192))
  83.             surface.DrawRect(0, 0, self:GetWide(), self:GetTall())
  84.             surface.SetDrawColor(Color(192, 192, 192, 16))
  85.             surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
  86.         end
  87.     return Panel
  88. end
  89. // End of used derma
  90.  
  91. local function INT_AddModule(mod)
  92.     if mod.ConVar != nil then
  93.         if mod.ConVar != "" then
  94.             CreateClientConVar("int_" .. mod.ConVar .. "_enabled", 1, true, false)
  95.         end
  96.     end
  97.     local obj = {}
  98.         obj.Title = mod.Title or "Unknown"
  99.         obj.ConVar = mod.ConVar or ""
  100.         obj.Init = mod.Init or function() end
  101.         obj.Reload = mod.Reload or function() end
  102.         obj.Paint = mod.Paint or function() end
  103.         obj.UsePaint = mod.UsePaint or false
  104.         obj.Think = mod.Think or function() end
  105.         obj.UseThink = mod.UseThink or false
  106.         obj.RenderScreenspaceEffects = mod.RenderScreenspaceEffects or function() end
  107.         obj.UseRenderScreenspaceEffects = mod.UseRenderScreenspaceEffects or false
  108.     table.insert(integra.modules, obj)
  109. end
  110.  
  111. local function INT_InBounds(value, min, max)
  112.     if value >= min and value <= max then
  113.         return true
  114.     else
  115.         return false
  116.     end
  117. end
  118.  
  119. local function INT_IsModEnabled(mod)
  120.     if mod.ConVar != nil then
  121.         if mod.ConVar != "" then
  122.             if GetConVar("int_" .. mod.ConVar .. "_enabled"):GetBool() then
  123.                 return true
  124.             else
  125.                 return false
  126.             end
  127.         else
  128.             return true
  129.         end
  130.     end
  131.     return true
  132. end
  133.  
  134. local function INT_AddModConfig(mod, config, default)
  135.     if mod.ConVar != nil then
  136.         if mod.ConVar != "" then
  137.             CreateClientConVar("int_" .. mod.ConVar .. "_" .. config, default or 0, true, false)
  138.         end
  139.     end
  140. end
  141.  
  142. local function INT_GetModConfig(mod, config)
  143.     if mod.ConVar != nil then
  144.         if mod.ConVar != "" then
  145.             if GetConVar("int_" .. mod.ConVar .. "_" .. config) != nil then
  146.                 return GetConVar("int_" .. mod.ConVar .. "_" .. config)
  147.             end
  148.         end
  149.     end
  150. end
  151.  
  152. local function INT_ValidPlayer(ply)
  153.     if ply != nil then
  154.         if type(ply) == "Player" then
  155.             if ply and ply:IsValid() then
  156.                 if ply:Nick() != nil then
  157.                     return true
  158.                 end
  159.             end
  160.         end
  161.     end
  162.     return false
  163. end
  164.  
  165. local function INT_ValidEntity(ent)
  166.     if ent != nil then
  167.         if type(ent) == "Entity" then
  168.             if ent and ent:IsValid() then
  169.                 if ent:GetPos() != nil then
  170.                     if ent:GetModel() != nil then
  171.                         if ent:GetClass() != nil then
  172.                             return true
  173.                         end
  174.                     end
  175.                 end
  176.             end
  177.         end
  178.     end
  179.     return false
  180. end
  181.  
  182. local function INT_GetMuzzlePos(ply)
  183.     if INT_ValidPlayer(ply) then
  184.         if ply:GetActiveWeapon() != nil then
  185.             local wep = ply:GetActiveWeapon()
  186.             if wep and wep:IsValid() then
  187.                 local ViewModel = ply:GetViewModel()
  188.                 if ViewModel != nil and ViewModel:IsValid() then
  189.                     local attach = ViewModel:LookupAttachment("muzzle")
  190.                     if attach > 0 then
  191.                         local pos = ViewModel:GetAttachment(attach).Pos
  192.                         return pos
  193.                     end
  194.                 end
  195.             end
  196.         end
  197.     end
  198.     return ply:EyePos()
  199. end
  200.  
  201. local function INT_Paint()
  202.     if not GetConVar("int_enabled"):GetBool() then return end
  203.     for k, v in pairs(integra.modules) do
  204.         if INT_IsModEnabled(v) and v.UsePaint then
  205.             v:Paint()
  206.         end
  207.     end
  208. end
  209. hook.Add("HUDPaint", "INT_Paint", INT_Paint)
  210.  
  211. local function INT_Think()
  212.     if not GetConVar("int_enabled"):GetBool() then return end
  213.     for k, v in pairs(integra.modules) do
  214.         if INT_IsModEnabled(v) and v.UseThink then
  215.             v:Think()
  216.         end
  217.     end
  218. end
  219. hook.Add("Think", "INT_Think", INT_Think)
  220.  
  221. local function INT_RenderScreenspaceEffects()
  222.     if not GetConVar("int_enabled"):GetBool() then return end
  223.     for k, v in pairs(integra.modules) do
  224.         if INT_IsModEnabled(v) and v.UseRenderScreenspaceEffects then
  225.             v:RenderScreenspaceEffects()
  226.         end
  227.     end
  228. end
  229. hook.Add("RenderScreenspaceEffects", "INT_RenderScreenspaceEffects", INT_RenderScreenspaceEffects)
  230.  
  231. local function INT_GetNearestAimingPlayer(eyepos, eyeang)
  232.     if not INT_ValidPlayer(target) or not target:Alive() then
  233.         local pos = {}
  234.         local _eyepos = EyePos()
  235.         local _eyeang = EyeAngles()
  236.         if eyepos != nil then
  237.             _eyepos = eyepos
  238.         end
  239.         if eyeang != nil then
  240.             _eyeang = eyeang
  241.         end
  242.         cam.Start3D(_eyepos, _eyeang)
  243.             for k, v in pairs(player.GetAll()) do
  244.                 if INT_ValidPlayer(v) then
  245.                     if v:GetBonePosition(6) != nil then
  246.                         if v != LocalPlayer() and v:Alive() and v:GetBonePosition(6):Distance(EyePos()) < GetConVar("int_aimbot_maxdistance"):GetInt() then
  247.                             local headangles = (v:GetBonePosition(v:LookupBone("ValveBiped.Bip01_Head1")) - EyePos()):Angle()
  248.                             local aimangles = (LocalPlayer():GetEyeTrace().HitPos - EyePos()):Angle()
  249.                             headangles.r = 0
  250.                             aimangles.r = 0
  251.                             local angle = headangles:Forward():Distance(aimangles:Forward()) * 90
  252.                             table.insert(pos, {ent = v, dist = angle})
  253.                         end
  254.                     end
  255.                 end
  256.             end
  257.         cam.End3D()
  258.         table.SortByMember(pos, "dist")
  259.         local ent = nil
  260.         local min = 9999
  261.         for i = 1, #pos do
  262.             if INT_ValidPlayer(pos[#pos + 1  - i].ent) then
  263.                 if pos[#pos + 1- i].ent:Alive() and pos[#pos + 1- i].dist < (GetConVar("int_aimbot_angle"):GetInt()) and  pos[#pos + 1 - i].dist < min then
  264.                     min = pos[#pos + 1 - i].dist
  265.                     ent = pos[#pos + 1 - i].ent
  266.                 end
  267.             end
  268.         end
  269.         return ent
  270.     else
  271.         return target
  272.     end
  273. end
  274.  
  275. // ESP Wallhack
  276. local esp = {}
  277.     esp.Title = "ESP Wallhack"
  278.     esp.ConVar = "esp"
  279.     esp.UsePaint = true
  280.     esp.UseRenderScreenspaceEffects = true
  281.  
  282. function esp:Paint()
  283.     if INT_GetModConfig(esp, "drawcrosshair"):GetBool() then
  284.         if INT_ValidPlayer(LocalPlayer()) then
  285.             local tr = LocalPlayer():GetEyeTrace()
  286.             local pos = {}
  287.                 pos.x = ScrW() / 2
  288.                 pos.y = ScrH() / 2
  289.             if not INT_GetModConfig(esp, "simple"):GetBool() then
  290.                 surface.SetDrawColor(Color(255, 0, 0, 255))
  291.                 local dist = (LocalPlayer():GetPos() + Vector(0, 0, 64)):Distance(tr.HitPos)
  292.                 surface.DrawOutlinedRect(pos.x - 7 - ((dist / 1000) / 2), pos.y - 7 - ((dist / 1000) / 2), 14 + (dist / 1000), 14 + (dist / 1000))
  293.                 surface.DrawOutlinedRect(pos.x - 10 - ((dist / 1000) / 2), pos.y - 10 - ((dist / 1000) / 2), 20 + (dist / 1000), 20 + (dist / 1000))
  294.                 surface.DrawLine(pos.x - 15 - (dist / 1000) - 5, pos.y, pos.x - 3, pos.y)
  295.                 surface.DrawLine(pos.x + 15 + (dist / 1000) + 5, pos.y, pos.x + 3, pos.y)
  296.                 surface.DrawLine(pos.x, pos.y - 15 - (dist / 1000) - 5, pos.x, pos.y - 3)
  297.                 surface.DrawLine(pos.x, pos.y + 15 + (dist / 1000) + 5, pos.x, pos.y + 3)
  298.                 surface.SetFont("TabLarge")
  299.                 local unit = "m"
  300.                 if dist < 320 then
  301.                     dist = (dist / 64) * 100
  302.                     unit = "cm"
  303.                 end
  304.                 if dist > 320 then
  305.                     dist = dist / 64
  306.                     unit = "m"
  307.                 end
  308.                 local text = "Distance: " .. math.Round(dist) .. unit
  309.                 local size = surface.GetTextSize(text)
  310.                 surface.SetTextPos(pos.x - (size / 2), pos.y + 15 + (dist / 1000) + 10)
  311.                 surface.SetTextColor(Color(255, 0, 0, 255))
  312.                 surface.DrawText(text)
  313.                 local velocity = math.Round(LocalPlayer():GetPos():Distance(LocalPlayer():GetPos() + LocalPlayer():GetVelocity()))
  314.                 text = "Speed: " .. math.Round((velocity / 64) * 3600 / 1000) .. "km/h"
  315.                 size = surface.GetTextSize(text)
  316.                 surface.SetTextPos(pos.x - (size / 2), pos.y + 15 + (dist / 1000) + 22)
  317.                 surface.SetTextColor(Color(0, 255, 0, 255))
  318.                 surface.DrawText(text)
  319.             else
  320.                 surface.SetDrawColor(Color(255, 0, 0, 255))
  321.                 local dist = (LocalPlayer():GetPos() + Vector(0, 0, 64)):Distance(tr.HitPos)
  322.                 surface.DrawOutlinedRect(pos.x - 7 - ((dist / 1000) / 2), pos.y - 7 - ((dist / 1000) / 2), 14 + (dist / 1000), 14 + (dist / 1000))
  323.                 surface.SetFont("TabLarge")
  324.                 local unit = "m"
  325.                 if dist < 320 then
  326.                     dist = (dist / 64) * 100
  327.                     unit = "cm"
  328.                 end
  329.                 if dist > 320 then
  330.                     dist = dist / 64
  331.                     unit = "m"
  332.                 end
  333.                 local text = "Distance: " .. math.Round(dist) .. unit
  334.                 local size = surface.GetTextSize(text)
  335.                 surface.SetTextPos(pos.x - (size / 2), pos.y + 15 + (dist / 1000) + 10)
  336.                 surface.SetTextColor(Color(255, 0, 0, 255))
  337.                 surface.DrawText(text)
  338.             end
  339.         end
  340.     end
  341. end
  342.  
  343. function esp:RenderScreenspaceEffects()
  344.     if INT_GetModConfig(esp, "drawplayers"):GetBool() then
  345.         for k, v in pairs(player.GetAll()) do
  346.             if v != nil then
  347.                 if INT_ValidPlayer(v) and v != LocalPlayer() then
  348.                     if v:GetBonePosition(6) != nil then
  349.                         if v:GetBonePosition(6):Distance(EyePos()) <= INT_GetModConfig(esp, "drawdistance"):GetInt() then
  350.                             local alpha = 255
  351.                             if v:GetBonePosition(6):Distance(EyePos()) > INT_GetModConfig(esp, "drawdistance"):GetInt() - (INT_GetModConfig(esp, "drawdistance"):GetInt() / 10) then
  352.                                 local bound = INT_GetModConfig(esp, "drawdistance"):GetInt() - (INT_GetModConfig(esp, "drawdistance"):GetInt() - (INT_GetModConfig(esp, "drawdistance"):GetInt() / 10))
  353.                                 local dist = INT_GetModConfig(esp, "drawdistance"):GetInt() - v:GetBonePosition(6):Distance(EyePos())
  354.                                 alpha = (255 / bound) * dist
  355.                             end
  356.                             local pos = v:GetBonePosition(6)
  357.                                 pos = pos:ToScreen()
  358.                             if aiming then
  359.                                 if v == INT_GetNearestAimingPlayer(EyePos(), EyeAngles()) then
  360.                                     surface.SetDrawColor(Color(0, 255, 0, 255))
  361.                                     surface.DrawOutlinedRect(pos.x - 15, pos.y - 15, 30, 30)
  362.                                     surface.SetDrawColor(Color(0, 255, 0, 128))
  363.                                     surface.DrawOutlinedRect(pos.x - 13, pos.y - 13, 26, 26)
  364.                                 end
  365.                             end
  366.                             if not INT_GetModConfig(esp, "simple"):GetBool() then
  367.                                 surface.SetDrawColor(Color(255, 0, 0, 255))
  368.                                 surface.DrawOutlinedRect(pos.x - 5, pos.y - 5, 10, 10)
  369.                                 surface.SetDrawColor(Color(255, 0, 0, alpha / 2))
  370.                                 surface.DrawRect(pos.x - 1, pos.y - 1, 2, 2)
  371.                                 surface.SetFont("BudgetLabel")
  372.                                 local col = Color(255, 255, 255, alpha)
  373.                                 surface.SetTextColor(col)
  374.                                 local text, size
  375.                                 if v:Health() > 0 then
  376.                                     text = "Health: "
  377.                                     size = surface.GetTextSize(text .. v:Health() .. "%")
  378.                                     surface.SetTextPos(pos.x - (size / 2), pos.y - 18)
  379.                                     surface.DrawText(text)
  380.                                     surface.SetTextColor(Color(0, 255, 0, alpha))
  381.                                     surface.DrawText(v:Health() .. "%")
  382.                                     surface.SetTextColor(col)
  383.                                 else
  384.                                     text = "Health: "
  385.                                     size = surface.GetTextSize(text .. "DEAD")
  386.                                     surface.SetTextPos(pos.x - (size / 2), pos.y - 18)
  387.                                     surface.DrawText(text)
  388.                                     surface.SetTextColor(Color(255, 0, 0, alpha))
  389.                                     surface.DrawText("DEAD")
  390.                                     surface.SetTextColor(col)
  391.                                 end
  392.                                 local wep = "Unknown"
  393.                                 if v:GetActiveWeapon() != nil then
  394.                                     if type(v:GetActiveWeapon()) == "Weapon" then
  395.                                         if v:GetActiveWeapon() and v:GetActiveWeapon():IsValid() then
  396.                                             wep = v:GetActiveWeapon():GetClass()
  397.                                         end
  398.                                     end
  399.                                 end
  400.                                 text = "Weapon: " .. wep
  401.                                 size = surface.GetTextSize(text)
  402.                                 surface.SetTextPos(pos.x - (size / 2), pos.y - 28)
  403.                                 surface.DrawText(text)
  404.                                 local distance = 0
  405.                                     distance = math.Round(v:GetBonePosition(6):Distance(EyePos()))
  406.                                 text = "Distance: " .. distance
  407.                                 size = surface.GetTextSize(text)
  408.                                 surface.SetTextPos(pos.x - (size / 2), pos.y - 38)
  409.                                 surface.DrawText(text)
  410.                                 surface.SetFont("ChatFont")
  411.                                 if team.GetColor(v:Team()) != nil then
  412.                                     col = team.GetColor(v:Team())
  413.                                     col.a = alpha
  414.                                 end
  415.                                 local rank = ""
  416.                                 if v:IsAdmin() and not v:IsSuperAdmin() then
  417.                                     rank = " (Admin)"
  418.                                 elseif v:IsSuperAdmin() then
  419.                                     rank = " (Super Admin)"
  420.                                 end
  421.                                 surface.SetTextColor(col)
  422.                                 text = v:Nick()
  423.                                 size = surface.GetTextSize(text .. rank)
  424.                                 surface.SetTextPos(pos.x - (size / 2), pos.y - 48)
  425.                                 surface.DrawText(text)
  426.                                 surface.SetTextColor(Color(255, 255, 255, 255))
  427.                                 surface.DrawText(rank)
  428.                             else
  429.                                 surface.SetFont("BudgetLabel")
  430.                                 local col = Color(128, 128, 128, 255)
  431.                                 if team.GetColor(v:Team()) != nil then
  432.                                     col = team.GetColor(v:Team())
  433.                                     col.a = alpha
  434.                                 end
  435.                                 local rank = ""
  436.                                 if v:IsAdmin() and not v:IsSuperAdmin() then
  437.                                     rank = " (Admin)"
  438.                                 elseif v:IsSuperAdmin() then
  439.                                     rank = " (Super Admin)"
  440.                                 end
  441.                                 local text = v:Nick() .. rank
  442.                                 local size = surface.GetTextSize(text)
  443.                                 surface.SetTextColor(col)
  444.                                 surface.SetTextPos(pos.x - (size / 2), pos.y)
  445.                                 surface.DrawText(v:Nick())
  446.                                 surface.SetTextColor(Color(255, 255, 255, 255))
  447.                                 surface.DrawText(rank)
  448.                             end
  449.                         end
  450.                     end
  451.                 end
  452.             end
  453.         end
  454.     end
  455. end
  456.  
  457. INT_AddModule(esp)
  458. INT_AddModConfig(esp, "drawplayers", 1)
  459. INT_AddModConfig(esp, "drawcrosshair", 1)
  460. INT_AddModConfig(esp, "drawdistance", 16384)
  461. INT_AddModConfig(esp, "simple", 0)
  462. // End ESP Wallhack
  463.  
  464. // XRay
  465. local types = {
  466.     {"prop_physics", Color(255, 0, 0)},
  467.     {"player", Color(0, 255, 0)},
  468.     {"npc_", Color(0, 0, 255)},
  469.     {"spawned_", Color(255, 255, 0)},
  470.     {"printer", Color(255, 255, 0)}
  471. }
  472. local xray = {}
  473.     xray.Title = "XRay"
  474.     xray.ConVar = "xray"
  475.     xray.UseRenderScreenspaceEffects = true
  476.     xray.Init = function()
  477.         xrayents = {}
  478.         for k, v in pairs(ents.GetAll()) do
  479.             if INT_ValidEntity(v) then
  480.                 table.insert(xrayents, v)
  481.             end
  482.         end
  483.     end
  484.     xray.Reload = function()
  485.         xrayents = {}
  486.     end
  487.  
  488. local function AddXRayEntity(ent)
  489.     if INT_ValidEntity(ent) then
  490.         for _, index in pairs(types) do
  491.             if string.match(index[1], ent:GetClass()) then
  492.                 table.insert(xrayents, ent)
  493.                 if #xrayents > INT_GetModConfig(xray, "maxents"):GetInt() then
  494.                     table.remove(xrayents, 1)
  495.                 end
  496.             end
  497.         end
  498.     end
  499. end
  500.  
  501. local function RemoveXRayEntity(ent)
  502.     if INT_ValidEntity(ent) then
  503.         for k, v in pairs(xrayents) do
  504.             if INT_ValidEntity(v) then
  505.                 if v == ent then
  506.                     table.remove(xrayents, k)
  507.                 end
  508.             else
  509.                 table.remove(xrayents, k)
  510.             end
  511.         end
  512.     end
  513. end
  514.  
  515. hook.Add("OnEntityCreated", "INT_AddXRayEntity", AddXRayEntity)
  516. hook.Add("EntityRemoved", "INT_RemoveXRayEntity", function(ent)
  517.     xrayents = {}
  518.     for k, v in pairs(ents.GetAll()) do
  519.         if INT_ValidEntity(v) then
  520.             AddXRayEntity(v)
  521.         end
  522.     end
  523. end)
  524.  
  525. function xray:RenderScreenspaceEffects()
  526.     if INT_GetModConfig(xray, "drawprops"):GetBool() then
  527.         for k, v in pairs(xrayents) do
  528.             if INT_ValidEntity(v) then
  529.                 for _, index in pairs(types) do
  530.                     if string.match(index[1], v:GetClass()) then
  531.                         local valid = true
  532.                         if v:IsPlayer() then
  533.                             if not v:Alive() then
  534.                                 valid = false
  535.                             end
  536.                         end
  537.                         if valid then
  538.                             cam.Start3D(EyePos(), EyeAngles())
  539.                                 cam.IgnoreZ(true)
  540.                                     render.SuppressEngineLighting(true)
  541.                                     if INT_GetModConfig(xray, "customcolor"):GetBool() then
  542.                                         render.SetColorModulation(index[2].r / 255, index[2].g / 255, index[2].b / 255)
  543.                                     end
  544.                                     if INT_GetModConfig(xray, "custommaterial"):GetBool() then
  545.                                         SetMaterialOverride(Material("models/shiny"))
  546.                                         render.SetBlend(0.5)
  547.                                     end
  548.                                     v:DrawModel()
  549.                                     if INT_GetModConfig(xray, "customcolor"):GetBool() then
  550.                                         render.SetColorModulation(1, 1, 1)
  551.                                     end
  552.                                     if INT_GetModConfig(xray, "custommaterial"):GetBool() then
  553.                                         SetMaterialOverride(nil)
  554.                                         render.SetBlend(0)
  555.                                     end
  556.                                     render.SuppressEngineLighting(false)
  557.                                 cam.IgnoreZ(false)
  558.                             cam.End3D()
  559.                         end
  560.                     end
  561.                 end
  562.             else
  563.                 table.remove(xrayents, k)
  564.             end
  565.         end
  566.     end
  567.     if INT_GetModConfig(xray, "drawplayers"):GetBool() then
  568.         for k, v in pairs(player.GetAll()) do
  569.             if INT_ValidPlayer(v) and v != LocalPlayer() then
  570.                 if v:Alive() then
  571.                     cam.Start3D(EyePos(), EyeAngles())
  572.                         cam.IgnoreZ(true)
  573.                             render.SuppressEngineLighting(true)
  574.                             if INT_GetModConfig(xray, "customcolor"):GetBool() then
  575.                                 render.SetColorModulation(0, 1, 0)
  576.                             end
  577.                             if INT_GetModConfig(xray, "custommaterial"):GetBool() then
  578.                                 SetMaterialOverride(Material("models/shiny"))
  579.                                 render.SetBlend(0.5)
  580.                             end
  581.                             v:DrawModel()
  582.                             if INT_GetModConfig(xray, "drawbounds"):GetBool() then
  583.                                 local dist = 70
  584.                                 local ang = Angle(0, 0, 0)
  585.                                 local pos1 = v:GetPos()
  586.                                 local pos2 = v:GetPos() + Vector(0, 0, dist)
  587.                                 local pos3 = v:GetPos() + Vector(0, 0, dist) + ang:Right() * 15
  588.                                 local pos4 = v:GetPos() + Vector(0, 0, dist) + ang:Right() * 15
  589.                                 cam.Start3D2D(pos1, ang, 1)
  590.                                     surface.SetDrawColor(Color(0, 255, 0, 32))
  591.                                     surface.DrawRect(-15, -15, 30, 30)
  592.                                     surface.SetDrawColor(Color(0, 255, 0, 255))
  593.                                     surface.DrawOutlinedRect(-15, -15, 30, 30)
  594.                                 cam.End3D2D()
  595.                                 cam.Start3D2D(pos2, ang, 1)
  596.                                     surface.SetDrawColor(Color(0, 255, 0, 32))
  597.                                     surface.DrawRect(-15, -15, 30, 30)
  598.                                     surface.SetDrawColor(Color(0, 255, 0, 255))
  599.                                     surface.DrawOutlinedRect(-15, -15, 30, 30)
  600.                                 cam.End3D2D()
  601.                                 cam.Start3D2D(pos3, ang - Angle(0, 0, -90), 1)
  602.                                     surface.SetDrawColor(Color(0, 255, 0, 32))
  603.                                     surface.DrawRect(-15, 0, 30, dist)
  604.                                     surface.SetDrawColor(Color(0, 255, 0, 255))
  605.                                     surface.DrawOutlinedRect(-15, 0, 30, dist)
  606.                                 cam.End3D2D()
  607.                                 cam.Start3D2D(pos3 - ang:Right() * 30, ang - Angle(0, 0, -90), 1)
  608.                                     surface.SetDrawColor(Color(0, 255, 0, 32))
  609.                                     surface.DrawRect(-15, 0, 30, dist)
  610.                                     surface.SetDrawColor(Color(0, 255, 0, 255))
  611.                                     surface.DrawOutlinedRect(-15, 0, 30, dist)
  612.                                 cam.End3D2D()
  613.                                 cam.Start3D2D(pos4 - ang:Forward() * 15, ang - Angle(0, -90, -90), 1)
  614.                                     surface.SetDrawColor(Color(0, 255, 0, 32))
  615.                                     surface.DrawRect(0, 0, 30, dist)
  616.                                     surface.SetDrawColor(Color(0, 255, 0, 255))
  617.                                     surface.DrawOutlinedRect(0, 0, 30, dist)
  618.                                 cam.End3D2D()
  619.                                 cam.Start3D2D(pos4 + ang:Forward() * 15, ang - Angle(0, -90, -90), 1)
  620.                                     surface.SetDrawColor(Color(0, 255, 0, 32))
  621.                                     surface.DrawRect(0, 0, 30, dist)
  622.                                     surface.SetDrawColor(Color(0, 255, 0, 255))
  623.                                     surface.DrawOutlinedRect(0, 0, 30, dist)
  624.                                 cam.End3D2D()
  625.                             end
  626.                             if INT_GetModConfig(xray, "customcolor"):GetBool() then
  627.                                 render.SetColorModulation(1, 1, 1)
  628.                             end
  629.                             if INT_GetModConfig(xray, "custommaterial"):GetBool() then
  630.                                 SetMaterialOverride(nil)
  631.                                 render.SetBlend(0)
  632.                             end
  633.                             render.SuppressEngineLighting(false)
  634.                         cam.IgnoreZ(false)
  635.                     cam.End3D()
  636.                 end
  637.             end
  638.         end
  639.     end
  640. end
  641.  
  642. INT_AddModule(xray)
  643. INT_AddModConfig(xray, "customcolor", 1)
  644. INT_AddModConfig(xray, "custommaterial", 1)
  645. INT_AddModConfig(xray, "drawplayers", 1)
  646. INT_AddModConfig(xray, "drawprops", 1)
  647. INT_AddModConfig(xray, "drawnpcs", 1)
  648. INT_AddModConfig(xray, "drawrpents", 1)
  649. INT_AddModConfig(xray, "drawbounds", 1)
  650. INT_AddModConfig(xray, "maxents", 50)
  651. // End XRay
  652.  
  653. // Barrel Hack
  654. local mat = Material("tripmine_laser")
  655. local bh = {}
  656.     bh.Title = "Barrel Hack"
  657.     bh.ConVar = "barrelhack"
  658.     bh.UseRenderScreenspaceEffects = true
  659.  
  660. function bh:RenderScreenspaceEffects()
  661.     for k, v in pairs(player.GetAll()) do
  662.         if INT_ValidPlayer(v) then
  663.             if v:Alive() then
  664.                 cam.Start3D(EyePos(), EyeAngles())
  665.                     render.SetMaterial(mat)
  666.                     if v == LocalPlayer() then
  667.                         render.DrawBeam(INT_GetMuzzlePos(v), v:GetEyeTrace().HitPos, 15, 1, 1, Color(255, 0, 0, 255))
  668.                     else
  669.                         local pos = v:EyePos()
  670.                         cam.IgnoreZ(true)
  671.                             local tr = {}
  672.                                 tr.start = pos
  673.                                 tr.endpos = pos + Vector(0, 0, 10000)
  674.                                 tr.mask = nil
  675.                             local trace = util.TraceLine(tr)
  676.                             render.DrawBeam(pos, trace.HitPos, 50, 1, 1, Color(0, 255, 0, 255))
  677.                         cam.IgnoreZ(false)
  678.                         if v:GetBonePosition(v:LookupBone("ValveBiped.Bip01_R_Hand")) != nil then
  679.                             pos = v:GetBonePosition(v:LookupBone("ValveBiped.Bip01_R_Hand"))
  680.                         end
  681.                         if INT_GetMuzzlePos(v) != v:EyePos() then
  682.                             render.DrawBeam(INT_GetMuzzlePos(v), v:GetEyeTrace().HitPos, 30, 1, 1, Color(255, 0, 0, 255))
  683.                         else
  684.                             render.DrawBeam(pos, v:GetEyeTrace().HitPos, 30, 1, 1, Color(255, 0, 0, 255))
  685.                         end
  686.                     end
  687.                 cam.End3D()
  688.             end
  689.         end
  690.     end
  691. end
  692.  
  693. INT_AddModule(bh)
  694. // End Barrel Hack
  695.  
  696. // Aimbot
  697. local aimbot = {}
  698.     aimbot.Title = "Aimbot"
  699.     aimbot.ConVar = "aimbot"
  700.     aimbot.UseThink = true
  701.     aimbot.UsePaint = true
  702.  
  703. function aimbot:HUDPaint()
  704.     if INT_GetModConfig(aimbot, "drawradius"):GetBool() then
  705.         for k, v in pairs(player.GetAll()) do
  706.             if INT_ValidPlayer(v) then
  707.                 if v != LocalPlayer() then
  708.                     local pos = v:GetBonePosition(6):ToScreen()
  709.                     surface.SetDrawColor(Color(255, 255, 255, 128))
  710.                     surface.DrawCircle(pos.x, pos.y, GetConVar("int_aimbot_angle"):GetInt() * 2 * 3)
  711.                     surface.DrawCircle(pos.x - 1, pos.y, GetConVar("int_aimbot_angle"):GetInt() * 2 * 3)
  712.                     surface.DrawCircle(pos.x + 1, pos.y, GetConVar("int_aimbot_angle"):GetInt() * 2 * 3)
  713.                 end
  714.             end
  715.         end
  716.     end
  717. end
  718.  
  719. function aimbot:Think()
  720.     if aiming then
  721.         if target == nil then
  722.             if INT_ValidPlayer(INT_GetNearestAimingPlayer(EyePos(), EyeAngles())) then
  723.                 local ply = INT_GetNearestAimingPlayer(EyePos(), EyeAngles())
  724.                 if ply:Alive() and ply != LocalPlayer() then
  725.                     target = ply
  726.                 end
  727.             end
  728.         else
  729.             if INT_ValidPlayer(target) and target:Alive() then
  730.                 local angles = ((target:GetBonePosition(6) - EyePos()) + ((target:GetVelocity()) / (1000 / INT_GetModConfig(aimbot, "velocityamount"):GetInt()))):Angle()
  731.                 if mode == 1 then
  732.                     angles = (target:GetEyeTrace().HitPos - EyePos()):Angle()
  733.                 end
  734.                 LocalPlayer():SetEyeAngles(angles)
  735.                 if INT_GetModConfig(aimbot, "autofire"):GetBool() then
  736.                     local rand = math.random(-10, 10)
  737.                     rand = rand / (EyePos():Distance(target:GetBonePosition(6)) / 10)
  738.                     LocalPlayer():SetEyeAngles(Angle(angles.p + (rand * 1), angles.y + rand, 0))
  739.                     local ent = LocalPlayer():GetEyeTrace().Entity
  740.                     if INT_ValidPlayer(ent) then
  741.                         RunConsoleCommand("+attack")
  742.                         timer.Simple(0.05, function()
  743.                             RunConsoleCommand("-attack")
  744.                         end)
  745.                     else
  746.                         RunConsoleCommand("-attack")
  747.                     end
  748.                 end
  749.             else
  750.                 target = nil
  751.                 RunConsoleCommand("-attack")
  752.             end
  753.         end
  754.     end
  755. end
  756.  
  757. INT_AddModule(aimbot)
  758. INT_AddModConfig(aimbot, "angle", 45)
  759. INT_AddModConfig(aimbot, "drawradius", 0)
  760. INT_AddModConfig(aimbot, "autofire", 1)
  761. INT_AddModConfig(aimbot, "maxdistance", 4096)
  762. INT_AddModConfig(aimbot, "velocityamount", 500)
  763. concommand.Add("+int_aimbot", function()
  764.     aiming = true
  765.     mode = 0
  766. end)
  767. concommand.Add("-int_aimbot", function()
  768.     target = nil
  769.     aiming = false
  770. end)
  771. concommand.Add("+int_aimbot_barrelhack", function()
  772.     aiming = true
  773.     mode = 1
  774. end)
  775. concommand.Add("-int_aimbot_barrelhack", function()
  776.     target = nil
  777.     aiming = false
  778. end)
  779. // End Aimbot
  780.  
  781. hook.Add("PlayerConnect", "INT_ShowIP", function(name, ip)
  782.     if GetConVar("int_showip"):GetBool() then
  783.         chat.AddText(Color(0, 255, 0), name, Color(255, 255, 255), " has connected with IP ", Color(0, 255, 0), ip, Color(255, 255, 255), "!")
  784.         surface.PlaySound("buttons/blip2.wav")
  785.     end
  786. end)
  787. CreateClientConVar("int_showip", 1, true, false)
  788.  
  789. local utilEffect = util.Effect
  790.  
  791. function util.Effect(effect, data, override, recipient)
  792.     if not GetConVar("int_noeffects"):GetBool() then
  793.         utilEffect(effect, data, override, recipient)
  794.     end
  795. end
  796.  
  797. CreateClientConVar("int_noeffects", 1, true, false)
  798.  
  799. local function INT_Reload()
  800.     for k, v in pairs(integra.modules) do
  801.         v:Reload()
  802.     end
  803.  
  804.     hook.Remove("RenderScreenspaceEffects", "INT_RenderScreenspaceEffects")
  805.     hook.Remove("Think", "INT_Think")
  806.     hook.Remove("HUDPaint", "INT_Paint")
  807.  
  808.     hook.Add("RenderScreenspaceEffects", "INT_RenderScreenspaceEffects", INT_RenderScreenspaceEffects)
  809.     hook.Add("Think", "INT_Think", INT_Think)
  810.     hook.Add("HUDPaint", "INT_Paint", INT_Paint)
  811.  
  812.     for k, v in pairs(integra.modules) do
  813.         v:Init()
  814.     end
  815. end
  816. concommand.Add("int_reload", INT_Reload)
  817.  
  818. local function INT_Rotate()
  819.     local ang = EyeAngles()
  820.     LocalPlayer():SetEyeAngles(Angle(ang.p, ang.y - 180, 0))
  821. end
  822. concommand.Add("int_rotate", INT_Rotate)
  823.  
  824. local usetype = 0
  825. local function INT_UseSpam()
  826.     if usetype == 0 then
  827.         RunConsoleCommand("+use")
  828.         usetype = 1
  829.     else
  830.         RunConsoleCommand("-use")
  831.         usetype = 0
  832.     end
  833. end
  834.  
  835. local INT_CBoxConfigs =
  836. {
  837.     {"Enable XRay", "xray_enabled"},
  838.     {"XRay Draw Props", "xray_drawprops"},
  839.     {"XRay Draw Players", "xray_drawplayers"},
  840.     {"XRay Draw Player Bounding Box", "xray_drawbounds"},
  841.     {"Custom XRay Material", "xray_custommaterial"},
  842.     {"Custom XRay Color", "xray_customcolor"},
  843.     {"Enable ESP", "esp_enabled"},
  844.     {"Crosshair", "esp_drawcrosshair"}
  845. }
  846.  
  847. local function INT_Menu()
  848.     local Frame = IDerma.CreateDFrame()
  849.         Frame:SetSize(600, 400)
  850.         Frame:Center()
  851.         Frame:SetTitle("Integra Main Menu")
  852.         Frame:SetDraggable(false)
  853.         Frame:SetSizable(false)
  854.         Frame:MakePopup()
  855.     local Sheet = vgui.Create("DPropertySheet", Frame)
  856.         Sheet:SetSize(Frame:GetWide() - 20, Frame:GetTall() - 40)
  857.         Sheet:SetPos(10, 30)
  858.         Sheet:SetDrawBackground(false)
  859.         Sheet.Paint = function(self)
  860.             surface.SetDrawColor(Color(192, 192, 192, 128))
  861.             surface.DrawOutlinedRect(0, 22, self:GetWide(), self:GetTall() - 22)
  862.         end
  863.     local ConfigPanel = IDerma.CreateDPanel(Sheet)
  864.         for k, v in pairs(INT_CBoxConfigs) do
  865.             local cbox = vgui.Create("DCheckBox", ConfigPanel)
  866.                 cbox:SetPos(10, k * 20)
  867.                 cbox:SetConVar("int_" .. v[2])
  868.                 cbox:SetEnabled(GetConVar("int_" .. v[2]):GetBool())
  869.                 cbox.Paint = function(self)
  870.                     surface.SetDrawColor(Color(255, 255, 255, 255))
  871.                     surface.DrawRect(0, 0, 16, 16)
  872.                     surface.SetDrawColor(Color(192, 192, 192, 255))
  873.                     surface.DrawOutlinedRect(0, 0, 16, 16)
  874.                 end
  875.             local label = vgui.Create("DLabel", ConfigPanel)
  876.                 label:SetPos(30, (k * 20))
  877.                 label:SetTextColor(Color(255, 255, 255, 255))
  878.                 label:SetFont("UiBold")
  879.                 label:SetText(v[1])
  880.                 label:SizeToContents()
  881.         end
  882.         Sheet:AddSheet("Configuration", ConfigPanel, "gui/silkicons/wrench", false, false, "Main Config")
  883. end
  884. concommand.Add("int_menu", INT_Menu)
  885.  
  886. concommand.Add("+int_usespam", function()
  887.     timer.Create("UseSpam", 0.05, 0, INT_UseSpam)
  888. end)
  889.  
  890. concommand.Add("-int_usespam", function()
  891.     timer.Destroy("UseSpam")
  892.     RunConsoleCommand("-use")
  893. end)
  894.  
  895. CreateClientConVar("int_enabled", 1, true, false)
  896.  
  897. concommand.Add("int_liftplayer", function()
  898.     if INT_ValidPlayer(target) then
  899.         aiming = false
  900.         local trace = {}
  901.             trace.start = target:GetPos()
  902.             trace.endpos = target:GetPos() - Vector(0, 0, 1000)
  903.         local tr = util.TraceLine(trace)
  904.         local pos = tr.HitPos
  905.             pos = pos + (target:GetAngles():Forward() * -20)
  906.         LocalPlayer():SetEyeAngles((pos - EyePos()):Angle())
  907.         timer.Simple(0.08, function()
  908.             RunConsoleCommand("gm_spawn", "models/cheeze/pcb2/pcb8.mdl")
  909.         end)
  910.         timer.Simple(0.16, function()
  911.             RunConsoleCommand("+attack")
  912.         end)
  913.         timer.Simple(0.24, function()
  914.             LocalPlayer():SetEyeAngles(((pos + Vector(0, 0, 500)) - EyePos()):Angle())
  915.         end)
  916.         timer.Simple(2, function()
  917.             RunConsoleCommand("undo")
  918.         end)
  919.         timer.Simple(2.3, function()
  920.             RunConsoleCommand("-attack")
  921.         end)
  922.     end
  923. end)
  924.  
  925. local Spinning = false
  926. local angdiff = 1
  927.  
  928. local function INT_Spin_Render()
  929.     if not Spinning then return end
  930.  
  931.     local ang = 140
  932.    
  933.     LocalPlayer():SetEyeAngles(Angle(EyeAngles().p, EyeAngles().y - ang, 0))
  934.  
  935.     local CData = {}
  936.         CData.origin = EyePos()
  937.         CData.angles = Angle(EyeAngles().p, EyeAngles().y + angdiff, 0)
  938.         CData.x = 0
  939.         CData.y = 0
  940.         CData.w = ScrW()
  941.         CData.h = ScrH()
  942.     render.RenderView(CData)
  943.     angdiff = angdiff + ang
  944. end
  945.  
  946. hook.Add("HUDPaint", "INT_Spin_Render", INT_Spin_Render)
  947.  
  948. concommand.Add("+int_spinbot", function()
  949.     angdiff = 0
  950.     Spinning = true
  951. end)
  952.  
  953. concommand.Add("-int_spinbot", function()
  954.     angdiff = 0
  955.     Spinning = false
  956.     LocalPlayer():SetEyeAngles(Angle(EyeAngles().p, EyeAngles().y + angdiff, 0))
  957.     RunConsoleCommand("-attack")
  958. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement