Guest User

TitaniumSmasher Build 102 LEAK #GetFuckedSenator

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