Anthr4x292

Integra Pocket Version

Apr 25th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.35 KB | None | 0 0
  1. // Integra v(What Would be 2.0, but isn't released) Pocket Version.
  2. // This version LOOKS somewhat similar, but with less functionality and smaller code, ported to work optimal with PixelRender,
  3. // so anti-cheat bypassing is not an option.
  4. // This means it's hook.Add and no module framework at all, just plain code that can be ran any time.
  5.  
  6. surface.CreateFont("Segoe UI", 15, 700, false, false, "ESPFont_Name")
  7. surface.CreateFont("Arial", 13, 700, false, false, "ESPFont_Rank")
  8. surface.CreateFont("Arial", 13, 700, false, false, "ESPFont_Info")
  9. surface.CreateFont("Arial", 19, 700, false, false, "AimbotFont_Scan")
  10.  
  11. CreateClientConVar("p_int_esp_outlinedtext", 1, true, false)
  12. CreateClientConVar("p_int_esp", 1, true, false)
  13. hook.Add("HUDPaint", "INT_ESP_HUD", function()
  14.     if not GetConVar("p_int_esp"):GetBool() then return end
  15.  
  16.     for k, v in pairs(player.GetAll()) do
  17.         if ValidEntity(v) and v != LocalPlayer() then
  18.             local pos = v:EyePos()
  19.                 if v:GetBonePosition(6) != nil then
  20.                     pos = v:GetBonePosition(6)
  21.                 end
  22.                 pos = pos:ToScreen()
  23.             local nick = v:Nick()
  24.             local rank = ""
  25.             if v:IsAdmin() and not v:IsSuperAdmin() then
  26.                 rank = " (Admin)"
  27.             elseif v:IsSuperAdmin() then
  28.                 rank = " (Super Admin)"
  29.             end
  30.             local health = v:Health() .. "%"
  31.             if v:Health() <= 0 then health = "DEAD" end
  32.             local dist = math.Round(v:EyePos():Distance(EyePos()))
  33.             local weapon = "nil"
  34.             if ValidEntity(v:GetActiveWeapon()) then
  35.                 weapon = v:GetActiveWeapon().PrintName or v:GetActiveWeapon():GetClass()
  36.             end
  37.  
  38.             surface.SetFont("ESPFont_Name")
  39.             local nametext_size = surface.GetTextSize(nick)
  40.             surface.SetFont("ESPFont_Rank")
  41.             local ranktext_size = surface.GetTextSize(rank)
  42.             surface.SetFont("ESPFont_Info")
  43.             local health_info_size = surface.GetTextSize("Health: ")
  44.             local health_value_size = surface.GetTextSize(health)
  45.             local dist_info_size = surface.GetTextSize("Distance: ")
  46.             local dist_value_size = surface.GetTextSize(dist)
  47.             local weapon_info_size = surface.GetTextSize("Weapon: ")
  48.             local weapon_value_size = surface.GetTextSize(weapon)
  49.  
  50.             if GetConVar("p_int_esp_outlinedtext"):GetBool() then
  51.                 draw.SimpleTextOutlined(nick, "ESPFont_Name", pos.x - ((nametext_size + ranktext_size) / 2), pos.y - 54, Color(204, 102, 102, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  52.                 draw.SimpleTextOutlined(rank, "ESPFont_Rank", pos.x - ((nametext_size + ranktext_size) / 2) + nametext_size, pos.y - 54, Color(153, 153, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  53.  
  54.                 draw.SimpleTextOutlined("Health: ", "ESPFont_Info", pos.x - ((health_info_size + health_value_size) / 2), pos.y - 54 + 15, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  55.                 draw.SimpleTextOutlined(health, "ESPFont_Info", pos.x - ((health_info_size + health_value_size) / 2) + health_info_size, pos.y - 54 + 15, Color(204, 204, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  56.  
  57.                 draw.SimpleTextOutlined("Distance: ", "ESPFont_Info", pos.x - ((dist_info_size + dist_value_size) / 2), pos.y - 54 + 15 + 11, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  58.                 draw.SimpleTextOutlined(dist, "ESPFont_Info", pos.x - ((dist_info_size + dist_value_size) / 2) + dist_info_size, pos.y - 54 + 15 + 11, Color(204, 204, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  59.  
  60.                 draw.SimpleTextOutlined("Weapon: ", "ESPFont_Info", pos.x - ((weapon_info_size + weapon_value_size) / 2), pos.y - 54 + 15 + 11 + 11, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  61.                 draw.SimpleTextOutlined(weapon, "ESPFont_Info", pos.x - ((weapon_info_size + weapon_value_size) / 2) + weapon_info_size, pos.y - 54 + 15 + 11 + 11, Color(204, 204, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  62.             else
  63.                 draw.SimpleText(nick, "ESPFont_Name", pos.x - ((nametext_size + ranktext_size) / 2), pos.y - 54, Color(204, 102, 102, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  64.                 draw.SimpleText(rank, "ESPFont_Rank", pos.x - ((nametext_size + ranktext_size) / 2) + nametext_size, pos.y - 54, Color(153, 153, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  65.  
  66.                 draw.SimpleText("Health: ", "ESPFont_Info", pos.x - ((health_info_size + health_value_size) / 2), pos.y - 54 + 15, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  67.                 draw.SimpleText(health, "ESPFont_Info", pos.x - ((health_info_size + health_value_size) / 2) + health_info_size, pos.y - 54 + 15, Color(204, 204, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  68.  
  69.                 draw.SimpleText("Distance: ", "ESPFont_Info", pos.x - ((dist_info_size + dist_value_size) / 2), pos.y - 54 + 15 + 11, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1)
  70.                 draw.SimpleText(dist, "ESPFont_Info", pos.x - ((dist_info_size + dist_value_size) / 2) + dist_info_size, pos.y - 54 + 15 + 11, Color(204, 204, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1)
  71.  
  72.                 draw.SimpleText("Weapon: ", "ESPFont_Info", pos.x - ((weapon_info_size + weapon_value_size) / 2), pos.y - 54 + 15 + 11 + 11, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1)
  73.                 draw.SimpleText(weapon, "ESPFont_Info", pos.x - ((weapon_info_size + weapon_value_size) / 2) + weapon_info_size, pos.y - 54 + 15 + 11 + 11, Color(204, 204, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  74.             end
  75.         end
  76.     end
  77. end)
  78.  
  79. local ESPMaterial = Material("models/shiny")
  80.  
  81. CreateClientConVar("p_int_esp_drawentities", 1, true, false)
  82. hook.Add("RenderScreenspaceEffects", "INT_ESP_RENDER", function()
  83.     if not GetConVar("p_int_esp_drawentities"):GetBool() then return end
  84.     cam.Start3D(EyePos(), EyeAngles())
  85.         cam.IgnoreZ(true)
  86.             render.SuppressEngineLighting(true)
  87.                 SetMaterialOverride(ESPMaterial)
  88.                     render.SetColorModulation(0, 1, 0)
  89.                         render.SetBlend(0.4)
  90.                             for k, v in pairs(player.GetAll()) do
  91.                                 if ValidEntity(v) then
  92.                                     if v:Alive() then
  93.                                         v:DrawModel()
  94.                                     end
  95.                                 end
  96.                             end
  97.                         render.SetBlend(1)
  98.                     render.SetColorModulation(1, 1, 1)
  99.                 SetMaterialOverride()
  100.             render.SuppressEngineLighting(false)
  101.         cam.IgnoreZ(false)
  102.     cam.End3D()
  103. end)
  104.  
  105. local BarrelhackMaterial = Material("effects/laser1")
  106.  
  107. CreateClientConVar("p_int_barrelhack", 1, true, false)
  108. hook.Add("RenderScreenspaceEffects", "INT_BARRELHACK_RENDER", function()
  109.     if not GetConVar("p_int_barrelhack"):GetBool() then return end
  110.     cam.Start3D(EyePos(), EyeAngles())
  111.         for k, v in pairs(player.GetAll()) do
  112.             if ValidEntity(v) then
  113.                 local tr = v:GetEyeTrace()
  114.                 if tr != nil then
  115.                     local hitpos = tr.HitPos
  116.                     if hitpos != nil then
  117.                         local muzzlepos = v:EyePos()
  118.                         local vm = v:GetViewModel()
  119.                         local pos = v:EyePos()
  120.                         if ValidEntity(vm) then
  121.                             local attachId = vm:LookupAttachment("muzzle")
  122.                             if attachId == 0 then
  123.                                 attachId = vm:LookupAttachment("1")
  124.                             end
  125.  
  126.                             if vm:GetAttachment(attachId) != nil then
  127.                                 pos = vm:GetAttachment(attachId).Pos
  128.                             end
  129.                         else
  130.                             muzzlepos = v:EyePos()
  131.                         end
  132.                         render.SetMaterial(BarrelhackMaterial)
  133.                         render.DrawBeam(muzzlepos, hitpos, 10, 1, 1, Color(255, 0, 0, 255))
  134.                     end
  135.                 end
  136.             end
  137.         end
  138.     cam.End3D()
  139. end)
  140.  
  141. CreateClientConVar("p_int_crosshair", 1, true, false)
  142. CreateClientConVar("p_int_crosshairinfo", 1, true, false)
  143. hook.Add("HUDPaint", "INT_ESP_CROSSHAIR", function()
  144.     if not GetConVar("p_int_crosshair"):GetBool() then return end
  145.     cam.Start3D(EyePos(), EyeAngles())
  146.         cam.Start2D()
  147.             local pos = LocalPlayer():GetEyeTrace().HitPos
  148.             local dist = math.Round(EyePos():Distance(pos))
  149.             local screenpos = pos:ToScreen()
  150.  
  151.             surface.SetDrawColor(Color(255, 0, 0))
  152.             surface.DrawLine(screenpos.x - 15 - (dist / 500), screenpos.y, screenpos.x - 5 - (dist / 1000), screenpos.y)
  153.             surface.DrawLine(screenpos.x + 15 + (dist / 500), screenpos.y, screenpos.x + 5 + (dist / 1000), screenpos.y)
  154.             surface.DrawLine(screenpos.x, screenpos.y - 15 - (dist / 500), screenpos.x, screenpos.y - 5 - (dist / 1000))
  155.             surface.DrawLine(screenpos.x, screenpos.y + 15 + (dist / 500), screenpos.x, screenpos.y + 5 + (dist / 1000))
  156.         cam.End2D()
  157.     cam.End3D()
  158. end)
  159.  
  160. local XRay_Ents = {}
  161. local XRay_Material = Material("models/shiny")
  162.  
  163. CreateClientConVar("p_int_xray", 1, true, false)
  164. CreateClientConVar("p_int_xray_maxprops", 1, true, false)
  165. hook.Add("OnEntityCreated", "INT_XRAY_ADDPROP", function(ent)
  166.     if ValidEntity(ent) then
  167.         if ent:GetClass() == "prop_physics" then
  168.             if #XRay_Ents + 1 < GetConVar("p_int_xray_maxprops"):GetInt() then
  169.                 XRay_Ents[1] = ent
  170.             else
  171.                 table.insert(XRay_Ents, ent)
  172.             end
  173.         end
  174.     end
  175. end)
  176.  
  177. hook.Add("RenderScreenspaceEffects", "INT_XRAY_RENDER", function()
  178.     if not GetConVar("p_int_xray"):GetBool() then if #XRay_Ents > 0 then XRay_Ents = {} end return end
  179.     cam.Start3D(EyePos(), EyeAngles())
  180.         cam.IgnoreZ(true)
  181.             render.SuppressEngineLighting(true)
  182.                 SetMaterialOverride(ESPMaterial)
  183.                     render.SetColorModulation(1, 0, 0)
  184.                         render.SetBlend(0.4)
  185.                             for k, v in pairs(XRay_Ents) do
  186.                                 if ValidEntity(v) then
  187.                                     v:DrawModel()
  188.                                 else
  189.                                     table.remove(XRay_Ents, k)
  190.                                 end
  191.                             end
  192.                         render.SetBlend(1)
  193.                     render.SetColorModulation(1, 1, 1)
  194.                 SetMaterialOverride()
  195.             render.SuppressEngineLighting(false)
  196.         cam.IgnoreZ(false)
  197.     cam.End3D()
  198. end)
  199.  
  200. local ab_on = false
  201. local ab_target
  202. local ab_firemode = 0
  203.  
  204. CreateClientConVar("p_int_aimbot_autofire", 1, true, false)
  205. CreateClientConVar("p_int_aimbot_maxangle", 360, true, false)
  206. CreateClientConVar("p_int_aimbot_targetsteamfriends", 0, true, false)
  207.  
  208. concommand.Add("+int_aimbot", function() ab_on = true end)
  209. concommand.Add("-int_aimbot", function() ab_on = false if GetConVar("p_int_aimbot_autofire"):GetBool() then ab_target = nil RunConsoleCommand("-attack") end ab_firemode = 0 end)
  210.  
  211. local function GetABTarget()
  212.     local targets = {}
  213.     for k, v in pairs(player.GetAll()) do
  214.         if ValidEntity(v) then
  215.             local valid = true
  216.             local headpos = v:EyePos()
  217.                 if v:GetBonePosition(6) != nil then
  218.                     headpos = v:GetBonePosition(6)
  219.                 end
  220.             if not v:Alive() then valid = false end
  221.             local tr_data = {}
  222.                 tr_data.start = EyePos()
  223.                 tr_data.endpos = headpos
  224.                 tr_data.mask = MASK_SHOT
  225.                 tr_data.filter = LocalPlayer()
  226.             local tr = util.TraceLine(tr_data)
  227.                 if tr.Entity != v then
  228.                     valid = false
  229.                 end
  230.  
  231.             if not GetConVar("p_int_aimbot_targetsteamfriends"):GetBool() then
  232.                 if v:GetFriendStatus() == "friend" then
  233.                     valid = false
  234.                 end
  235.             end
  236.  
  237.             if valid then
  238.                 local ang = (headpos - EyePos()):Angle()
  239.                     ang.p = 0
  240.                 local eyeang = EyeAngles()
  241.                     eyeang.p = 0
  242.                 local dist = eyeang:Forward():Distance(ang:Forward()) * 90
  243.  
  244.                 if dist <= GetConVar("p_int_aimbot_maxangle"):GetFloat() then
  245.                     table.insert(targets, {ply = v, ang = dist})
  246.                 end
  247.             end
  248.         end
  249.     end
  250.  
  251.     if #targets <= 0 then return end
  252.     table.SortByMember(targets, "ang", function(a, b) return a > b end)
  253.  
  254.     if ValidEntity(targets[1].ply) then
  255.         ab_target = targets[1].ply
  256.     end
  257. end
  258.  
  259. hook.Add("HUDPaint", "INT_AIMBOT_HUD", function()
  260.     if not ab_on then return end
  261.  
  262.     local x = ScrW() / 2
  263.     local y = (ScrH() / 2) + 70
  264.  
  265.     local curtime = math.sin(CurTime() * 4)
  266.     if curtime < 0 then curtime = -curtime end
  267.  
  268.     if ValidEntity(ab_target) then
  269.         local headpos = ab_target:EyePos()
  270.             if ab_target:GetBonePosition(6) != nil then
  271.                 headpos = ab_target:GetBonePosition(6)
  272.             end
  273.         local pos = headpos
  274.             pos = pos:ToScreen()
  275.         draw.SimpleText("Locked-on " .. ab_target:Nick() .. "!", "AimbotFont_Scan", x, y, Color(curtime * 160, 255, curtime * 160), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)
  276.         surface.SetDrawColor(Color(0, 255, 0, 255))
  277.         surface.DrawOutlinedRect(pos.x - 5, pos.y - 5, 10, 10)
  278.     else
  279.         draw.SimpleText("Scanning for targets...", "AimbotFont_Scan", x, y, Color(255, curtime * 160, curtime * 160), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)
  280.     end
  281. end)
  282.  
  283. hook.Add("Think", "INT_AIMBOT_THINK", function()
  284.     if not ab_on then return end
  285.     local valid = false
  286.     if ValidEntity(ab_target) then
  287.         if ab_target:Alive() then
  288.             local headpos = ab_target:EyePos()
  289.                 if ab_target:GetBonePosition(6) != nil then
  290.                     headpos = ab_target:GetBonePosition(6)
  291.                 end
  292.             local tr_data = {}
  293.                 tr_data.start = EyePos()
  294.                 tr_data.endpos = headpos
  295.                 tr_data.mask = MASK_SHOT
  296.                 tr_data.filter = LocalPlayer()
  297.             local tr = util.TraceLine(tr_data)
  298.                 if tr.Entity == ab_target then
  299.                     valid = true
  300.                 else
  301.                     if GetConVar("p_int_aimbot_autofire"):GetBool() then RunConsoleCommand("-attack") end
  302.                     ab_target = nil
  303.                 end
  304.         else
  305.             if GetConVar("p_int_aimbot_autofire"):GetBool() then RunConsoleCommand("-attack") end
  306.             ab_target = nil
  307.         end
  308.     else
  309.         if GetConVar("p_int_aimbot_autofire"):GetBool() then RunConsoleCommand("-attack") end
  310.         ab_target = nil
  311.     end
  312.  
  313.     if valid then
  314.         local headpos = ab_target:EyePos()
  315.             if ab_target:GetBonePosition(6) != nil then
  316.                 headpos = ab_target:GetBonePosition(6)
  317.             end
  318.         LocalPlayer():SetEyeAngles((headpos - EyePos()):Angle())
  319.         if GetConVar("p_int_aimbot_autofire"):GetBool() then
  320.             if ab_firemode == 0 then
  321.                 RunConsoleCommand("+attack")
  322.                 ab_firemode = 1
  323.             else
  324.                 RunConsoleCommand("-attack")
  325.                 ab_firemode = 0
  326.             end
  327.         end
  328.     else
  329.         GetABTarget()
  330.     end
  331. end)
  332.  
  333. concommand.Add("int_rotate", function() LocalPlayer():SetEyeAngles(Angle(EyeAngles().p, EyeAngles().y - 180, 0)) end)
  334.  
  335. local bhop_on = false
  336. hook.Add("Tick", "INT_BHOP", function() if bhop_on then if LocalPlayer():IsOnGround() then RunConsoleCommand("+jump") else RunConsoleCommand("-jump") end end end)
  337. concommand.Add("+int_bhop", function() bhop_on = true end)
  338. concommand.Add("-int_bhop", function() bhop_on = false RunConsoleCommand("-jump") end)
  339.  
  340. concommand.Add("int_help", function()
  341.     local messages =
  342.     {
  343.         "\nIntegra Pocket Version Help 1.0 by Anthr4X ran.",
  344.         "This is the small, reduced functionality version ported to work with pp_PixelRender, but roughly the selected features looks the same.",
  345.         "Enjoy the wallhacking and aimbotting :)",
  346.         "\nFull command/ConVar list:",
  347.         "p_int_aimbot_autofire - If on, when you aimbot you will automatically shoot.",
  348.         "p_int_aimbot_maxangle - The maximum angle to target a player in aimbot (180 is behind you, 90 is to your sides).",
  349.         "p_int_aimbot_targetsteamfriends - If on, you will target steam friends, otherwise not.",
  350.         "p_int_barrelhack - If on, it will draw a beam for every player from where they are to where they look.",
  351.         "p_int_crosshair - If on, will draw the crosshair.",
  352.         "p_int_crosshairinfo - If on, will draw distance under the crosshair.",
  353.         "p_int_esp - If on, enables the wallhack.",
  354.         "p_int_esp_drawentities - If on, will render the player through walls with a green material.",
  355.         "p_int_esp_outlinedtext - If on, enables outlined text for the wallhack, turn off if it lags.",
  356.         "p_int_xray - If on, will enable the X-Ray vision (Seeing props through walls).",
  357.         "p_int_xray_maxprops - The maximum amount of props you will render through the wall (Lower it if it lags).",
  358.         "\nint_rotate - Rotates you backwards 180 degrees.",
  359.         "int_help - Shows this text.",
  360.         "+int_aimbot - Bind a key to this (eg \"bind mouse3 +int_aimbot\") and hold the key/mouse button down to aimbot.",
  361.         "+int_bhop - Bind a key to this (eg \"bind space +int_bhop\") and keep held down to instantly jump when you land (Keeps speed)."
  362.     }
  363.     for k, v in pairs(messages) do
  364.         MsgN(v)
  365.     end
  366. end)
Advertisement
Add Comment
Please, Sign In to add comment