daily pastebin goal
16%
SHARE
TWEET

Gmod leak dump part 7: titanium smasher

Caliber_ Dec 31st, 2017 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require("bsendpacket")
  2. require("dickwrap")
  3. //require("pa4")
  4.  
  5. surface.CreateFont("ts font #1", {font = "Open Sans MS", size = 45})
  6. surface.CreateFont("ts font #2", {font = "Courier New", size = 15, weight = 500, outline = true})
  7. surface.CreateFont("gamer title", {font = "Trebuchet", size = 18, weight = 650})
  8. surface.CreateFont("gamer tab", {font = "Trebuchet", size = 16, weight = 550})
  9. local me = LocalPlayer()
  10. ts = {}
  11. ts.rang = {}
  12. ts.cvars = {}
  13. ts.ys = GetConVarNumber("m_yaw")
  14. ts.aat = nil
  15. ts.aas = false
  16. ts.atk = false
  17. ts.ld = false
  18. ts.gd = false
  19. ts.hm = 0
  20. ts.dc = 0
  21. ts.ct = 0
  22. ts.flt = 0
  23. ts.fltm = 0
  24. ts.er = 0
  25. ts.eg = 0
  26. ts.eb = 0
  27. ts.fa = nil
  28. ts.sp = nil
  29. ts.ep = nil
  30. ts.atl = 0
  31.  
  32. function ts.Log(...)
  33.     MsgC(Color(5, 130, 255), "Titanium Smasher ", Color(255, 190, 5), ...)
  34.     MsgN("")
  35. end
  36.  
  37. ts.Log("Loading...")
  38.  
  39. function ts.CreateConsoleVar(name, default)
  40.     local ret = CreateClientConVar(name, default)
  41.     ts.cvars[name] = tostring(default)
  42.     ts.Log("Created convar: ", Color(255, 120, 5), name, Color(255, 0, 0), " (default: " .. tostring(default) .. ", value: ", ret:GetString(), ")")
  43.     return ret
  44. end
  45.  
  46. ts.vars = {
  47.     aimbot = {
  48.         enabled = ts.CreateConsoleVar("ts_aimbot", 1),
  49.         point = ts.CreateConsoleVar("ts_aimbot_point", 0.5),
  50.         multipoint = ts.CreateConsoleVar("ts_aimbot_multipoint", 1),
  51.         mpmode = ts.CreateConsoleVar("ts_aimbot_multipoint_mode", 1),
  52.         autowall = ts.CreateConsoleVar("ts_aimbot_autowall", 0),
  53.         silent = ts.CreateConsoleVar("ts_aimbot_silent", 1),
  54.         nospread = ts.CreateConsoleVar("ts_aimbot_nospread", 1),
  55.         bodyaim = ts.CreateConsoleVar("ts_aimbot_body", 0),
  56.         static = ts.CreateConsoleVar("ts_aimbot_staticaa", 1),
  57.         nextshot = ts.CreateConsoleVar("ts_aimbot_nextshot", 1),
  58.         autoshoot = ts.CreateConsoleVar("ts_aimbot_autoshoot", 1),
  59.         team = ts.CreateConsoleVar("ts_aimbot_ignoreteam", 1),
  60.         friends = ts.CreateConsoleVar("ts_aimbot_ignorefriends", 0)
  61.     },
  62.  
  63.     visuals = {
  64.         esp = ts.CreateConsoleVar("ts_visuals_esp", 1),
  65.         name = ts.CreateConsoleVar("ts_visuals_esp_name", 1),
  66.         box = ts.CreateConsoleVar("ts_visuals_esp_box", 1),
  67.         weapon = ts.CreateConsoleVar("ts_visuals_esp_weapon", 1),
  68.         rank = ts.CreateConsoleVar("ts_visuals_esp_rank", 1),
  69.         angles = ts.CreateConsoleVar("ts_visuals_esp_angles", 1),
  70.         health = ts.CreateConsoleVar("ts_visuals_esp_health", 1),
  71.         snapline = ts.CreateConsoleVar("ts_visuals_snapline", 1),
  72.         chams = ts.CreateConsoleVar("ts_visuals_chams", 1),
  73.         wepchams = ts.CreateConsoleVar("ts_visuals_wepchams", 1),
  74.         watermark = ts.CreateConsoleVar("ts_visuals_watermark", 1),
  75.         fullbright = ts.CreateConsoleVar("ts_visuals_fullbright", 1),
  76.         asus = ts.CreateConsoleVar("ts_visuals_asuswalls", 1),
  77.         viewmodel = ts.CreateConsoleVar("ts_visuals_viewmodel", 1),
  78.         fov = ts.CreateConsoleVar("ts_visuals_fov", 90)
  79.     },
  80.  
  81.     misc = {
  82.         autohop = ts.CreateConsoleVar("ts_misc_autohop", 1),
  83.         highjump = ts.CreateConsoleVar("ts_misc_highjump", 0),
  84.         thirdperson = ts.CreateConsoleVar("ts_thirdperson", 1),
  85.         killspam = ts.CreateConsoleVar("ts_misc_killspam", 0),
  86.         ksmode = ts.CreateConsoleVar("ts_misc_killspam_mode", 1),
  87.         robo = ts.CreateConsoleVar("ts_misc_killspam_robo", 1),
  88.         autostrafe = ts.CreateConsoleVar("ts_misc_autostrafe", 1),
  89.         autogain = ts.CreateConsoleVar("ts_misc_autostrafe_gain", 1),
  90.         autogainmin = ts.CreateConsoleVar("ts_misc_autostrafe_gain_min", 1.25),
  91.         autogainmax = ts.CreateConsoleVar("ts_misc_autostrafe_gain_max", 5.25),
  92.         autogainmult = ts.CreateConsoleVar("ts_misc_autostrafe_gain_velmult", 0.01),
  93.         autogainkey = ts.CreateConsoleVar("ts_misc_autostrafe_gain_key", "f"),
  94.         walkbot = ts.CreateConsoleVar("ts_misc_walkbot", 0),
  95.         walkbotrec = ts.CreateConsoleVar("ts_misc_walkbot_rec", 0)
  96.     },
  97.  
  98.     hvh = {
  99.         antiaim = ts.CreateConsoleVar("ts_hvh_antiaim", 1),
  100.         edge = ts.CreateConsoleVar("ts_hvh_aa_edge", 1),
  101.         edgemet = ts.CreateConsoleVar("ts_hvh_aa_edge_met", 1),
  102.         adaptive = ts.CreateConsoleVar("ts_hvh_aa_adaptive", 1),
  103.         adapyaw = ts.CreateConsoleVar("ts_hvh_adap_yaw", 450),
  104.         adapmax = ts.CreateConsoleVar("ts_hvh_adap_max", 15),
  105.         adapspeed = ts.CreateConsoleVar("ts_hvh_adap_speed", 1),
  106.         fakeangles = ts.CreateConsoleVar("ts_hvh_aa_fakeangles", 0),
  107.         pitch = ts.CreateConsoleVar("ts_hvh_aa_pitch", -91),
  108.         pitchrand = ts.CreateConsoleVar("ts_hvh_aa_pitch_addrand", 1),
  109.         pitchrandmin = ts.CreateConsoleVar("ts_hvh_aa_pitch_rand_min", -3),
  110.         pitchrandmax = ts.CreateConsoleVar("ts_hvh_aa_pitch_rand_max", 3),
  111.         yaw = ts.CreateConsoleVar("ts_hvh_aa_yaw", -541),
  112.         roll = ts.CreateConsoleVar("ts_hvh_aa_roll", 0),
  113.         fakelag = ts.CreateConsoleVar("ts_hvh_fakelag", 0),
  114.         flchtse = ts.CreateConsoleVar("ts_hvh_fl_chtse", 9),
  115.         flsend = ts.CreateConsoleVar("ts_hvh_fl_send", 4),
  116.         aaa = ts.CreateConsoleVar("ts_hvh_antiaa", 1)
  117.     }
  118. }
  119.  
  120. ts.pitches = {
  121.     ["-89"] = {
  122.         -1.05,
  123.     },
  124.  
  125.     ["89"] = {
  126.         -5.00,
  127.         1.05,
  128.     }
  129. }
  130.  
  131. ts.cones = {}
  132.  
  133. function ts.GetCone(wep)
  134.     local cone = 0
  135.     if !wep then return nil end
  136.     if wep.Cone then cone = wep.Cone end
  137.     if wep.Primary and wep.Primary.Cone then cone = wep.Primary.Cone end
  138.     if wep.Secondary and wep.Secondary.Cone then cone = wep.Secondary.Cone end
  139.     if cone != 0 then return Vector(-cone, -cone, -cone) end
  140.     return nil
  141. end
  142.  
  143. function ts.Compensate(cmd, ang)
  144.     local wep = me:GetActiveWeapon()
  145.     if !IsValid(wep) then return ang end
  146.     local cone = ts.cones[wep:GetClass()]
  147.     if !cone then return ang end
  148.     return (ts.vars["aimbot"]["nospread"]:GetBool() and dickwrap.Predict(cmd, ang:Forward(), cone):Angle()) or ang
  149. end
  150.  
  151. ts.pti = 0
  152.  
  153. function ts.SetTickInterval()
  154.     local interp = GetConVar("cl_interp"):GetFloat()
  155.     local ratio = GetConVar("cl_interp_ratio"):GetFloat()
  156.     local updaterate = GetConVar("cl_updaterate"):GetFloat()
  157.     local interpolation = math.max(interp, ratio / updaterate)
  158.     ts.pti = engine.TickInterval() * interpolation
  159. end
  160.  
  161. function ts.CheckVis(ent)
  162.     local bodyaim = ts.vars["aimbot"]["bodyaim"]:GetBool()
  163.     local sp = me:GetShootPos()
  164.     local ep
  165.     local bone, ang, min, max
  166.     if bodyaim then
  167.         bone, ang = ent:GetBonePosition(ent:GetHitBoxBone(15, 0))
  168.         min, max = ent:GetHitBoxBounds(15, 0)
  169.         min:Rotate(ang)
  170.         max:Rotate(ang)
  171.         ep = bone + ((min + max) * ts.vars["aimbot"]["point"]:GetFloat())
  172.     else
  173.         bone, ang = ent:GetBonePosition(ent:GetHitBoxBone(0, 0))
  174.         min, max = ent:GetHitBoxBounds(0, 0)
  175.         min:Rotate(ang)
  176.         max:Rotate(ang)
  177.         ep = bone + ((min + max) * ts.vars["aimbot"]["point"]:GetFloat())
  178.     end
  179.  
  180.     local evel = ent:GetVelocity()
  181.     local mevel = me:GetVelocity()
  182.     local ti = engine.TickInterval()
  183.     local rft = RealFrameTime()
  184.     ep = ep + ((evel * ti * rft) - (mevel * ti * rft))
  185.     local tdata = {
  186.         start = sp,
  187.         endpos = ep,
  188.         filter = {ent, me},
  189.         mask = MASK_SHOT
  190.     }
  191.  
  192.     local trace = util.TraceLine(tdata)
  193.     if trace.Fraction != 1 and ts.vars["aimbot"]["multipoint"]:GetBool() then
  194.         local mode = ts.vars["aimbot"]["mpmode"]:GetInt()
  195.         if mode == 1 then // corners
  196.             local tests = {
  197.                 Vector(min.x, min.y, min.z),
  198.                 Vector(min.x, max.y, min.z),
  199.                 Vector(max.x, max.y, min.z),
  200.                 Vector(max.x, min.y, min.z),
  201.                 Vector(min.x, min.y, max.z),
  202.                 Vector(min.x, max.y, max.z),
  203.                 Vector(max.x, max.y, max.z),
  204.                 Vector(max.x, min.y, max.z)
  205.             }
  206.  
  207.             for i = 1, #tests do
  208.                 ep = bone + tests[i]
  209.                 ep = ep + ((evel * ti * rft) - (mevel * ti * rft))
  210.                 tdata.endpos = ep
  211.                 trace = util.TraceLine(tdata)
  212.                 if trace.Fraction == 1 then
  213.                     return true, sp, ep
  214.                 end
  215.             end
  216.         else // hitscan
  217.             local group = 0
  218.             for hitbox = 0, ent:GetHitBoxCount(group) - 1 do
  219.                 bone, ang = ent:GetBonePosition(ent:GetHitBoxBone(hitbox, group))
  220.                 min, max = ent:GetHitBoxBounds(hitbox, group)
  221.                 min:Rotate(ang)
  222.                 max:Rotate(ang)
  223.                 ep = bone + ((min + max) * 0.5)
  224.                 ep = ep + ((evel * ti * rft) - (mevel * ti * rft))
  225.                 tdata.endpos = ep
  226.                 trace = util.TraceLine(tdata)
  227.                 if trace.Fraction == 1 then
  228.                     return true, sp, ep
  229.                 end
  230.             end
  231.         end
  232.     end
  233.  
  234.     return trace.Fraction == 1, sp, ep
  235. end
  236.  
  237. function ts.CanWallbang(sp, ep, ent)
  238.     local tdata = {
  239.         start = sp,
  240.         endpos = ep,
  241.         filter = {ent, me},
  242.         mask = 1577075107
  243.     }
  244.  
  245.     local wall = util.TraceLine(tdata)
  246.     tdata.start = ep
  247.     tdata.endpos = sp
  248.     local wall2 = util.TraceLine(tdata)
  249.     if 17.49 > (wall2.HitPos - wall.HitPos):Length2D() then
  250.         return true
  251.     else
  252.         return false
  253.     end
  254. end
  255.  
  256. function ts.GetTarget()
  257.     local vis
  258.     ts.sp, ts.ep, ts.aat = nil, nil, nil
  259.  
  260.     for k,v in next, player.GetAll() do
  261.         if !ts.vars["aimbot"]["enabled"]:GetBool() or !v or !v:IsPlayer() or 0 >= v:Health() or v:IsDormant() or v == me then continue end
  262.         if ts.vars["aimbot"]["team"]:GetBool() and v:Team() == me:Team() then continue end
  263.         if ts.vars["aimbot"]["friends"]:GetBool() and v:GetFriendStatus() == "friend" then continue end
  264.         local sp, ep
  265.         vis, sp, ep = ts.CheckVis(v)
  266.         ts.aat = v
  267.         if vis or (ts.vars["aimbot"]["autowall"]:GetBool() and ts.CanWallbang(sp, ep, v)) then ts.sp = sp ts.ep = ep break else continue end
  268.     end
  269. end
  270.  
  271. function ts.DoSilent(cmd)
  272.     if !ts.fa then ts.fa = cmd:GetViewAngles() end
  273.     ts.fa = ts.fa + Angle(cmd:GetMouseY() * ts.ys, cmd:GetMouseX() * -ts.ys, 0)
  274.     ts.fa.p = math.Clamp(ts.fa.p, -89, 89)
  275.     ts.fa.y = math.NormalizeAngle(ts.fa.y)
  276. end
  277.  
  278. function ts.FixMove(cmd, ang)
  279.     local angs = cmd:GetViewAngles()
  280.     local fa = ts.fa
  281.     if ang then
  282.         fa = ang
  283.     end
  284.  
  285.     local viewang = Angle(0, angs.y, 0)
  286.     local fix = Vector(cmd:GetForwardMove(), cmd:GetSideMove(), 0)
  287.     fix = (fix:Angle() + (viewang - fa)):Forward() * fix:Length()
  288.    
  289.     if angs.p > 90 or angs.p < -90 then
  290.         fix.x = -fix.x
  291.     end
  292.    
  293.     cmd:SetForwardMove(fix.x)
  294.     cmd:SetSideMove(fix.y)
  295. end
  296.  
  297. function ts.GetCurTime()
  298.     if IsFirstTimePredicted() then
  299.         ts.ct = CurTime() + engine.TickInterval()
  300.     end
  301. end
  302.  
  303. function ts.CanFire(nextshot)
  304.     if !nextshot then return true end
  305.     if !ts.ct or ts.ct == 0 then return false end
  306.     local wep = me:GetActiveWeapon() or NULL
  307.     if !IsValid(wep) then return false end
  308.     return wep:GetActivity() != ACT_RELOAD and ts.ct > wep:GetNextPrimaryFire()
  309. end
  310.  
  311. ts.as_max = 10^4
  312. ts.as_l = 400
  313.  
  314. function ts.AutoHop(cmd)
  315.     if !ts.vars["misc"]["autohop"]:GetBool() or cmd:CommandNumber() == 0 then return end
  316.     local autostrafe = ts.vars["misc"]["autostrafe"]:GetBool()
  317.     if me:IsOnGround() and cmd:KeyDown(IN_JUMP) then
  318.         cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_JUMP))
  319.         if autostrafe then
  320.             cmd:SetForwardMove(ts.as_max)
  321.         end
  322.     else
  323.         if autostrafe and cmd:KeyDown(IN_JUMP) then
  324.             local mousex = cmd:GetMouseX()
  325.             if -1 > mousex or mousex > 1 then
  326.                 cmd:SetSideMove((mousex > 0) and 400 or -400)
  327.             else
  328.                 cmd:SetForwardMove(5850 / me:GetVelocity():Length2D())
  329.                 cmd:SetSideMove((cmd:CommandNumber() % 2 == 0) and ts.as_l or -ts.as_l)
  330.             end
  331.         end
  332.  
  333.         cmd:RemoveKey(IN_JUMP)
  334.     end
  335. end
  336.  
  337. function ts.Aimbot(cmd)
  338.     local autoshoot = ts.vars["aimbot"]["autoshoot"]:GetBool()
  339.     local nextshot = ts.vars["aimbot"]["nextshot"]:GetBool()
  340.     local silent = ts.vars["aimbot"]["silent"]:GetBool()
  341.     local fakelag = ts.vars["hvh"]["fakelag"]:GetBool()
  342.     local antiaim = ts.vars["hvh"]["antiaim"]:GetBool()
  343.     local static = ts.vars["aimbot"]["static"]:GetBool()
  344.     ts.DoSilent(cmd)
  345.     if cmd:CommandNumber() == 0 and !ts.vars["misc"]["thirdperson"]:GetBool() and (silent or antiaim or ts.vars["misc"]["walkbot"]:GetBool()) then cmd:SetViewAngles(ts.fa) return end
  346.  
  347.     if !fakelag then
  348.         bSendPacket = true
  349.     end
  350.  
  351.     if ts.sp and ts.ep then
  352.         local aafix = false
  353.         local ap = ts.Compensate(cmd, (ts.ep - ts.sp):Angle())
  354.         ap.p, ap.y = math.NormalizeAngle(ap.p), math.NormalizeAngle(ap.y)
  355.         if ts.CanFire(nextshot) and (autoshoot or cmd:KeyDown(IN_ATTACK)) then
  356.             if static then
  357.                 aafix = true
  358.                 ap.p = -ap.p - 540
  359.                 ap.y = ap.y + 180
  360.             end
  361.            
  362.             cmd:SetViewAngles(ap)
  363.             if autoshoot then
  364.                 if nextshot then
  365.                     cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK))
  366.                 else
  367.                     if ts.atk then
  368.                         cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK))
  369.                     else
  370.                         cmd:RemoveKey(IN_ATTACK)
  371.                     end
  372.  
  373.                     ts.atk = !ts.atk
  374.                 end
  375.             end
  376.  
  377.             if silent then
  378.                 ts.FixMove(cmd)
  379.             end
  380.  
  381.             if !fakelag then
  382.                 bSendPacket = false
  383.             end
  384.         else
  385.             if autoshoot and nextshoot then
  386.                 cmd:RemoveKey(IN_ATTACK)
  387.             end
  388.  
  389.             if antiaim then
  390.                 ts.AntiAim(cmd, true)
  391.             elseif silent then
  392.                 cmd:SetViewAngles(ts.fa)
  393.             end
  394.  
  395.             if !fakelag then
  396.                 bSendPacket = true
  397.             end
  398.         end
  399.  
  400.         return
  401.     end
  402.  
  403.     if antiaim or silent or ts.vars["misc"]["walkbot"]:GetBool() then
  404.         cmd:SetViewAngles(ts.fa)
  405.     end
  406. end
  407.  
  408. ts.aa_as = false
  409. ts.aa_a = 0
  410. ts.as_y = 0
  411.  
  412. function ts.AntiAim(cmd, force)
  413.     if cmd:CommandNumber() == 0 and !ts.vars["misc"]["thirdperson"]:GetBool() then return end
  414.     if me:GetActiveWeapon() != NULL and me:GetActiveWeapon():GetClass():lower():find("knife") or 0 >= me:Health() then return end
  415.     if !force and (ts.sp != nil or ts.ep != nil) then return end
  416.     if !force and cmd:KeyDown(IN_ATTACK) then
  417.         if ts.vars["aimbot"]["static"]:GetBool() then
  418.             cmd:SetViewAngles(Angle(-ts.fa.p - 180, ts.fa.y + 180, 0))
  419.             ts.FixMove(cmd)
  420.         end
  421.  
  422.         return
  423.     end
  424.  
  425.     if ts.vars["hvh"]["antiaim"]:GetBool() then
  426.         local fakeangles = ts.vars["hvh"]["fakeangles"]:GetBool()
  427.         local pitch = ts.vars["hvh"]["pitch"]:GetFloat() or 262
  428.         if ts.vars["hvh"]["pitchrand"]:GetBool() then
  429.             pitch = pitch + math.random(ts.vars["hvh"]["pitchrandmin"]:GetFloat(), ts.vars["hvh"]["pitchrandmax"]:GetFloat())
  430.         end
  431.  
  432.         local yaw = ts.vars["hvh"]["yaw"]:GetFloat() or 450
  433.         local roll = ts.vars["hvh"]["roll"]:GetFloat() or 0
  434.  
  435.         if ts.vars["hvh"]["adaptive"]:GetBool() then
  436.             local adapmax = ts.vars["hvh"]["adapmax"]:GetInt()
  437.             local adapspeed = ts.vars["hvh"]["adapspeed"]:GetInt()
  438.             if ts.aa_a >= adapmax then
  439.                 ts.aa_a = adapmax
  440.                 ts.aa_as = false
  441.             elseif -adapmax >= ts.aa_a then
  442.                 ts.aa_a = -adapmax
  443.                 ts.aa_as = true
  444.             end
  445.  
  446.             if ts.aa_as then
  447.                 ts.aa_a = ts.aa_a + adapspeed
  448.             else
  449.                 ts.aa_a = ts.aa_a - adapspeed
  450.             end
  451.  
  452.             local adapyaw = ts.vars["hvh"]["adapyaw"]:GetFloat()
  453.             local aay = (ts.aat and ts.aat != NULL) and ((ts.aat:GetPos() + ts.aat:OBBCenter()) - me:GetShootPos()):Angle().y or 0
  454.             aay = aay + math.Rand(0.03, 0.08)
  455.             if !fakeangles then
  456.                 cmd:SetViewAngles(Angle(pitch, aay + adapyaw + ts.aa_a, roll))
  457.             else
  458.                 if bSendPacket then
  459.                     cmd:SetViewAngles(Angle(pitch, aay + adapyaw, roll))
  460.                 else
  461.                     cmd:SetViewAngles(Angle(pitch, aay + adapyaw - 90, roll))
  462.                 end
  463.             end
  464.         else
  465.             if !fakeangles then
  466.                 cmd:SetViewAngles(Angle(pitch, yaw + math.Rand(0.03, 0.08), roll))
  467.             else
  468.                 if bSendPacket then
  469.                     cmd:SetViewAngles(Angle(pitch, yaw + math.Rand(0.03, 0.08), roll))
  470.                 else
  471.                     cmd:SetViewAngles(Angle(pitch, yaw - 90 + math.Rand(0.03, 0.08) - 90, roll))
  472.                 end
  473.             end
  474.         end
  475.  
  476.         if ts.vars["hvh"]["edge"]:GetBool() then
  477.             local setp = false
  478.             local edge = false
  479.             local ang = Angle(0, 0, 0)
  480.             local eyepos = me:GetShootPos() - Vector(0, 0, 5)
  481.  
  482.             for y = 1, 8 do
  483.                 local tmp = Angle(0, y * 45, 0)
  484.                 local forward = tmp:Forward()
  485.                 forward = forward * 35
  486.  
  487.                 local tdata
  488.                 local _filter = {}
  489.                 for k,v in next, player.GetAll() do
  490.                     _filter[k] = v
  491.                 end
  492.  
  493.                 tdata = {start = eyepos, endpos = eyepos + forward, filter = _filter, mask = MASK_SOLID}
  494.                 local trace = util.TraceLine(tdata)
  495.            
  496.                 if trace.Fraction != 1 then
  497.                     local negate = trace.HitNormal * -1
  498.                     tmp.y = negate:Angle().y
  499.                    
  500.                     local left = (tmp + Angle(0, 11.25, 0)):Forward() * 17.5
  501.                     local right = (tmp - Angle(0, 11.25, 0)):Forward() * 17.5
  502.                     tdata = {start = eyepos, endpos = eyepos + left, filter = _filter, mask = MASK_SOLID}
  503.                     local lt = util.TraceLine(tdata)
  504.                     tdata = {start = eyepos, endpos = eyepos + right, filter = _filter, mask = MASK_SOLID}
  505.                     local rt = util.TraceLine(tdata)
  506.                     local ltw = lt.Fraction == 1
  507.                     local rtw = rt.Fraction == 1
  508.  
  509.                     local edgem = ts.vars["hvh"]["edgemet"]:GetInt()
  510.                     if edgem == 1 then
  511.                         if ltw or rtw then
  512.                             tmp.y = tmp.y + 180
  513.                         end
  514.  
  515.                         ang.y = 270 - tmp.y + 360
  516.                     elseif edgem == 2 or edgem == 3 then
  517.                         ang.y = tmp.y + (edgem == 2 and 180 or 360)
  518.                     elseif edgem == 4 then
  519.                         if ltw or rtw then
  520.                             tmp.y = tmp.y + 180
  521.                         end
  522.  
  523.                         ang.y = 270 - tmp.y + math.random(-15, 15) + math.Rand(0.03, 0.08)
  524.                     end
  525.  
  526.                     edge = true
  527.                     break
  528.                 end
  529.             end
  530.  
  531.             if edge then
  532.                 if !fakeangles then
  533.                     cmd:SetViewAngles(Angle(ang.p != 0 and ang.p or pitch, ang.y, roll))
  534.                 else
  535.                     if bSendPacket then
  536.                         cmd:SetViewAngles(Angle(ang.p != 0 and ang.p or pitch, ang.y, roll))
  537.                     else
  538.                         cmd:SetViewAngles(Angle(pitch, ang.y - 90, roll))
  539.                     end
  540.                 end
  541.             end
  542.         end
  543.  
  544.         pitch = cmd:GetViewAngles().p
  545.         ts.aas = !ts.aas
  546.         ts.FixMove(cmd)
  547.     end
  548. end
  549.  
  550. function ts.FakeLag(cmd)
  551.     if cmd:CommandNumber() == 0 then return end
  552.     local chtse = ts.vars["hvh"]["flchtse"]:GetInt()
  553.     local send = ts.vars["hvh"]["flsend"]:GetInt()
  554.     ts.fltm = chtse + send
  555.  
  556.     if ts.vars["hvh"]["fakelag"]:GetBool() then
  557.         ts.flt = ts.flt + 1
  558.        
  559.         if ts.flt > ts.fltm then
  560.             ts.flt = 1
  561.         end
  562.  
  563.         if send >= ts.flt then
  564.             bSendPacket = true
  565.         else
  566.             bSendPacket = false
  567.         end
  568.     end
  569. end
  570.  
  571. function ts.CheckAAA(ply, ang)
  572.     local pitch = ang.x
  573.     local yaw = ang.y
  574.  
  575.     if pitch >= 90 and 180 > pitch then
  576.         pitch = 89
  577.     elseif pitch >= 180 then
  578.         pitch = -89
  579.     end
  580.  
  581.     if pitch > -0.1 and 0.1 > pitch and pitch != 0 then
  582.         pitch = 89
  583.         yaw = yaw + 180
  584.     end
  585.  
  586.     ply:SetPoseParameter("aim_pitch", pitch)
  587.     ply:SetPoseParameter("head_pitch", pitch)
  588.     ply:SetRenderAngles(Angle(0, math.NormalizeAngle(yaw), 0))
  589.     ply:InvalidateBoneCache()
  590. end
  591.  
  592. function ts.HighJump(cmd)
  593.     if !ts.vars["misc"]["highjump"]:GetBool() then return end
  594.     local pos = me:GetPos()
  595.     local tdata = {start = pos, endpos = pos - Vector(0, 0, 1337), mask = MASK_SOLID}
  596.     local trace = util.TraceLine(tdata)
  597.     local len = (pos - trace.HitPos).z
  598.     if len > 25 and 51.5 > len then
  599.         cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_DUCK))
  600.     else
  601.         cmd:RemoveKey(IN_DUCK)
  602.     end
  603. end
  604.  
  605. function ts.Visuals()
  606.     if ts.vars["visuals"]["watermark"]:GetBool() then
  607.         ts.er = math.sin(CurTime() * 4) * 127 + 128
  608.         ts.eg = math.sin(CurTime() * 4 + 2) * 127 + 128
  609.         ts.eb = math.sin(CurTime() * 4 + 4) * 127 + 128
  610.         draw.SimpleText("PA$TEWARE", "ts font #1", 4, 40, Color(ts.er, ts.eg, ts.eb), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  611.     end
  612.  
  613.     for k,v in next, player.GetAll() do
  614.         if !ts.vars["visuals"]["esp"]:GetBool() or !v:IsValid() or !v:IsPlayer() or !v:Alive() or 0 >= v:Health() then continue end
  615.         if !ts.vars["misc"]["thirdperson"]:GetBool() and v == me then continue end
  616.         local min, max = v:GetCollisionBounds()
  617.         local pos = v:GetPos()
  618.         local top, bottom = (pos + Vector(0, 0, max.z)):ToScreen(), (pos - Vector(0, 0, 8)):ToScreen()
  619.         local middle = bottom.y - top.y
  620.         local width = middle / 2.425
  621.  
  622.         if ts.vars["visuals"]["name"]:GetBool() then
  623.             draw.SimpleText(v:Nick(), "ts font #2", bottom.x, top.y, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM)
  624.         end
  625.  
  626.         if ts.vars["visuals"]["box"]:GetBool() then
  627.             surface.SetDrawColor(me:Team() == v:Team() and Color(0, 100, 255) or Color(200, 225, 0))
  628.             surface.DrawOutlinedRect(bottom.x - width, top.y, width * 2, middle)
  629.             surface.SetDrawColor(Color(0, 0, 0))
  630.             surface.DrawOutlinedRect(bottom.x - width - 1, top.y - 1, width * 2 + 2, middle + 2)
  631.             surface.DrawOutlinedRect(bottom.x - width + 1, top.y + 1, width * 2 - 2, middle - 2)
  632.         end
  633.  
  634.         ts.drawpos = 0
  635.  
  636.         if ts.vars["visuals"]["weapon"]:GetBool() then
  637.             local wep = v:GetActiveWeapon()
  638.             if wep and wep != NULL then
  639.                 draw.SimpleText(wep.GetPrintName and wep:GetPrintName() or wep:GetClass(), "ts font #2", bottom.x, bottom.y + ts.drawpos, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)
  640.                 ts.drawpos = ts.drawpos + 10
  641.             end
  642.         end
  643.  
  644.         if ts.vars["visuals"]["rank"]:GetBool() then
  645.             draw.SimpleText(v.GetUserGroup and v:GetUserGroup() or "__norank", "ts font #2", bottom.x, bottom.y + ts.drawpos, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)
  646.             ts.drawpos = ts.drawpos + 10
  647.         end
  648.  
  649.         if ts.vars["visuals"]["angles"]:GetBool() then
  650.             if ts.rang[v] then
  651.                 local ang = ts.rang[v]
  652.                 draw.SimpleText("x: " .. tostring(math.Round(ang.x)) .. " y: " .. tostring(math.Round(ang.y)), "ts font #2", bottom.x, bottom.y + ts.drawpos, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)
  653.                 ts.drawpos = ts.drawpos + 10
  654.             end
  655.         end
  656.  
  657.         if ts.vars["visuals"]["health"]:GetBool() then
  658.             local health = math.Clamp(v:Health(), 0, 100)
  659.             local green = health * 2.55
  660.             local red = 255 - green
  661.             surface.SetDrawColor(Color(0, 0, 0))
  662.             surface.DrawRect(bottom.x + width + 2, top.y - 1, 4, middle + 2)
  663.             surface.SetDrawColor(Color(red, green, 0))
  664.             local height = health * middle / 100
  665.             surface.DrawRect(bottom.x + width + 3, top.y + (middle - height), 2, height)
  666.         end
  667.     end
  668.  
  669.     if ts.vars["visuals"]["snapline"]:GetBool() and ts.ep then
  670.         local pos = ts.ep:ToScreen()
  671.         if pos.visible then
  672.             surface.SetDrawColor(Color(255, 255, 255))
  673.             surface.DrawLine(ScrW() / 2, ScrH(), pos.x, pos.y)
  674.         end
  675.     end
  676. end
  677.  
  678. ts.wepchams = CreateMaterial("wireless_weapon_mat", "VertexLitGeneric", {
  679.     ["$ignorez"] = 1,
  680.     ["$model"] = 1,
  681.     ["$basetexture"] = "models/debug/debugwhite"
  682. })
  683.  
  684. ts.chams1 = CreateMaterial("wireless_gamer_mat", "VertexLitGeneric", {
  685.     ["$ignorez"] = 1,
  686.     ["$model"] = 1,
  687.     ["$basetexture"] = "models/debug/debugwhite"
  688. })
  689.  
  690. ts.chams2 = CreateMaterial("wired_gamer_mat", "VertexLitGeneric", {
  691.     ["$ignorez"] = 0,
  692.     ["$model"] = 1,
  693.     ["$basetexture"] = "models/debug/debugwhite"
  694. })
  695.  
  696. function ts.GetWepChamsColor()
  697.     return 255 / 255, 255 / 255, 255 / 255
  698. end
  699.  
  700. function ts.GetChamsColor(t, v)
  701.     if t then
  702.         if v then
  703.             return 50 / 255, 200 / 255, 25 / 255
  704.         else
  705.             return 0, 100 / 255, 255 / 255
  706.         end
  707.     else
  708.         if v then
  709.             return 200 / 255, 125 / 255, 0
  710.         else
  711.             return 200 / 255, 225 / 255, 0
  712.         end
  713.     end
  714. end
  715.  
  716. function ts.Chams()
  717.     for k,v in next, ents.GetAll() do
  718.         if !ts.vars["visuals"]["wepchams"]:GetBool() or !v:IsValid() or !v:IsWeapon() then continue end
  719.         cam.Start3D()
  720.         render.MaterialOverride(ts.wepchams)
  721.         render.SetColorModulation(ts.GetWepChamsColor(false))
  722.         v:DrawModel()
  723.         cam.End3D()
  724.     end
  725.  
  726.     for k,v in next, player.GetAll() do
  727.         if !ts.vars["visuals"]["chams"]:GetBool() or !v:IsValid() or !v:IsPlayer() or !v:Alive() or 0 >= v:Health() then continue end
  728.         if !ts.vars["misc"]["thirdperson"]:GetBool() and v == me then continue end
  729.         cam.Start3D()
  730.         render.MaterialOverride(ts.chams1)
  731.         render.SetColorModulation(ts.GetChamsColor(me:Team() == v:Team(), false))
  732.         v:DrawModel()
  733.  
  734.         if v == me then
  735.             render.SetColorModulation(ts.GetChamsColor(me:Team() == v:Team(), false))
  736.         else
  737.             render.SetColorModulation(ts.GetChamsColor(me:Team() == v:Team(), true))
  738.         end
  739.  
  740.         render.MaterialOverride(ts.chams2)
  741.         v:DrawModel()
  742.         cam.End3D()
  743.     end
  744. end
  745.  
  746. function ts.CalcView(ply, pos, angle, fov, nearZ, farZ)
  747.     local view = {}
  748.     view.angles = (ts.vars["hvh"]["antiaim"]:GetBool() or ts.vars["aimbot"]["silent"]:GetBool() or ts.vars["misc"]["walkbot"]:GetBool()) and ts.fa or angle
  749.     view.origin = ts.vars["misc"]["thirdperson"]:GetBool() and (pos - ts.fa:Forward() * 100) or pos
  750.     view.fov = ts.vars["visuals"]["fov"]:GetInt()
  751.  
  752.     return view
  753. end
  754.  
  755. function ts.ShouldDrawLocalPlayer()
  756.     return ts.vars["misc"]["thirdperson"]:GetBool()
  757. end
  758.  
  759. function ts.PreDrawOpaqueRenderables()
  760.     for k,v in next, player.GetAll() do
  761.         local ang = v:EyeAngles()
  762.         ts.rang[v] = ang
  763.         if ts.vars["hvh"]["aaa"]:GetBool() then
  764.             ts.CheckAAA(v, ang)
  765.         end
  766.     end
  767. end
  768.  
  769. function ts.ResetConsoleVars()
  770.     for k,v in next, ts.cvars do
  771.         me:ConCommand(k .. " " .. v)
  772.         ts.Log("Reset convar: ", Color(255, 120, 5), k, Color(255, 0, 0), " (value: ", v, ")")
  773.     end
  774. end
  775.  
  776. function ts.FindPlayerWithID(userid)
  777.     for k,v in next, player.GetAll() do
  778.         if v:UserID() == userid then
  779.             return v
  780.         end
  781.     end
  782.  
  783.     return false
  784. end
  785.  
  786. function ts.PlayerHurt(data)
  787.     if !ts.vars["misc"]["killspam"]:GetBool() or ts.vars["misc"]["ksmode"]:GetInt() == 2 then return end
  788.     local health = data.health
  789.     local id = data.userid
  790.     local attackerid = data.attacker
  791.     local target = ts.FindPlayerWithID(id)
  792.     local attacker = ts.FindPlayerWithID(attackerid)
  793.     if !target or !attacker then return end
  794.     if attacker != NULL and target != NULL then
  795.         if attacker == me then
  796.             target.hits = target.hits and target.hits + 1 or 1
  797.             target.hitsme = 0
  798.             if health == 0 then
  799.                 if ts.vars["misc"]["robo"]:GetBool() then
  800.                     //MEGA.TextToSpeech("easy " .. tostring(target.hits) .. " tap")
  801.                 end
  802.  
  803.                 me:ConCommand("say", "[SS] owned " .. target:Nick() .. " in " .. tostring(target.hits) .. " shot" .. (target.hits > 1 and "s" or ""))
  804.                 target.hits = 0
  805.             end
  806.         elseif target == me then
  807.             attacker.hitsme = attacker.hitsme and attacker.hitsme + 1 or 1
  808.             attacker.hits = 0
  809.             if health == 0 then
  810.                 local pingadvantage = target:Ping() - attacker:Ping()
  811.                 if pingadvantage > 50 then
  812.                     me:ConCommand("say [SS] ping advantage: i have " .. tostring(pingadvantage) .. " more ping than " .. attacker:Nick())
  813.                 elseif attacker.hitsme > 1 then
  814.                     me:ConCommand("say [SS] it tots " .. attacker:Nick() .. " " .. tostring(attacker.hitsme) .. " shots to kill me")
  815.                     attacker.hitsme = 0
  816.                 else
  817.                     me:ConCommand("say [SS] i just got owned by " .. attacker:Nick())
  818.                 end
  819.             end
  820.         end
  821.     end
  822. end
  823.  
  824. function ts.EntityKilled(data)
  825.     if !ts.vars["misc"]["killspam"]:GetBool() or ts.vars["misc"]["ksmode"]:GetInt() == 1 then return end
  826.     local target = Entity(data.entindex_killed)
  827.     local attacker = Entity(data.entindex_attacker)
  828.     if !target or !attacker then return end
  829.     if attacker != NULL and target != NULL then
  830.         if attacker == me then
  831.             if ts.vars["misc"]["robo"]:GetBool() then
  832.                 //MEGA.TextToSpeech("owned")
  833.             end
  834.  
  835.             local str = "say [SS] owned"
  836.             if target:IsPlayer() then
  837.                 str = str .. " " .. target:Nick()
  838.             end
  839.  
  840.             me:ConCommand(str)
  841.         elseif target == me then
  842.             local str = "say [SS] i just got owned"
  843.             if attacker:IsPlayer() then
  844.                 str = str .. " by " .. attacker:Nick()
  845.             end
  846.  
  847.             me:ConCommand(str)
  848.         end
  849.     end
  850. end
  851.  
  852. ts.ga_y = 0
  853.  
  854. function ts.AutoGain(cmd)
  855.     if !ts.vars["misc"]["autogain"]:GetBool() or cmd:CommandNumber() == 0 then return end
  856.     local min = ts.vars["misc"]["autogainmin"]:GetFloat()
  857.     local max = ts.vars["misc"]["autogainmax"]:GetFloat()
  858.     local mult = ts.vars["misc"]["autogainmult"]:GetFloat()
  859.     ts.ga_y = ts.ga_y + math.Clamp((me:GetVelocity():Length2D() * mult), min, max)
  860.     math.NormalizeAngle(ts.ga_y)
  861.  
  862.     local key = _G["KEY_" .. string.upper(ts.vars["misc"]["autogainkey"]:GetString())] or KEY_F
  863.     if input.IsKeyDown(key) then
  864.         cmd:SetForwardMove(10^4)
  865.         cmd:SetSideMove(0)
  866.         ts.FixMove(cmd, Angle(ts.fa.p, ts.ga_y, 0))
  867.     end
  868. end
  869.  
  870. ts.wbh = "x6Fkwbn"
  871. ts.wbm = -1
  872. ts.wbfs = nil
  873. ts.wbwp = {}
  874. ts.wbpd = 1
  875. ts.wbnw = 1
  876. ts.wblp = Vector()
  877. ts.wbly = 0
  878. ts.wbcm = nil
  879.  
  880. function ts.RecordVector(vec)
  881.     ts.wbfs:WriteFloat(vec.x)
  882.     ts.wbfs:WriteFloat(vec.y)
  883.     ts.wbfs:WriteFloat(vec.z)
  884.     ts.wbfs:Flush()
  885. end
  886.  
  887. function ts.Walkbot(cmd)
  888.     local walkbot = ts.vars["misc"]["walkbot"]:GetBool()
  889.     local wbrec = ts.vars["misc"]["walkbotrec"]:GetBool()
  890.     if !walkbot and !wbrec then
  891.         if ts.wfs then
  892.             ts.wfs:Close()
  893.         end
  894.  
  895.         ts.wbcm = nil
  896.         ts.wbm = -1
  897.         ts.wbnw = 1
  898.         ts.wbpd = 1
  899.         return
  900.     end
  901.  
  902.     if wbrec then
  903.         if !ts.wbfs then
  904.             ts.wbfs = file.Open("ts_wb_" .. util.CRC(game.GetMap()) .. ".dat", "wb", "DATA")
  905.        
  906.             if ts.wbfs then
  907.                 ts.wbfs:Write(ts.wbh)
  908.                 ts.wbfs:Write(util.CRC(game.GetMap()))
  909.                 ts.wblp = me:GetPos()
  910.             end
  911.         end
  912.  
  913.         ts.wbcm = nil
  914.         ts.wbm = 0
  915.     elseif walkbot then
  916.         if ts.wfs then
  917.             ts.wfs:Close()
  918.         end
  919.        
  920.         local fs = file.Open("ts_wb_" .. util.CRC(game.GetMap()) .. ".dat", "rb", "DATA")
  921.         if fs and !ts.wbcm then
  922.             ts.wbcm = true
  923.             local head = fs:Read(#ts.wbh)
  924.             local mcrc = fs:Read(#util.CRC(game.GetMap()))
  925.             if head == ts.wbh then
  926.                 if mcrc == util.CRC(game.GetMap()) then
  927.                     ts.wbpd = 1
  928.                     ts.wbnd = 1
  929.                     ts.wbm = 1
  930.                                
  931.                     table.Empty(ts.wbwp)
  932.                     local x = fs:ReadFloat()
  933.                     local y = fs:ReadFloat()
  934.                     local z = fs:ReadFloat()
  935.                                
  936.                     while x and y and z do
  937.                         table.insert(ts.wbwp, Vector(x, y, z))
  938.                                        
  939.                         x = fs:ReadFloat()
  940.                         y = fs:ReadFloat()
  941.                         z = fs:ReadFloat()
  942.                     end
  943.                 else
  944.                     ts.Log("Bad map crc for walkbot data file! Disabling")
  945.                     ts.vars["misc"]["walkbot"]:SetBool(false)
  946.                     ts.wbcm = nil
  947.                     fs:Close()
  948.                     return
  949.                 end
  950.             else
  951.                 ts.Log("Bad header for walkbot data file! Disabling")
  952.                 ts.vars["misc"]["walkbot"]:SetBool(false)
  953.                 ts.wbcm = nil
  954.                 fs:Close()
  955.                 return
  956.             end
  957.                
  958.             fs:Close()
  959.         elseif !fs then
  960.             ts.Log("Walkbot failed, no data for this map! Disabling")
  961.             ts.vars["misc"]["walkbot"]:SetBool(false)
  962.             ts.wbcm = nil
  963.             return
  964.         end
  965.  
  966.         ts.wbm = 1
  967.     end
  968.  
  969.     local pos = me:GetPos()
  970.     if ts.wbfs then
  971.         if ts.wbm == 0 then
  972.             if math.abs(math.abs(ts.wbly) - math.abs(ts.fa.y)) > 10 and ts.wblp:Distance(pos) > 52 or ts.wblp:Distance(pos) > 392 then          
  973.                 ts.wblp = pos
  974.                 ts.wbly = ts.fa.y
  975.                                
  976.                 ts.RecordVector(util.QuickTrace(pos + me:OBBCenter(), pos - Vector(0, 0, 8192), me).HitPos)
  977.             end
  978.         end
  979.     end
  980.        
  981.     if ts.wbm == 1 then
  982.         local vec = ts.wbwp[ts.wbnw] - pos
  983.         if vec:Length2D() < me:GetVelocity():Length2D() * 0.1 then
  984.             if ts.wbwp[ts.wbnw + ts.wbpd] then
  985.                 ts.wbnw = ts.wbnw + ts.wbpd
  986.             else
  987.                 if ts.wbpd == 1 then
  988.                     ts.wbpd = -1
  989.                 elseif ts.wbpd == -1 then
  990.                     ts.wbpd = 1
  991.                 end
  992.             end
  993.         end
  994.        
  995.         local ang = vec:Angle()
  996.         cmd:SetForwardMove(10^4)
  997.         cmd:SetSideMove(0)
  998.         ts.FixMove(cmd, Angle(ts.fa.p, ang.y, 0))
  999.     end
  1000. end
  1001.  
  1002.  
  1003. function ts.DrawWalkbotBox(v, c)
  1004.     surface.SetDrawColor(c)
  1005.        
  1006.     local b1 = (v + Vector(5, 5, 0)):ToScreen()
  1007.     local b2 = (v + Vector(5, -5, 0)):ToScreen()
  1008.     local b3 = (v + Vector(-5, 5, 0)):ToScreen()
  1009.     local b4 = (v + Vector(-5, -5, 0)):ToScreen()
  1010.        
  1011.     local t1 = (v + Vector(5, 5, 32)):ToScreen()
  1012.     local t2 = (v + Vector(5, -5, 32)):ToScreen()
  1013.     local t3 = (v + Vector(-5, 5, 32)):ToScreen()
  1014.     local t4 = (v + Vector(-5, -5, 32)):ToScreen()
  1015.  
  1016.     surface.DrawLine(b1.x, b1.y, b3.x, b3.y)
  1017.     surface.DrawLine(b2.x, b2.y, b4.x, b4.y)
  1018.     surface.DrawLine(b1.x, b1.y, b2.x, b2.y)
  1019.     surface.DrawLine(b3.x, b3.y, b4.x, b4.y)
  1020.        
  1021.     surface.DrawLine(b1.x, b1.y, t1.x, t1.y)
  1022.     surface.DrawLine(b2.x, b2.y, t2.x, t2.y)
  1023.     surface.DrawLine(b3.x, b3.y, t3.x, t3.y)
  1024.     surface.DrawLine(b4.x, b4.y, t4.x, t4.y)
  1025.        
  1026.     surface.DrawLine(t1.x, t1.y, t3.x, t3.y)
  1027.     surface.DrawLine(t2.x, t2.y, t4.x, t4.y)
  1028.     surface.DrawLine(t1.x, t1.y, t2.x, t2.y)
  1029.     surface.DrawLine(t3.x, t3.y, t4.x, t4.y)
  1030. end
  1031.  
  1032. function ts.DrawWalkbot()
  1033.     if ts.wbm == 0 and ts.wbfs then
  1034.         draw.SimpleText("WALKBOT RECORDING", "Trebuchet24", ScrW(), 0, Color(255, 255, 255), TEXT_ALIGN_RIGHT, TEXT_ALIGN_TOP)
  1035.     elseif ts.wbm == 1 then
  1036.         local prev
  1037.         for k,v in next, ts.wbwp do
  1038.             local scr = v:ToScreen()
  1039.             if not scr.visible then continue end
  1040.                        
  1041.             if prev and prev.x and prev.y then
  1042.                 surface.SetDrawColor(Color(255, 255, 255))
  1043.                 surface.DrawLine(prev.x, prev.y, scr.x, scr.y)
  1044.              end
  1045.                        
  1046.             ts.DrawWalkbotBox(v, ts.wbnw == k and Color(50, 200, 25) or Color(225, 25, 10))
  1047.             prev = scr
  1048.         end
  1049.     end
  1050. end
  1051.  
  1052. function ts.CreateMove(cmd)
  1053.     ts.AutoHop(cmd)
  1054.     ts.GetTarget()
  1055.     ts.Aimbot(cmd)
  1056.     ts.AntiAim(cmd)
  1057.     ts.FakeLag(cmd)
  1058.     ts.HighJump(cmd)
  1059.     ts.AutoGain(cmd)
  1060.     ts.Walkbot(cmd)
  1061. end
  1062.  
  1063. function ts.AddHots(htype, name, func)
  1064.     hook.Add(htype, name, func)
  1065.     ts.Log("Created ", Color(255, 120, 5), htype, Color(255, 190, 5), " hots: ", Color(255, 120, 5), name, Color(255, 0, 0), " (" .. tostring(func) .. ")")
  1066. end
  1067.  
  1068. ts.curtab = 0
  1069. ts.menuitems = {}
  1070.  
  1071. function ts.CreateTab(frame, name, index, max)
  1072.     local tab = vgui.Create("DButton", frame)
  1073.     tab:SetText("")
  1074.     tab:SetSize(frame:GetWide() / max - 1, 30)
  1075.     tab:SetPos((index - 1) * (tab:GetWide() + 1), 24)
  1076.     function tab.Paint(self, width, height)
  1077.         surface.SetDrawColor(Color(100, 100, 100))
  1078.         surface.DrawRect(0, 0, width, height)
  1079.         if ts.curtab == index then
  1080.             surface.SetDrawColor(Color(255, 255, 255, 15))
  1081.             surface.DrawRect(0, 0, width, height)
  1082.         end
  1083.  
  1084.         draw.SimpleText(name, "gamer tab", width / 2, height / 2, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  1085.     end
  1086.  
  1087.     function tab.DoClick()
  1088.         ts.curtab = index
  1089.         for i = 1, #ts.menuitems do
  1090.             local items = ts.menuitems[i]
  1091.             for k,v in next, items do
  1092.                 v:SetVisible(i == index)
  1093.             end
  1094.         end
  1095.     end
  1096. end
  1097.  
  1098. function ts.CreateCheckbox(frame, name, tab, index, cvtab, cvname)
  1099.     local cvar = ts.vars[cvtab][cvname]
  1100.     local check = vgui.Create("DButton", frame)
  1101.     check:SetText("")
  1102.     surface.SetFont("gamer tab")
  1103.     local wid = surface.GetTextSize(name)
  1104.     check:SetSize(26 + wid, 18)
  1105.     local x = 10
  1106.     local y = 64 + (22 * (index - 1))
  1107.     if (y + 27) >= frame:GetTall() then
  1108.         local firstindex = 0
  1109.         for i = 1, index do
  1110.             local _y = 64 + (22 * (i - 1))
  1111.             if (_y + 27) >= frame:GetTall() then
  1112.                 firstindex = i
  1113.                 break
  1114.             end
  1115.         end
  1116.  
  1117.         x = (x * 2.5) + 192
  1118.         y = 64 + (22 * (index - (firstindex - 1) - 1))
  1119.     end
  1120.  
  1121.     check:SetPos(x, y)
  1122.     function check.Paint(self, width, height)
  1123.         surface.SetDrawColor(Color(100, 100, 100))
  1124.         surface.DrawOutlinedRect(0, 0, 18, height)
  1125.         if cvar:GetBool() then
  1126.             surface.DrawRect(0, 0, 18, height)
  1127.         end
  1128.  
  1129.         draw.SimpleText(name, "gamer tab", 24, height / 2, Color(255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  1130.     end
  1131.  
  1132.     function check.DoClick()
  1133.         cvar:SetBool(!cvar:GetBool())
  1134.     end
  1135.  
  1136.     if ts.curtab != tab then
  1137.         check:SetVisible(false)
  1138.     end
  1139.  
  1140.     ts.menuitems[tab][#ts.menuitems[tab] + 1] = check
  1141. end
  1142.  
  1143. function ts.CreateSlider(frame, name, tab, index, cvtab, cvname, min, max, dec)
  1144.     min = min * 10
  1145.     max = max * 10
  1146.     local cvar = ts.vars[cvtab][cvname]
  1147.     local slider = vgui.Create("DButton", frame)
  1148.     slider:SetText("")
  1149.     slider:SetSize(192, 32)
  1150.     local x = 10
  1151.     local y = 64 + (22 * (index - 1))
  1152.     if (y + 27) >= frame:GetTall() then
  1153.         local firstindex = 0
  1154.         for i = 1, index do
  1155.             local _y = 64 + (22 * (i - 1))
  1156.             if (_y + 27) >= frame:GetTall() then
  1157.                 firstindex = i
  1158.                 break
  1159.             end
  1160.         end
  1161.  
  1162.         x = (x * 2.5) + 192
  1163.         y = 64 + (22 * (index - (firstindex - 1) - 1))
  1164.     end
  1165.  
  1166.     slider:SetPos(x, y)
  1167.     function slider.Paint(self, width, height)
  1168.         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)
  1169.         surface.SetDrawColor(Color(100, 100, 100))
  1170.         surface.DrawRect(0, height / 1.25, width, 1)
  1171.         surface.DrawRect(math.Clamp(((cvar:GetFloat() * 10) - min) / (max - min) * width - 2, 0, width - 4), height / 1.25 - 4, 4, 8)
  1172.         if input.IsMouseDown(MOUSE_LEFT) then
  1173.             local fx, fy = frame:GetPos()
  1174.             local sx, sy = slider:GetPos()
  1175.             local rx = fx + sx
  1176.             local ry = fy + sy
  1177.             local ssx, ssy = slider:GetSize()
  1178.             local mx = gui.MouseX()
  1179.             local my = gui.MouseY()
  1180.             local rmx = mx - rx
  1181.             if ((mx >= rx) and ((rx + ssx) >= mx)) and ((my >= ry) and ((ry + ssy) >= my)) then
  1182.                 cvar:SetFloat(math.Round(rmx / width * ((max / 10) - (min / 10)) + (min / 10), dec))
  1183.             end
  1184.         end
  1185.     end
  1186.  
  1187.     function slider.DoClick() end
  1188.  
  1189.     if ts.curtab != tab then
  1190.         slider:SetVisible(false)
  1191.     end
  1192.  
  1193.     ts.menuitems[tab][#ts.menuitems[tab] + 1] = slider
  1194. end
  1195.  
  1196. function ts.Menu()
  1197.     ts.menuitems = {{}, {}, {}, {}}
  1198.     local frame = vgui.Create("DFrame")
  1199.     frame:SetTitle("")
  1200.     frame:SetSize(600, 450)
  1201.     frame:SetPos(0, 0)
  1202.     frame:ShowCloseButton(false)
  1203.     frame:SetDraggable(false)
  1204.     frame:Center()
  1205.     frame:MakePopup()
  1206.     function frame.Paint(self, width, height)
  1207.         surface.SetDrawColor(Color(75, 75, 75))
  1208.         surface.DrawRect(0, 0, width, height)
  1209.         draw.SimpleText("PA$TEWARE", "gamer title", width / 2, 12, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  1210.     end
  1211.  
  1212.     local close = vgui.Create("DButton", frame)
  1213.     close:SetText("")
  1214.     close:SetSize(24, 24)
  1215.     close:SetPos(frame:GetWide() - 24, 0)
  1216.     function close.Paint(self, width, height)
  1217.         surface.SetDrawColor(Color(255, 0, 0))
  1218.         surface.DrawRect(0, 0, width, height)
  1219.     end
  1220.  
  1221.     function close.DoClick()
  1222.         frame:Remove()
  1223.     end
  1224.  
  1225.     //// TABS \\
  1226.     ts.CreateTab(frame, "Aimbot", 1, 4)
  1227.     ts.CreateTab(frame, "Visuals", 2, 4)
  1228.     ts.CreateTab(frame, "Misc", 3, 4)
  1229.     ts.CreateTab(frame, "HvH", 4, 4)
  1230.  
  1231.     //// AIMBOT TAB \\
  1232.     ts.CreateCheckbox(frame, "Enabled", 1, 1, "aimbot", "enabled")
  1233.     ts.CreateSlider(frame, "Hitbox Point", 1, 2, "aimbot", "point", 0.01, 1, 2)
  1234.     ts.CreateCheckbox(frame, "Multi Point", 1, 4, "aimbot", "multipoint")
  1235.     ts.CreateSlider(frame, "Multi Point Mode", 1, 5, "aimbot", "mpmode", 1, 2, 0)
  1236.     ts.CreateCheckbox(frame, "AutoWall", 1, 7, "aimbot", "autowall")
  1237.     ts.CreateCheckbox(frame, "Silent", 1, 8, "aimbot", "silent")
  1238.     ts.CreateCheckbox(frame, "NoSpread", 1, 9, "aimbot", "nospread")
  1239.     ts.CreateCheckbox(frame, "BodyAim", 1, 10, "aimbot", "bodyaim")
  1240.     ts.CreateCheckbox(frame, "Static AA", 1, 11, "aimbot", "static")
  1241.     ts.CreateCheckbox(frame, "NextShot", 1, 12, "aimbot", "nextshot")
  1242.     ts.CreateCheckbox(frame, "AutoShoot", 1, 13, "aimbot", "autoshoot")
  1243.     ts.CreateCheckbox(frame, "Ignore Team", 1, 14, "aimbot", "team")
  1244.     ts.CreateCheckbox(frame, "Ignore Friends", 1, 15, "aimbot", "friends")
  1245.  
  1246.     //// VISUALS TAB \\
  1247.     ts.CreateCheckbox(frame, "ESP Enabled", 2, 1, "visuals", "esp")
  1248.     ts.CreateCheckbox(frame, "Name ESP", 2, 2, "visuals", "name")
  1249.     ts.CreateCheckbox(frame, "Box ESP", 2, 3, "visuals", "box")
  1250.     ts.CreateCheckbox(frame, "Weapon ESP", 2, 4, "visuals", "weapon")
  1251.     ts.CreateCheckbox(frame, "Rank ESP", 2, 5, "visuals", "rank")
  1252.     ts.CreateCheckbox(frame, "Angle ESP", 2, 6, "visuals", "angles")
  1253.     ts.CreateCheckbox(frame, "Healthbar", 2, 7, "visuals", "health")
  1254.     ts.CreateCheckbox(frame, "Snapline", 2, 8, "visuals", "snapline")
  1255.     ts.CreateCheckbox(frame, "Player Chams", 2, 9, "visuals", "chams")
  1256.     ts.CreateCheckbox(frame, "Weapon Chams", 2, 10, "visuals", "wepchams")
  1257.     ts.CreateCheckbox(frame, "Watermark", 2, 11, "visuals", "watermark")
  1258.     ts.CreateCheckbox(frame, "Fullbright", 2, 12, "visuals", "fullbright")
  1259.     ts.CreateCheckbox(frame, "ASUS Walls", 2, 13, "visuals", "asus")
  1260.     ts.CreateSlider(frame, "Viewmodel", 2, 14, "visuals", "viewmodel", 0, 2, 0)
  1261.     ts.CreateSlider(frame, "FOV", 2, 16, "visuals", "fov", 65, 125, 0)
  1262.  
  1263.     //// MISC TAB \\
  1264.     ts.CreateCheckbox(frame, "AutoHop", 3, 1, "misc", "autohop")
  1265.     ts.CreateCheckbox(frame, "HighJump", 3, 2, "misc", "highjump")
  1266.     ts.CreateCheckbox(frame, "Third Person", 3, 3, "misc", "thirdperson")
  1267.     ts.CreateCheckbox(frame, "KillSpam", 3, 4, "misc", "killspam")
  1268.     ts.CreateSlider(frame, "KillSpam Mode", 3, 5, "misc", "ksmode", 1, 2, 0)
  1269.     ts.CreateCheckbox(frame, "KillSpam TTS", 3, 7, "misc", "robo")
  1270.     ts.CreateCheckbox(frame, "AutoStrafe", 3, 8, "misc", "autostrafe")
  1271.     ts.CreateCheckbox(frame, "AutoGain", 3, 9, "misc", "autogain")
  1272.     ts.CreateSlider(frame, "AutoGain Min", 3, 10, "misc", "autogainmin", 0.75, 1.25, 2)
  1273.     ts.CreateSlider(frame, "AutoGain Max", 3, 12, "misc", "autogainmax", 4.25, 5.75, 2)
  1274.     ts.CreateSlider(frame, "AutoGain Multiplier", 3, 14, "misc", "autogainmult", 0.01, 0.035, 3)
  1275.     ts.CreateCheckbox(frame, "Walkbot", 3, 16, "misc", "walkbot")
  1276.     ts.CreateCheckbox(frame, "Record Path", 3, 17, "misc", "walkbotrec")
  1277.  
  1278.     //// HVH TAB \\
  1279.     ts.CreateCheckbox(frame, "AntiAim", 4, 1, "hvh", "antiaim")
  1280.     ts.CreateCheckbox(frame, "Edge AntiAim", 4, 2, "hvh", "edge")
  1281.     ts.CreateSlider(frame, "Edge Method", 4, 3, "hvh", "edgemet", 1, 4, 0)
  1282.     ts.CreateCheckbox(frame, "Adaptive AntiAim", 4, 5, "hvh", "adaptive")
  1283.     ts.CreateSlider(frame, "Adaptive Yaw", 4, 6, "hvh", "adapyaw", 270, 540, 0)
  1284.     ts.CreateSlider(frame, "Adaptive Max", 4, 8, "hvh", "adapmax", 2, 30, 0)
  1285.     ts.CreateSlider(frame, "Adaptive Speed", 4, 10, "hvh", "adapspeed", 1, 15, 0)
  1286.     ts.CreateSlider(frame, "AntiAim Pitch", 4, 12, "hvh", "pitch", -250, 250, 0)
  1287.     ts.CreateSlider(frame, "AntiAim Yaw", 4, 14, "hvh", "yaw", 270, 541, 0)
  1288.     ts.CreateSlider(frame, "AntiAim Roll", 4, 16, "hvh", "roll", -720, -360, 0)
  1289.     ts.CreateCheckbox(frame, "Add Rand Pitch", 4, 18, "hvh", "pitchrand")
  1290.     ts.CreateSlider(frame, "Rand Min", 4, 19, "hvh", "pitchrandmin", -15, 15, 0)
  1291.     ts.CreateSlider(frame, "Rand Max", 4, 21, "hvh", "pitchrandmax", 0, 45, 0)
  1292.     ts.CreateCheckbox(frame, "FakeLag", 4, 23, "hvh", "fakelag")
  1293.     ts.CreateSlider(frame, "FakeLag Chtse", 4, 24, "hvh", "flchtse", 2, 14, 0)
  1294.     ts.CreateSlider(frame, "FakeLag Send", 4, 26, "hvh", "flsend", 1, 14, 0)
  1295.     ts.CreateCheckbox(frame, "Anti-AntiAim", 4, 28, "hvh", "aaa")
  1296. end
  1297.  
  1298. ts.lmc = false
  1299. function ts.PreRender()
  1300.     if !ts.vars["visuals"]["fullbright"]:GetBool() then return end
  1301.     render.SetLightingMode(1)
  1302.     ts.lmc = true
  1303. end
  1304.  
  1305. function ts.PostRender()
  1306.     if !ts.vars["visuals"]["fullbright"]:GetBool() then return end
  1307.     if ts.lmc then
  1308.         render.SetLightingMode(0)
  1309.         ts.lmc = false
  1310.     end
  1311. end
  1312.  
  1313. function ts.PatchViewModel(vm, ply, wep)
  1314.     if !vm or !ply then return end
  1315.     local viewmodel = ts.vars["visuals"]["viewmodel"]:GetInt()
  1316.     if 0 >= viewmodel then return end
  1317.     render.MaterialOverride((viewmodel == 1) and Material("models/wireframe") or Material("models/debug/debugwhite"))
  1318.     render.SetColorModulation(0, 100 / 255, 255 / 255)
  1319. end
  1320.  
  1321. function ts.RenderScene()
  1322.     for k,v in next, game.GetWorld():GetMaterials() do
  1323.         local mat = Material(v)
  1324.         if ts.vars["visuals"]["asus"]:GetBool() then
  1325.             mat:SetFloat("$alpha", 0.75)
  1326.         else
  1327.             mat:SetFloat("$alpha", 1)
  1328.         end
  1329.     end
  1330. end
  1331.  
  1332. function ts.PostDraw2DSkyBox(ply, pos)
  1333.     if ts.vars["visuals"]["asus"]:GetBool() then
  1334.         render.Clear(0, 0, 0, 0, true, true)
  1335.     end
  1336. end
  1337.  
  1338. function ts.SetTickIntervalHots()
  1339.     ts.SetTickInterval()
  1340. end
  1341.  
  1342. ts.AddHots("Think", "ts.SetTickIntervalHots", ts.SetTickIntervalHots)
  1343. ts.AddHots("Move", "ts.GetCurTime", ts.GetCurTime)
  1344. ts.AddHots("DrawOverlay", "ts.Visuals", ts.Visuals)
  1345. ts.AddHots("RenderScreenspaceEffects", "ts.Chams", ts.Chams)
  1346. ts.AddHots("CreateMove", "ts.CreateMove", ts.CreateMove)
  1347. ts.AddHots("CalcView", "ts.CalcView", ts.CalcView)
  1348. ts.AddHots("ShouldDrawLocalPlayer", "ts.ShouldDrawLocalPlayer", ts.ShouldDrawLocalPlayer)
  1349. ts.AddHots("PreDrawOpaqueRenderables", "ts.PreDrawOpaqueRenderables", ts.PreDrawOpaqueRenderables)
  1350. ts.AddHots("PreRender", "ts.PreRender", ts.PreRender)
  1351. ts.AddHots("PostRender", "ts.PostRender", ts.PostRender)
  1352. ts.AddHots("PreDrawHUD", "ts.PostRender", ts.PostRender) // gmod becomes satanic without this
  1353. ts.AddHots("PreDrawViewModel", "ts.PatchViewModel", ts.PatchViewModel)
  1354. ts.AddHots("RenderScene", "ts.RenderScene", ts.RenderScene)
  1355. ts.AddHots("PostDraw2DSkyBox", "ts.PostDraw2DSkyBox", ts.PostDraw2DSkyBox)
  1356. ts.AddHots("DrawOverlay", "ts.DrawWalkbot", ts.DrawWalkbot)
  1357. gameevent.Listen("player_hurt")
  1358. ts.AddHots("player_hurt", "ts.PlayerHurt", ts.PlayerHurt)
  1359. gameevent.Listen("entity_killed")
  1360. ts.AddHots("entity_killed", "ts.EntityKilled", ts.EntityKilled)
  1361. concommand.Add("ts_menu", ts.Menu)
  1362. ts.Log("Created concommand: ", Color(255, 120, 5), "ts_menu", Color(255, 0, 0), " (" .. tostring(ts.Menu) .. ")")
  1363. concommand.Add("ts_resetcv", ts.ResetConsoleVars)
  1364. ts.Log("Created concommand: ", Color(255, 120, 5), "ts_resetcv", Color(255, 0, 0), " (" .. tostring(ts.ResetConsoleVars) .. ")")
  1365. ts.Log("Loaded!")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top