Advertisement
Guest User

skidscorcher public

a guest
Jun 24th, 2016
1,031
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.58 KB | None | 0 0
  1. /*
  2.     [S]kid[S]corcher
  3.     Version: 1.0 public
  4.     Credits:
  5.         kalis0x - basically the entire cheat
  6. */
  7.  
  8. require("bsendpacket")
  9. require("dickwrap")
  10. //require("mega")
  11.  
  12. surface.CreateFont("wireless gamer", {font = "Open Sans MS", size = 45})
  13. surface.CreateFont("visual gamer", {font = "Courier New", size = 15, weight = 500, outline = true})
  14. surface.CreateFont("gamer title", {font = "Trebuchet", size = 18, weight = 650})
  15. surface.CreateFont("gamer tab", {font = "Trebuchet", size = 16, weight = 550})
  16. local _R = debug.getregistry()
  17. _R["__rbackup"] = _R["__rbackup"] and _R["__rbackup"] or table.Copy(_R)
  18. local r = _R["__rbackup"]
  19. local me = LocalPlayer()
  20. ok = {}
  21. ok.rang = {}
  22. ok.cvars = {}
  23. ok.ys = GetConVarNumber("m_yaw")
  24. ok.aat = nil
  25. ok.aas = false
  26. ok.atk = false
  27. ok.ld = false
  28. ok.gd = false
  29. ok.hm = 0
  30. ok.dc = 0
  31. ok.ct = 0
  32. ok.flt = 0
  33. ok.fltm = 0
  34. ok.er = 0
  35. ok.eg = 0
  36. ok.eb = 0
  37. ok.fa = nil
  38. ok.sp = nil
  39. ok.ep = nil
  40. ok.atl = 0
  41.  
  42. function ok.Log(...)
  43.     MsgC(Color(5, 130, 255), "[SkidScorcher] ", Color(255, 190, 5), ...)
  44.     MsgN("")
  45. end
  46.  
  47. ok.Log("Loading...")
  48.  
  49. function ok.CreateConsoleVar(name, default)
  50.     local ret = CreateClientConVar(name, default)
  51.     ok.cvars[name] = tostring(default)
  52.     ok.Log("Created convar: ", Color(255, 120, 5), name, Color(255, 0, 0), " (default: " .. tostring(default) .. ", value: ", ret:GetString(), ")")
  53.     return ret
  54. end
  55.  
  56. ok.vars = {
  57.     aimbot = {
  58.         enabled = ok.CreateConsoleVar("ok_aimbot", 1),
  59.         autowall = ok.CreateConsoleVar("ok_aimbot_autowall", 1),
  60.         silent = ok.CreateConsoleVar("ok_aimbot_silent", 1),
  61.         nospread = ok.CreateConsoleVar("ok_aimbot_nospread", 1),
  62.         bodyaim = ok.CreateConsoleVar("ok_aimbot_body", 1),
  63.         static = ok.CreateConsoleVar("ok_aimbot_staticaa", 1),
  64.         nextshot = ok.CreateConsoleVar("ok_aimbot_nextshot", 1),
  65.         autoshoot = ok.CreateConsoleVar("ok_aimbot_autoshoot", 1),
  66.         team = ok.CreateConsoleVar("ok_aimbot_ignoreteam", 1),
  67.         friends = ok.CreateConsoleVar("ok_aimbot_ignorefriends", 0)
  68.     },
  69.  
  70.     visuals = {
  71.         esp = ok.CreateConsoleVar("ok_visuals_esp", 1),
  72.         name = ok.CreateConsoleVar("ok_visuals_esp_name", 1),
  73.         box = ok.CreateConsoleVar("ok_visuals_esp_box", 1),
  74.         weapon = ok.CreateConsoleVar("ok_visuals_esp_weapon", 1),
  75.         rank = ok.CreateConsoleVar("ok_visuals_esp_rank", 1),
  76.         health = ok.CreateConsoleVar("ok_visuals_esp_health", 1),
  77.         fov = ok.CreateConsoleVar("ok_visuals_fov", 90)
  78.     },
  79.  
  80.     misc = {
  81.         autohop = ok.CreateConsoleVar("ok_misc_autohop", 1),
  82.         highjump = ok.CreateConsoleVar("ok_misc_highjump", 0),
  83.         thirdperson = ok.CreateConsoleVar("ok_thirdperson", 1),
  84.         killspam = ok.CreateConsoleVar("ok_misc_killspam", 0),
  85.         robo = ok.CreateConsoleVar("ok_misc_killspam_robo", 1),
  86.         autostrafe = ok.CreateConsoleVar("ok_misc_autostrafe", 1)
  87.     },
  88.  
  89.     hvh = {
  90.         antiaim = ok.CreateConsoleVar("ok_hvh_antiaim", 1),
  91.         edge = ok.CreateConsoleVar("ok_hvh_aa_edge", 1),
  92.         edgemet = ok.CreateConsoleVar("ok_hvh_aa_edge_met", 3),
  93.         jitter = ok.CreateConsoleVar("ok_hvh_aa_jitter", 0),
  94.         adaptive = ok.CreateConsoleVar("ok_hvh_aa_adaptive", 1),
  95.         adapyaw = ok.CreateConsoleVar("ok_hvh_adap_yaw", 450),
  96.         adapmax = ok.CreateConsoleVar("ok_hvh_adap_max", 15),
  97.         adapspeed = ok.CreateConsoleVar("ok_hvh_adap_speed", 1),
  98.         fakeangles = ok.CreateConsoleVar("ok_hvh_aa_fakeangles", 0),
  99.         pitch = ok.CreateConsoleVar("ok_hvh_aa_pitch", -91),
  100.         yaw = ok.CreateConsoleVar("ok_hvh_aa_yaw", 270),
  101.         yawbase = ok.CreateConsoleVar("ok_hvh_aa_yawbase", 360),
  102.         yawadd = ok.CreateConsoleVar("ok_hvh_aa_yawadd", 45),
  103.         fakelag = ok.CreateConsoleVar("ok_hvh_fakelag", 1),
  104.         flchoke = ok.CreateConsoleVar("ok_hvh_fl_choke", 12),
  105.         flsend = ok.CreateConsoleVar("ok_hvh_fl_send", 1)
  106.     }
  107. }
  108.  
  109. ok.cones = {}
  110.  
  111. function _R.Entity.FireBullets(ent, bul)
  112.     if bul.Spread then
  113.         ok.cones[me:GetActiveWeapon():GetClass()] = bul.Spread * -1
  114.     end
  115.  
  116.     r.Entity.FireBullets(ent, bul)
  117. end
  118.  
  119. function ok.GetCone(wep)
  120.     local cone = 0
  121.     if !wep then return nil end
  122.     if wep.Cone then cone = wep.Cone end
  123.     if wep.Primary and wep.Primary.Cone then cone = wep.Primary.Cone end
  124.     if wep.Secondary and wep.Secondary.Cone then cone = wep.Secondary.Cone end
  125.     if cone != 0 then return Vector(-cone, -cone, -cone) end
  126.     return nil
  127. end
  128.  
  129. function ok.Compensate(cmd, ang)
  130.     local wep = me:GetActiveWeapon()
  131.     if !IsValid(wep) then return ang end
  132.     local cone = ok.cones[wep:GetClass()] or ok.GetCone(wep)
  133.     if !cone then return ang end
  134.     return ok.vars["aimbot"]["nospread"]:GetBool() and dickwrap.Predict(cmd, ang:Forward(), cone):Angle() or ang
  135. end
  136.  
  137. function ok.CheckVis(ent)
  138.     local sp = me:GetShootPos()
  139.     local ep = !ok.vars["aimbot"]["bodyaim"]:GetBool() and (ent:GetAttachment(ent:LookupAttachment("eyes") or ent:LookupAttachment("forward")).Pos) or ent:GetPos() + ent:OBBCenter()
  140.     ep = ep + ((ent:GetVelocity() * engine.TickInterval()) - (me:GetVelocity() * engine.TickInterval()))
  141.     local tdata = {
  142.         start = sp,
  143.         endpos = ep,
  144.         filter = {ent, me},
  145.         mask = MASK_SHOT
  146.     }
  147.  
  148.     local trace = util.TraceLine(tdata)
  149.     return trace.Fraction == 1, sp, ep
  150. end
  151.  
  152. function ok.CanWallbang(sp, ep, ent)
  153.     local tdata = {
  154.         start = sp,
  155.         endpos = ep,
  156.         filter = {ent, me},
  157.         mask = 1577075107
  158.     }
  159.  
  160.     local wall = util.TraceLine(tdata)
  161.     tdata.start = ep
  162.     tdata.endpos = sp
  163.     local wall2 = util.TraceLine(tdata)
  164.     if 17.5 > (wall2.HitPos - wall.HitPos):Length2D() then
  165.         return true
  166.     else
  167.         return false
  168.     end
  169. end
  170.  
  171. function ok.GetTarget()
  172.     local vis
  173.     ok.sp, ok.ep, ok.aat = nil, nil, nil
  174.  
  175.     for k,v in next, player.GetAll() do
  176.         if !ok.vars["aimbot"]["enabled"]:GetBool() or !v or !v:IsPlayer() or 0 >= v:Health() or v:IsDormant() or v == me then continue end
  177.         if ok.vars["aimbot"]["team"]:GetBool() and v:Team() == me:Team() then continue end
  178.         if ok.vars["aimbot"]["friends"]:GetBool() and v:GetFriendStatus() == "friend" then continue end
  179.         local sp, ep
  180.         vis, sp, ep = ok.CheckVis(v)
  181.         ok.aat = v
  182.         if vis or (ok.vars["aimbot"]["autowall"]:GetBool() and ok.CanWallbang(sp, ep, v)) then ok.sp = sp ok.ep = ep break else continue end
  183.     end
  184. end
  185.  
  186. function ok.DoSilent(cmd)
  187.     if !ok.fa then ok.fa = cmd:GetViewAngles() end
  188.     ok.fa = ok.fa + Angle(cmd:GetMouseY() * ok.ys, cmd:GetMouseX() * -ok.ys, 0)
  189.     ok.fa.p = math.Clamp(ok.fa.p, -89, 89)
  190.     ok.fa.y = math.NormalizeAngle(ok.fa.y)
  191. end
  192.  
  193. function ok.FixMove(cmd, ang)
  194.     local angs = cmd:GetViewAngles()
  195.     local fa = ok.fa
  196.     if ang then
  197.         fa = ang
  198.     end
  199.  
  200.     local viewang = Angle(0, angs.y, 0)
  201.     local fix = Vector(cmd:GetForwardMove(), cmd:GetSideMove(), 0)
  202.     fix = (fix:Angle() + (viewang - fa)):Forward() * fix:Length()
  203.    
  204.     if angs.p > 90 or angs.p < -90 then
  205.         fix.x = -fix.x
  206.     end
  207.    
  208.     cmd:SetForwardMove(fix.x)
  209.     cmd:SetSideMove(fix.y)
  210. end
  211.  
  212.  
  213. function ok.GetCurTime()
  214.     if IsFirstTimePredicted() then
  215.         ok.ct = CurTime() + engine.TickInterval()
  216.     end
  217. end
  218.  
  219. function ok.CanFire(nextshot)
  220.     if !nextshot then return true end
  221.     if !ok.ct or ok.ct == 0 then return false end
  222.     local wep = me:GetActiveWeapon() or NULL
  223.     if !IsValid(wep) then return false end
  224.     return wep:GetActivity() != ACT_RELOAD and ok.ct > wep:GetNextPrimaryFire()
  225. end
  226.  
  227. ok.as_max = 10^4
  228.  
  229. function ok.AutoHop(cmd)
  230.     if !ok.vars["misc"]["autohop"]:GetBool() then return end
  231.     local autostrafe = ok.vars["misc"]["autostrafe"]:GetBool()
  232.     if me:IsOnGround() and cmd:KeyDown(IN_JUMP) then
  233.         cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_JUMP))
  234.     else
  235.         if autostrafe and cmd:KeyDown(IN_JUMP) then
  236.             local mousex = cmd:GetMouseX()
  237.             if -1 > mousex or mousex > 1 then
  238.                 cmd:SetSideMove((mousex > 0) and ok.as_max or -ok.as_max)
  239.             end
  240.         end
  241.  
  242.         cmd:RemoveKey(IN_JUMP)
  243.     end
  244. end
  245.  
  246. function ok.Aimbot(cmd)
  247.     local autoshoot = ok.vars["aimbot"]["autoshoot"]:GetBool()
  248.     local nextshot = ok.vars["aimbot"]["nextshot"]:GetBool()
  249.     local silent = ok.vars["aimbot"]["silent"]:GetBool()
  250.     local fakelag = ok.vars["hvh"]["fakelag"]:GetBool()
  251.     local antiaim = ok.vars["hvh"]["antiaim"]:GetBool()
  252.     local static = ok.vars["aimbot"]["static"]:GetBool()
  253.     ok.DoSilent(cmd)
  254.     if cmd:CommandNumber() == 0 and !ok.vars["misc"]["thirdperson"]:GetBool() and (silent or antiaim or ok.vars["misc"]["walkbot"]:GetBool()) then cmd:SetViewAngles(ok.fa) return end
  255.  
  256.     if !fakelag then
  257.         bSendPacket = true
  258.     end
  259.  
  260.     if ok.sp and ok.ep then
  261.         local aafix = false
  262.         local ap = ok.Compensate(cmd, (ok.ep - ok.sp):Angle())
  263.         ap.p, ap.y = math.NormalizeAngle(ap.p), math.NormalizeAngle(ap.y)
  264.         if ok.CanFire(nextshot) and (autoshoot or cmd:KeyDown(IN_ATTACK)) then
  265.             if static then
  266.                 aafix = true
  267.                 ap.p = -ap.p - 180
  268.                 ap.y = ap.y + 180
  269.             end
  270.            
  271.             cmd:SetViewAngles(ap)
  272.             if autoshoot then
  273.                 if nextshot then
  274.                     cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK))
  275.                 else
  276.                     if ok.atk then
  277.                         cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK))
  278.                     else
  279.                         cmd:RemoveKey(IN_ATTACK)
  280.                     end
  281.  
  282.                     ok.atk = !ok.atk
  283.                 end
  284.             end
  285.  
  286.             if silent then
  287.                 ok.FixMove(cmd)
  288.             end
  289.  
  290.             if !fakelag then
  291.                 bSendPacket = false
  292.             end
  293.         else
  294.             if autoshoot and nextshoot then
  295.                 cmd:RemoveKey(IN_ATTACK)
  296.             end
  297.  
  298.             if antiaim then
  299.                 ok.AntiAim(cmd, true)
  300.             elseif silent then
  301.                 cmd:SetViewAngles(ok.fa)
  302.             end
  303.  
  304.             if !fakelag then
  305.                 bSendPacket = true
  306.             end
  307.         end
  308.  
  309.         return
  310.     end
  311.  
  312.     if antiaim or silent or ok.vars["misc"]["walkbot"]:GetBool() then
  313.         cmd:SetViewAngles(ok.fa)
  314.     end
  315. end
  316.  
  317. ok.fat = 0
  318. ok.aa_as = false
  319. ok.aa_a = 0
  320. ok.as_y = 0
  321. ok.aayaws = {}
  322.  
  323. function ok.AntiAim(cmd, force)
  324.     if cmd:CommandNumber() == 0 and !ok.vars["misc"]["thirdperson"]:GetBool() then return end
  325.     if me:GetActiveWeapon() != NULL and me:GetActiveWeapon():GetClass():lower():find("knife") then return end
  326.     if !force and (ok.sp != nil or ok.ep != nil) then return end
  327.     if !force and cmd:KeyDown(IN_ATTACK) then
  328.         if ok.vars["aimbot"]["static"]:GetBool() then
  329.             cmd:SetViewAngles(Angle(-ok.fa.p - 180, ok.fa.y + 180, 0))
  330.             ok.FixMove(cmd)
  331.         end
  332.  
  333.         return
  334.     end
  335.  
  336.     for i = 1, 5 do
  337.         ok.aayaws[i] = (ok.vars["hvh"]["yawbase"]:GetInt() * i) + ok.vars["hvh"]["yawadd"]:GetInt()
  338.     end
  339.  
  340.     if ok.vars["hvh"]["antiaim"]:GetBool() then
  341.         local fakeangles = ok.vars["hvh"]["fakeangles"]:GetBool()
  342.         local pitch = ok.vars["hvh"]["pitch"]:GetFloat() or 262
  343.  
  344.         local yaw = ok.vars["hvh"]["yaw"]:GetFloat() or 450
  345.  
  346.         if ok.vars["hvh"]["fakeangles"]:GetBool() and !ok.vars["hvh"]["fakelag"]:GetBool() then
  347.             if ok.fat >= 3 then
  348.                 bSendPacket = !bSendPacket
  349.                 ok.fat = 0
  350.             end
  351.         end
  352.  
  353.         ok.fat = ok.fat + 1
  354.  
  355.         if ok.vars["hvh"]["adaptive"]:GetBool() then
  356.             local adapmax = ok.vars["hvh"]["adapmax"]:GetInt()
  357.             local adapspeed = ok.vars["hvh"]["adapspeed"]:GetInt()
  358.             if ok.aa_a >= adapmax then
  359.                 ok.aa_a = adapmax
  360.                 ok.aa_as = false
  361.             elseif -adapmax >= ok.aa_a then
  362.                 ok.aa_a = -adapmax
  363.                 ok.aa_as = true
  364.             end
  365.  
  366.             if ok.aa_as then
  367.                 ok.aa_a = ok.aa_a + adapspeed
  368.             else
  369.                 ok.aa_a = ok.aa_a - adapspeed
  370.             end
  371.  
  372.             local adapyaw = ok.vars["hvh"]["adapyaw"]:GetFloat()
  373.             local aay = (ok.aat and ok.aat != NULL) and (ok.aat:GetAttachment(ok.aat:LookupAttachment("forward") or ok.aat:LookupAttachment("eyes")).Pos - me:GetShootPos()):Angle().y or 0
  374.             if !fakeangles then
  375.                 cmd:SetViewAngles(Angle(pitch, aay + adapyaw + ok.aa_a, 0))
  376.             else
  377.                 if bSendPacket then
  378.                     cmd:SetViewAngles(Angle(pitch, aay + adapyaw, 0))
  379.                 else
  380.                     cmd:SetViewAngles(Angle(pitch, aay + adapyaw - 92, 0))
  381.                 end
  382.             end
  383.         elseif ok.vars["hvh"]["jitter"]:GetBool() then
  384.             if !fakeangles then
  385.                 cmd:SetViewAngles(Angle(pitch, table.Random(ok.aayaws) + math.random(-2, 2), 0))
  386.             else
  387.                 if bSendPacket then
  388.                     cmd:SetViewAngles(Angle(pitch, table.Random(ok.aayaws) + math.random(-2, 2), 0))
  389.                 else
  390.                     cmd:SetViewAngles(Angle(pitch, table.Random(ok.aayaws) - 92 + math.random(-10, 10), 0))
  391.                 end
  392.             end
  393.         else
  394.             if !fakeangles then
  395.                 cmd:SetViewAngles(Angle(pitch, yaw, 0))
  396.             else
  397.                 if bSendPacket then
  398.                     cmd:SetViewAngles(Angle(pitch, yaw, 0))
  399.                 else
  400.                     cmd:SetViewAngles(Angle(pitch, yaw - 92, 0))
  401.                 end
  402.             end
  403.         end
  404.  
  405.         if ok.vars["hvh"]["edge"]:GetBool() then
  406.             local setp = false
  407.             local edge = false
  408.             local ang = Angle(0, 0, 0)
  409.             local eyepos = me:GetShootPos() - Vector(0, 0, 5)
  410.  
  411.             for y = 1, 8 do
  412.                 local tmp = Angle(0, y * 45, 0)
  413.                 local forward = tmp:Forward()
  414.                 forward = forward * 35
  415.  
  416.                 local tdata
  417.                 tdata = {start = eyepos, endpos = eyepos + forward, filter = me, mask = MASK_SOLID}
  418.                 local trace = util.TraceLine(tdata)
  419.            
  420.                 if trace.Fraction != 1 then
  421.                     local negate = trace.HitNormal * -1
  422.                     tmp.y = negate:Angle().y
  423.                    
  424.                     local left = (tmp + Angle(0, 11.25, 0)):Forward() * 35
  425.                     local right = (tmp - Angle(0, 11.25, 0)):Forward() * 35
  426.                     tdata = {start = eyepos, endpos = eyepos + left, filter = me, mask = MASK_SOLID}
  427.                     local lt = util.TraceLine(tdata)
  428.                     tdata = {start = eyepos, endpos = eyepos + right, filter = me, mask = MASK_SOLID}
  429.                     local rt = util.TraceLine(tdata)
  430.                     local ltw = lt.Fraction == 1
  431.                     local rtw = rt.Fraction == 1
  432.  
  433.                     local edgem = ok.vars["hvh"]["edgemet"]:GetInt()
  434.                     if edgem == 1 then
  435.                         if ltw or rtw then
  436.                             tmp.y = tmp.y + 180
  437.                         end
  438.  
  439.                         ang.y = 270 - tmp.y + 360
  440.                     elseif edgem == 2 or edgem == 3 then
  441.                         ang.y = tmp.y + (edgem == 2 and 180 or 360)
  442.                     elseif edgem == 4 then
  443.                         if ltw or rtw then
  444.                             tmp.y = tmp.y + 180
  445.                         end
  446.  
  447.                         ang.y = 270 - tmp.y + math.random(-15, 15)
  448.                     end
  449.  
  450.                     edge = true
  451.                     break
  452.                 end
  453.             end
  454.  
  455.             if edge then
  456.                 if !fakeangles then
  457.                     cmd:SetViewAngles(Angle(ang.p != 0 and ang.p or pitch, ang.y, 0))
  458.                 else
  459.                     if bSendPacket then
  460.                         cmd:SetViewAngles(Angle(ang.p != 0 and ang.p or pitch, ang.y, 0))
  461.                     else
  462.                         cmd:SetViewAngles(Angle(pitch, ang.y - 92, 0))
  463.                     end
  464.                 end
  465.             end
  466.         end
  467.  
  468.         pitch = cmd:GetViewAngles().p
  469.         ok.aas = !ok.aas
  470.         ok.FixMove(cmd)
  471.     end
  472. end
  473.  
  474. function ok.FakeLag(cmd)
  475.     if cmd:CommandNumber() == 0 then return end
  476.     local choke = ok.vars["hvh"]["flchoke"]:GetInt()
  477.     local send = ok.vars["hvh"]["flsend"]:GetInt()
  478.     ok.fltm = choke + send
  479.  
  480.     if ok.vars["hvh"]["fakelag"]:GetBool() then
  481.         ok.flt = ok.flt + 1
  482.        
  483.         if ok.flt > ok.fltm then
  484.             ok.flt = 1
  485.         end
  486.  
  487.         if send >= ok.flt then
  488.             bSendPacket = true
  489.         else
  490.             bSendPacket = false
  491.         end
  492.     end
  493. end
  494.  
  495. function ok.HighJump(cmd)
  496.     if !ok.vars["misc"]["highjump"]:GetBool() then return end
  497.     local pos = me:GetPos()
  498.     local tdata = {start = pos, endpos = pos - Vector(0, 0, 1337), mask = MASK_SOLID}
  499.     local trace = util.TraceLine(tdata)
  500.     local len = (pos - trace.HitPos).z
  501.     if len > 25 and 50 > len then
  502.         cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_DUCK))
  503.     else
  504.         cmd:RemoveKey(IN_DUCK)
  505.     end
  506. end
  507.  
  508. function ok.Visuals()
  509.     ok.er = math.sin(CurTime() * 4) * 127 + 128
  510.     ok.eg = math.sin(CurTime() * 4 + 2) * 127 + 128
  511.     ok.eb = math.sin(CurTime() * 4 + 4) * 127 + 128
  512.     draw.SimpleText("SkidScorcher Public", "wireless gamer", 4, 40, Color(ok.er, ok.eg, ok.eb), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  513.  
  514.     for k,v in next, player.GetAll() do
  515.         if !ok.vars["visuals"]["esp"]:GetBool() or !v:IsValid() or !v:IsPlayer() or !v:Alive() or 0 >= v:Health() then continue end
  516.         if !ok.vars["misc"]["thirdperson"]:GetBool() and v == me then continue end
  517.         local min, max = v:GetCollisionBounds()
  518.         local pos = v:GetPos()
  519.         local top, bottom = (pos + Vector(0, 0, max.z)):ToScreen(), (pos - Vector(0, 0, 8)):ToScreen()
  520.         local middle = bottom.y - top.y
  521.         local width = middle / 2.425
  522.  
  523.         if ok.vars["visuals"]["name"]:GetBool() then
  524.             draw.SimpleText(v:Nick(), "visual gamer", bottom.x, top.y, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM)
  525.         end
  526.  
  527.         if ok.vars["visuals"]["box"]:GetBool() then
  528.             surface.SetDrawColor(me:Team() == v:Team() and Color(0, 100, 255) or Color(200, 225, 0))
  529.             surface.DrawOutlinedRect(bottom.x - width, top.y, width * 2, middle)
  530.             surface.SetDrawColor(Color(0, 0, 0))
  531.             surface.DrawOutlinedRect(bottom.x - width - 1, top.y - 1, width * 2 + 2, middle + 2)
  532.             surface.DrawOutlinedRect(bottom.x - width + 1, top.y + 1, width * 2 - 2, middle - 2)
  533.         end
  534.  
  535.         ok.drawpos = 0
  536.  
  537.         if ok.vars["visuals"]["weapon"]:GetBool() then
  538.             local wep = v:GetActiveWeapon()
  539.             if wep and wep != NULL then
  540.                 draw.SimpleText(wep.GetPrintName and wep:GetPrintName() or wep:GetClass(), "visual gamer", bottom.x, bottom.y + ok.drawpos, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)
  541.                 ok.drawpos = ok.drawpos + 10
  542.             end
  543.         end
  544.  
  545.         if ok.vars["visuals"]["rank"]:GetBool() then
  546.             draw.SimpleText(v.GetUserGroup and v:GetUserGroup() or "__norank", "visual gamer", bottom.x, bottom.y + ok.drawpos, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)
  547.             ok.drawpos = ok.drawpos + 10
  548.         end
  549.  
  550.         if ok.vars["visuals"]["health"]:GetBool() then
  551.             local health = math.Clamp(v:Health(), 0, 100)
  552.             local green = health * 2.55
  553.             local red = 255 - green
  554.             surface.SetDrawColor(Color(0, 0, 0))
  555.             surface.DrawRect(bottom.x + width + 2, top.y - 1, 4, middle + 2)
  556.             surface.SetDrawColor(Color(red, green, 0))
  557.             local height = health * middle / 100
  558.             surface.DrawRect(bottom.x + width + 3, top.y + (middle - height), 2, height)
  559.         end
  560.     end
  561. end
  562.  
  563. function ok.CalcView(ply, pos, angle, fov, nearZ, farZ)
  564.     local view = {}
  565.     view.angles = (ok.vars["hvh"]["antiaim"]:GetBool() or ok.vars["aimbot"]["silent"]:GetBool() or ok.vars["misc"]["walkbot"]:GetBool()) and ok.fa or angle
  566.     view.origin = ok.vars["misc"]["thirdperson"]:GetBool() and (pos - ok.fa:Forward() * 100) or pos
  567.     view.fov = ok.vars["visuals"]["fov"]:GetInt()
  568.  
  569.     return view
  570. end
  571.  
  572. function ok.ShouldDrawLocalPlayer()
  573.     return ok.vars["misc"]["thirdperson"]:GetBool()
  574. end
  575.  
  576. function ok.PreDrawOpaqueRenderables()
  577.     for k,v in next, player.GetAll() do
  578.         local ang = v:EyeAngles()
  579.         ok.rang[v] = ang
  580.     end
  581. end
  582.  
  583. function ok.ResetConsoleVars()
  584.     for k,v in next, ok.cvars do
  585.         me:ConCommand(k .. " " .. v)
  586.         ok.Log("Reset convar: ", Color(255, 120, 5), k, Color(255, 0, 0), " (value: ", v, ")")
  587.     end
  588. end
  589.  
  590. function ok.FindPlayerWithID(userid)
  591.     for k,v in next, player.GetAll() do
  592.         if v:UserID() == userid then
  593.             return v
  594.         end
  595.     end
  596.  
  597.     return false
  598. end
  599.  
  600. function ok.PlayerHurt(data)
  601.     if !ok.vars["misc"]["killspam"]:GetBool() then return end
  602.     local health = data.health
  603.     local id = data.userid
  604.     local attackerid = data.attacker
  605.     local target = ok.FindPlayerWithID(id)
  606.     local attacker = ok.FindPlayerWithID(attackerid)
  607.     if !target or !attacker then return end
  608.     if attacker != NULL and target != NULL then
  609.         if attacker == me then
  610.             target.hits = target.hits and target.hits + 1 or 1
  611.             target.hitsme = 0
  612.             if health == 0 then
  613.                 if ok.vars["misc"]["robo"]:GetBool() then
  614.                     if MEGA then
  615.                         MEGA.TextToSpeech("easy " .. tostring(target.hits) .. " tap")
  616.                     end
  617.                 end
  618.  
  619.                 me:ConCommand("say [SS] owned " .. target:Nick() .. " in " .. tostring(target.hits) .. " shot" .. (target.hits > 1 and "s" or ""))
  620.                 target.hits = 0
  621.             end
  622.         elseif target == me then
  623.             attacker.hitsme = attacker.hitsme and attacker.hitsme + 1 or 1
  624.             attacker.hits = 0
  625.             if health == 0 then
  626.                 local pingadvantage = target:Ping() - attacker:Ping()
  627.                 if pingadvantage > 50 then
  628.                     me:ConCommand("say [SS] ping advantage: i have " .. tostring(pingadvantage) .. " more ping than " .. attacker:Nick())
  629.                 elseif attacker.hitsme > 1 then
  630.                     me:ConCommand("say [SS] it took " .. attacker:Nick() .. " " .. tostring(attacker.hitsme) .. " shots to kill me")
  631.                     attacker.hitsme = 0
  632.                 else
  633.                     me:ConCommand("say [SS] i just got owned by " .. attacker:Nick())
  634.                 end
  635.             end
  636.         end
  637.     end
  638. end
  639.  
  640. function ok.CreateMove(cmd)
  641.     ok.AutoHop(cmd)
  642.     ok.Aimbot(cmd)
  643.     ok.AntiAim(cmd)
  644.     ok.FakeLag(cmd)
  645.     ok.HighJump(cmd)
  646. end
  647.  
  648. function ok.AddHook(htype, name, func)
  649.     hook.Add(htype, name, func)
  650.     ok.Log("Created ", Color(255, 120, 5), htype, Color(255, 190, 5), " hook: ", Color(255, 120, 5), name, Color(255, 0, 0), " (" .. tostring(func) .. ")")
  651. end
  652.  
  653. ok.curtab = 0
  654. ok.menuitems = {}
  655.  
  656. function ok.CreateTab(frame, name, index, max)
  657.     local tab = vgui.Create("DButton", frame)
  658.     tab:SetText("")
  659.     tab:SetSize(frame:GetWide() / max - 1, 30)
  660.     tab:SetPos((index - 1) * (tab:GetWide() + 1), 24)
  661.     function tab.Paint(self, width, height)
  662.         surface.SetDrawColor(Color(100, 100, 100))
  663.         surface.DrawRect(0, 0, width, height)
  664.         if ok.curtab == index then
  665.             surface.SetDrawColor(Color(255, 255, 255, 15))
  666.             surface.DrawRect(0, 0, width, height)
  667.         end
  668.  
  669.         draw.SimpleText(name, "gamer tab", width / 2, height / 2, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  670.     end
  671.  
  672.     function tab.DoClick()
  673.         ok.curtab = index
  674.         for i = 1, #ok.menuitems do
  675.             local items = ok.menuitems[i]
  676.             for k,v in next, items do
  677.                 v:SetVisible(i == index)
  678.             end
  679.         end
  680.     end
  681. end
  682.  
  683. function ok.CreateCheckbox(frame, name, tab, index, cvtab, cvname)
  684.     local cvar = ok.vars[cvtab][cvname]
  685.     local check = vgui.Create("DButton", frame)
  686.     check:SetText("")
  687.     surface.SetFont("gamer tab")
  688.     local wid = surface.GetTextSize(name)
  689.     check:SetSize(26 + wid, 18)
  690.     local x = 10
  691.     local y = 64 + (22 * (index - 1))
  692.     if (y + 27) >= frame:GetTall() then
  693.         local firstindex = 0
  694.         for i = 1, index do
  695.             local _y = 64 + (22 * (i - 1))
  696.             if (_y + 27) >= frame:GetTall() then
  697.                 firstindex = i
  698.                 break
  699.             end
  700.         end
  701.  
  702.         x = (x * 2.5) + 192
  703.         y = 64 + (22 * (index - (firstindex - 1) - 1))
  704.     end
  705.  
  706.     check:SetPos(x, y)
  707.     function check.Paint(self, width, height)
  708.         surface.SetDrawColor(Color(100, 100, 100))
  709.         surface.DrawOutlinedRect(0, 0, 18, height)
  710.         if cvar:GetBool() then
  711.             surface.DrawRect(0, 0, 18, height)
  712.         end
  713.  
  714.         draw.SimpleText(name, "gamer tab", 24, height / 2, Color(255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  715.     end
  716.  
  717.     function check.DoClick()
  718.         cvar:SetBool(!cvar:GetBool())
  719.     end
  720.  
  721.     if ok.curtab != tab then
  722.         check:SetVisible(false)
  723.     end
  724.  
  725.     ok.menuitems[tab][#ok.menuitems[tab] + 1] = check
  726. end
  727.  
  728. function ok.CreateSlider(frame, name, tab, index, cvtab, cvname, min, max, dec)
  729.     min = min * 10
  730.     max = max * 10
  731.     local cvar = ok.vars[cvtab][cvname]
  732.     local slider = vgui.Create("DButton", frame)
  733.     slider:SetText("")
  734.     slider:SetSize(192, 32)
  735.     local x = 10
  736.     local y = 64 + (22 * (index - 1))
  737.     if (y + 27) >= frame:GetTall() then
  738.         local firstindex = 0
  739.         for i = 1, index do
  740.             local _y = 64 + (22 * (i - 1))
  741.             if (_y + 27) >= frame:GetTall() then
  742.                 firstindex = i
  743.                 break
  744.             end
  745.         end
  746.  
  747.         x = (x * 2.5) + 192
  748.         y = 64 + (22 * (index - (firstindex - 1) - 1))
  749.     end
  750.  
  751.     slider:SetPos(x, y)
  752.     function slider.Paint(self, width, height)
  753.         draw.SimpleText(name .. " [" .. math.Round(cvar:GetFloat(), dec) .. "]", "gamer tab", width / 2, height / 2 - (height / 4), Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  754.         surface.SetDrawColor(Color(100, 100, 100))
  755.         surface.DrawRect(0, height / 1.25, width, 1)
  756.         surface.DrawRect(math.Clamp(((cvar:GetFloat() * 10) - min) / (max - min) * width - 2, 0, width - 4), height / 1.25 - 4, 4, 8)
  757.         if input.IsMouseDown(MOUSE_LEFT) then
  758.             local fx, fy = frame:GetPos()
  759.             local sx, sy = slider:GetPos()
  760.             local rx = fx + sx
  761.             local ry = fy + sy
  762.             local ssx, ssy = slider:GetSize()
  763.             local mx = gui.MouseX()
  764.             local my = gui.MouseY()
  765.             local rmx = mx - rx
  766.             if ((mx >= rx) and ((rx + ssx) >= mx)) and ((my >= ry) and ((ry + ssy) >= my)) then
  767.                 cvar:SetFloat(math.Round(rmx / width * ((max / 10) - (min / 10)) + (min / 10), dec))
  768.             end
  769.         end
  770.     end
  771.  
  772.     function slider.DoClick() end
  773.  
  774.     if ok.curtab != tab then
  775.         slider:SetVisible(false)
  776.     end
  777.  
  778.     ok.menuitems[tab][#ok.menuitems[tab] + 1] = slider
  779. end
  780.  
  781. function ok.Menu()
  782.     ok.menuitems = {{}, {}, {}, {}}
  783.     local frame = vgui.Create("DFrame")
  784.     frame:SetTitle("")
  785.     frame:SetSize(600, 450)
  786.     frame:SetPos(0, 0)
  787.     frame:ShowCloseButton(false)
  788.     frame:SetDraggable(false)
  789.     frame:Center()
  790.     frame:MakePopup()
  791.     function frame.Paint(self, width, height)
  792.         surface.SetDrawColor(Color(75, 75, 75))
  793.         surface.DrawRect(0, 0, width, height)
  794.         draw.SimpleText("SkidScorcher Public", "gamer title", width / 2, 12, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  795.     end
  796.  
  797.     local close = vgui.Create("DButton", frame)
  798.     close:SetText("")
  799.     close:SetSize(24, 24)
  800.     close:SetPos(frame:GetWide() - 24, 0)
  801.     function close.Paint(self, width, height)
  802.         surface.SetDrawColor(Color(255, 0, 0))
  803.         surface.DrawRect(0, 0, width, height)
  804.     end
  805.  
  806.     function close.DoClick()
  807.         frame:Remove()
  808.     end
  809.  
  810.     //// TABS \\\\
  811.     ok.CreateTab(frame, "Aimbot", 1, 4)
  812.     ok.CreateTab(frame, "Visuals", 2, 4)
  813.     ok.CreateTab(frame, "Misc", 3, 4)
  814.     ok.CreateTab(frame, "HvH", 4, 4)
  815.  
  816.     //// AIMBOT TAB \\\\
  817.     ok.CreateCheckbox(frame, "Enabled", 1, 1, "aimbot", "enabled")
  818.     ok.CreateCheckbox(frame, "AutoWall", 1, 2, "aimbot", "autowall")
  819.     ok.CreateCheckbox(frame, "Silent", 1, 3, "aimbot", "silent")
  820.     ok.CreateCheckbox(frame, "NoSpread", 1, 4, "aimbot", "nospread")
  821.     ok.CreateCheckbox(frame, "BodyAim", 1, 5, "aimbot", "bodyaim")
  822.     ok.CreateCheckbox(frame, "Static AA", 1, 6, "aimbot", "static")
  823.     ok.CreateCheckbox(frame, "NextShot", 1, 7, "aimbot", "nextshot")
  824.     ok.CreateCheckbox(frame, "AutoShoot", 1, 8, "aimbot", "autoshoot")
  825.     ok.CreateCheckbox(frame, "Ignore Team", 1, 9, "aimbot", "team")
  826.     ok.CreateCheckbox(frame, "Ignore Friends", 1, 10, "aimbot", "friends")
  827.  
  828.     //// VISUALS TAB \\\\
  829.     ok.CreateCheckbox(frame, "ESP Enabled", 2, 1, "visuals", "esp")
  830.     ok.CreateCheckbox(frame, "Name ESP", 2, 2, "visuals", "name")
  831.     ok.CreateCheckbox(frame, "Box ESP", 2, 3, "visuals", "box")
  832.     ok.CreateCheckbox(frame, "Weapon ESP", 2, 4, "visuals", "weapon")
  833.     ok.CreateCheckbox(frame, "Rank ESP", 2, 5, "visuals", "rank")
  834.     ok.CreateCheckbox(frame, "Healthbar", 2, 6, "visuals", "health")
  835.     ok.CreateSlider(frame, "FOV", 2, 7, "visuals", "fov", 65, 125, 0)
  836.  
  837.     //// MISC TAB \\\\
  838.     ok.CreateCheckbox(frame, "AutoHop", 3, 1, "misc", "autohop")
  839.     ok.CreateCheckbox(frame, "HighJump", 3, 2, "misc", "highjump")
  840.     ok.CreateCheckbox(frame, "Third Person", 3, 3, "misc", "thirdperson")
  841.     ok.CreateCheckbox(frame, "KillSpam", 3, 4, "misc", "killspam")
  842.     ok.CreateCheckbox(frame, "KillSpam TTS", 3, 5, "misc", "robo")
  843.     ok.CreateCheckbox(frame, "AutoStrafe", 3, 6, "misc", "autostrafe")
  844.  
  845.     //// HVH TAB \\\\
  846.     ok.CreateCheckbox(frame, "AntiAim", 4, 1, "hvh", "antiaim")
  847.     ok.CreateCheckbox(frame, "Edge AntiAim", 4, 2, "hvh", "edge")
  848.     ok.CreateSlider(frame, "Edge Method", 4, 3, "hvh", "edgemet", 1, 4, 0)
  849.     ok.CreateCheckbox(frame, "Adaptive AntiAim", 4, 5, "hvh", "adaptive")
  850.     ok.CreateSlider(frame, "Adaptive Yaw", 4, 6, "hvh", "adapyaw", 270, 540, 0)
  851.     ok.CreateSlider(frame, "Adaptive Max", 4, 8, "hvh", "adapmax", 2, 30, 0)
  852.     ok.CreateSlider(frame, "Adaptive Speed", 4, 10, "hvh", "adapspeed", 1, 15, 0)
  853.     ok.CreateSlider(frame, "AntiAim Pitch", 4, 12, "hvh", "pitch", -250, 250, 0)
  854.     ok.CreateSlider(frame, "AntiAim Yaw", 4, 14, "hvh", "yaw", 270, 541, 0)
  855.     ok.CreateCheckbox(frame, "FakeLag", 4, 16, "hvh", "fakelag")
  856.     ok.CreateSlider(frame, "FakeLag Choke", 4, 17, "hvh", "flchoke", 2, 14, 0)
  857. end
  858.  
  859. ok.AddHook("Think", "ok.GetTarget", ok.GetTarget)
  860. ok.AddHook("Move", "ok.GetCurTime", ok.GetCurTime)
  861. ok.AddHook("HUDPaint", "ok.Visuals", ok.Visuals)
  862. ok.AddHook("CreateMove", "ok.CreateMove", ok.CreateMove)
  863. ok.AddHook("CalcView", "ok.CalcView", ok.CalcView)
  864. ok.AddHook("ShouldDrawLocalPlayer", "ok.ShouldDrawLocalPlayer", ok.ShouldDrawLocalPlayer)
  865. ok.AddHook("PreDrawOpaqueRenderables", "ok.PreDrawOpaqueRenderables", ok.PreDrawOpaqueRenderables)
  866. gameevent.Listen("player_hurt")
  867. ok.AddHook("player_hurt", "ok.PlayerHurt", ok.PlayerHurt)
  868. concommand.Add("ok_menu", ok.Menu)
  869. ok.Log("Created concommand: ", Color(255, 120, 5), "ok_menu", Color(255, 0, 0), " (" .. tostring(ok.Menu) .. ")")
  870. concommand.Add("ok_resetcv", ok.ResetConsoleVars)
  871. ok.Log("Created concommand: ", Color(255, 120, 5), "ok_resetcv", Color(255, 0, 0), " (" .. tostring(ok.ResetConsoleVars) .. ")")
  872. ok.Log("Loaded!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement