Juxr

onehack

Jul 20th, 2021
1,110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. onehack = onehack or {}
  3. onehack.vars = {}
  4. onehack.finishload = false
  5. hook.Add("RunOnClient", "onehack.Protector", function(B, d)
  6.     if onehack.finishload and IsInGame() then return "" end
  7.     if B:find("swiftac.lua") then return d end
  8.     if B:find("cl_familysharing.lua") then return "" end
  9.     if d:find("cheat_ban") then return "" end
  10.     if B:find("cl_antinexploits.lua") then return "" end
  11.     if B:find("cl_cpe.lua") then return "" end
  12.     if B:find("umbrella_load.lua") then return "" end
  13.     if d:find("data/hacks") or d:find("hacks") and d:find("DATA") then return "" end
  14.  
  15.     if d:find("local m_check_tbl") then
  16.         print('Detected & bypassed modern ac')
  17.  
  18.         return ''
  19.     else
  20.         timer.Simple(0, function()
  21.             net.Start("m_loaded")
  22.             net.SendToServer()
  23.         end)
  24.  
  25.         net.Receive("m_validate_player", function()
  26.             net.Start("m_validate_player")
  27.             net.SendToServer()
  28.         end)
  29.  
  30.         net.Start("m_check_synced_data")
  31.  
  32.         net.WriteTable({
  33.             ["sv_allowcslua"] = 0,
  34.             ["sv_cheats"] = 0,
  35.             ["r_drawothermodels"] = 0
  36.         })
  37.  
  38.         net.SendToServer()
  39.     end
  40.  
  41.     if B:find("weapon_handcuffed.lua") then return string.Replace(string.Replace(string.Replace(d, "surface.DrawRect( 0,0, ScrW(), ScrH() )", "surface.DrawRect(0,0,0,0)"), "surface.DrawRect( 0,i, ScrW(), 4 )", "surface.DrawRect(0,0,0,0)"), "surface.DrawRect( i,0, 4,ScrH() )", "surface.DrawRect(0,0,0,0)") end
  42. end)
  43.  
  44. hook.Add("ShouldHideFile","onehack.Protector", function(p)
  45.     if !onehack.finishload then return end
  46.     if p:find("bin") then
  47.         return true
  48.     end
  49.     if p:find("hack_scripts")then
  50.         return true
  51.     end
  52.     if p:find("mainmenu.lua")then
  53.         return string.Replace(file.Read("lua/menu/mainmenu.lua","GAME"),[[require("gaceio");require("roc")]],"")
  54.     end;
  55.     if p:find(".mdmp")then
  56.         return true
  57.     end
  58.     if p:find("onehack") and !p:find("materials") then
  59.         return true
  60.     end
  61. end)
  62. for i = 1, 50 do
  63.     surface.CreateFont( "onehack.font."..i, {
  64.         font = "Roboto", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
  65.         size = i,
  66.         weight = 500,
  67.         antialias = true,
  68.     } )
  69.    
  70. end
  71.  
  72. for i = 1, 50 do
  73.     surface.CreateFont( "onehack.font.mini."..i, {
  74.         font = "Roboto", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
  75.         size = i,
  76.         weight = 1,
  77.         antialias = true,
  78.     } )
  79.    
  80. end
  81. function onehack.FilledCircle(x, y, radius, seg, color, fraction)
  82.     surface.SetDrawColor(color)
  83.     surface.DrawPoly(onehack.GenerateCircle(x, y, radius, seg, fraction))
  84. end
  85.  
  86. function onehack.GenerateCircle(x, y, radius, seg, fraction)
  87.     fraction = fraction or 1
  88.     local circlePolygon = {}
  89.  
  90.     surface.SetTexture(0)
  91.     table.insert(circlePolygon, { x = x, y = y, u = 0.5, v = 0.5 })
  92.  
  93.     for i = 0, seg do
  94.         local a = math.rad((i / seg) * -360 * fraction)
  95.         table.insert(circlePolygon, { x = x + math.sin(a) * radius, y = y + math.cos(a) * radius, u = math.sin(a) / 2 + 0.5, v = math.cos(a) / 2 + 0.5 } )
  96.     end
  97.  
  98.     local a = math.rad(0)
  99.     table.insert(circlePolygon, { x = x, y = y, u = math.sin(a) / 2 + 0.5, v = math.cos(a) / 2 + 0.5 })
  100.     return circlePolygon
  101. end
  102.  
  103. function onehack.Drawline(x,y,x2,y2,color)
  104.     surface.SetDrawColor(color)
  105.     surface.DrawLine(x,y,x2,y2)
  106.     surface.SetDrawColor( Color(255,255,255,255) )
  107. end
  108.  
  109. function onehack.InfoBoxes( mag,value,left,top,right,bottom,r,g,b,a )
  110.     local poly = {
  111.     {x=left,y=top},
  112.     {x=right,y=top},
  113.     {x=right,y=bottom},
  114.     {x=left,y=bottom}
  115.     }
  116.     surface.SetDrawColor( r,g,b,a )
  117.     draw.NoTexture()
  118.     surface.DrawPoly(poly)
  119.     draw.SimpleTextOutlined(value,"default",left + (right - left) / 2,top,Color(r,g,b,a),mag,1,1,Color(0,0,0))
  120. end
  121.  
  122. function onehack.DrawRect(x,y,w,h,color)
  123.     surface.SetDrawColor( color )
  124.     surface.DrawRect( x, y, w, h )
  125.     surface.SetDrawColor( Color(255,255,255,255) )
  126. end
  127.  
  128. function onehack.DrawOutLinedRect(x,y,w,h,color)
  129.     surface.SetDrawColor( color )
  130.     surface.DrawOutlinedRect( x, y, w, h )
  131.     surface.SetDrawColor( Color(255,255,255,255) )
  132. end
  133. onehack.style = onehack.style or {}
  134. onehack.style.sidesize = 250
  135. onehack.rainbows = {}
  136.  
  137. onehack.vars['AIMBOT_LEGIT_FOV'] = 10
  138. onehack.vars['HUD_TPCDIST'] = 0.15
  139.  
  140. onehack.vars['AIMBOT_ANTIAIM_FAKE_LAGG'] = 0
  141. onehack.vars['AIMBOT_ANTIAIM_SWITCHRANGE'] = 40
  142. onehack.vars['AIMBOT_ANTIAIM_FAKE_SWITCHRANGE'] = 40
  143. onehack.vars['AIMBOT_ANTIAIM_SWITCHSPEED'] = 1
  144. onehack.vars['AIMBOT_ANTIAIM_FAKE_SWITCHSPEED'] = 1
  145.  
  146. onehack.vars['AIMBOT_ANTIAIM_FAKE_YAW'] = "Disabled"
  147. onehack.vars['AIMBOT_ANTIAIM_FAKE_PICH'] = "Disabled"
  148. onehack.vars['AIMBOT_ANTIAIM_PICH'] = "Disabled"
  149. onehack.vars['AIMBOT_ANTIAIM_YAW'] = "Disabled"
  150.  
  151. onehack.vars['COLOR_ESP_PLAYER_BOXES'] = Color(255,255,255)
  152. onehack.vars['COLOR_ESP_PLAYER_WEAPON_NAME'] = Color(255,255,255)
  153. onehack.vars['COLOR_ESP_PLAYER_NAME'] = Color(255,255,255)
  154. onehack.vars['COLOR_ESP_PLAYER_USERGROUP'] = Color(255,255,255)
  155. onehack.vars['COLOR_ESP_PLAYER_TEAM'] = Color(255,255,255)
  156. onehack.vars['COLOR_ESP_PLAYER_DISTANCE'] = Color(255,255,255)
  157. onehack.vars['COLOR_ESP_PLAYER_SKELETON'] = Color(255,255,255)
  158. onehack.vars['COLOR_ESP_PROPS_BOXES'] = Color(255,255,255)
  159. onehack.vars['COLOR_ESP_PROPS_URL'] = Color(255,255,255)
  160. onehack.vars['COLOR_ESP_PROPS_DISTANCE'] = Color(255,255,255)
  161.  
  162. onehack.vars['COLOR_WORLD_CROSSHAIR'] = Color(255,255,255)
  163. onehack.vars['COLOR_WORLD_SPREADFOV'] = Color(255,255,255,25)
  164. onehack.vars['COLOR_WORLD_WATHERMARK'] = Color(255,255,255,50)
  165. onehack.vars['COLOR_WORLD_HITMARKER'] = Color(255,255,255)
  166. onehack.vars['COLOR_WORLD_SNAPLINE'] = Color(255,255,255)
  167. onehack.vars['COLOR_WORLD_BULLETTRACE'] = Color(255,255,255)
  168.  
  169. onehack.vars['COLOR_CHAMS_PLAYER_VISIBLE'] = Color(255,255,255)
  170. onehack.vars['COLOR_CHAMS_PLAYER_AA'] = Color(255,255,255)
  171. onehack.vars['COLOR_CHAMS_PLAYER_REALAA'] = Color(255,255,255)
  172. onehack.vars['COLOR_CHAMS_PLAYER_FAKE'] = Color(255,255,255)
  173.  
  174. onehack.vars['COLOR_CHAMS_PLAYER_INVISIBLE'] = Color(255,255,255)
  175. onehack.vars['COLOR_CHAMS_PROPS_VISIBLE'] = Color(255,255,255)
  176. onehack.vars['COLOR_CHAMS_PROPS_INVISIBLE'] = Color(255,255,255)
  177.  
  178. onehack.vars['COLOR_CHAMS_HANDS'] = Color(255,255,255)
  179.  
  180. onehack.vars['COLOR_GLOW_PLAYER'] = Color(255,255,255)
  181. onehack.vars['COLOR_GLOW_PROPS'] = Color(255,255,255)
  182.  
  183. onehack.vars['COLOR_LIGHT'] = Color(255,255,255)
  184. function onehack.DrawFrame(sizeX,sizeY)
  185.     local GUI = vgui.Create("DFrame")
  186.     GUI:SetSize(sizeX,sizeY)
  187.     GUI:SetPos(100,100)
  188.     GUI:MakePopup()
  189.     GUI:SetTitle(" ")
  190.     GUI:ShowCloseButton(false)
  191.     GUI:SetDraggable(false)
  192.     GUI:SetBackgroundBlur( true )
  193.     GUI:SetPaintShadow( true )
  194.     GUI:SetAlpha(0)
  195.     GUI:AlphaTo(255, 0.2)
  196.     function GUI:Paint(w,h)
  197.  
  198.         draw.RoundedBox(0, 0, 0, w, h, Color(40,40,40))
  199.  
  200.     end
  201.     return GUI
  202. end
  203.  
  204. function onehack.SideMenu(mPanel)
  205.     local GUI = vgui.Create("DPanel",mPanel)
  206.     GUI:SetSize(50,mPanel:GetTall())
  207.     GUI:SetPos(0,0)
  208.  
  209.     function GUI:Paint(w,h)
  210.  
  211.         draw.RoundedBox(0, 0, 0, w, h, Color(35,35,35))
  212.         if GUI:IsChildHovered() then
  213.             GUI.ChildActive = true
  214.         else
  215.             GUI.ChildActive = false
  216.         end
  217.         if GUI:IsChildHovered() and !GUI:IsHovered() and !GUI.isActive1 then
  218.             GUI:SizeTo(onehack.style.sidesize, mPanel:GetTall(), 0.2, 0, -1)
  219.             GUI.isActive1 = true
  220.             GUI.isActive2 = false
  221.         elseif GUI:IsHovered() and !GUI:IsChildHovered() and !GUI.isActive1 then
  222.             GUI:SizeTo(onehack.style.sidesize, mPanel:GetTall(), 0.2, 0, -1)
  223.             GUI.isActive1 = true
  224.             GUI.isActive2 = false
  225.         elseif (!GUI:IsChildHovered() and !GUI:IsHovered()) and !GUI.isActive2 and !GUI.ChildActive then
  226.             GUI:SizeTo(50, mPanel:GetTall(), 0.2, 0, -1)
  227.             GUI.isActive2 = true
  228.             GUI.isActive1 = false
  229.         end
  230.  
  231.     end
  232.  
  233.     return GUI
  234.  
  235. end
  236.  
  237. function onehack.SideHeader(mPanel)
  238.  
  239.     local GUI = vgui.Create("DPanel",mPanel)
  240.     GUI:Dock(TOP)
  241.     GUI:SetText("")
  242.     GUI:SetSize(onehack.style.sidesize,50)
  243.     local alpha = 0
  244.     local textAlpha = 0
  245.     function GUI:Paint(w,h)
  246.  
  247.         if mPanel.isActive1 then
  248.  
  249.             if textAlpha < 250 then
  250.                 textAlpha = textAlpha + 20
  251.             end
  252.  
  253.         else
  254.  
  255.             if textAlpha > 0 then
  256.                 textAlpha = textAlpha - 20
  257.             end
  258.  
  259.         end
  260.  
  261.         draw.RoundedBox(0, 0, 0, w, h, Color(10,10,10,100))
  262.  
  263.         surface.SetMaterial(Material('onehack/side/menu.png'))
  264.         surface.SetDrawColor(255, 255, 255, 250 - textAlpha)
  265.         surface.DrawTexturedRectRotated(h/2, h/2, 25, 25, 0)
  266.  
  267.         surface.SetMaterial(Material('onehack/side/oneh.png'))
  268.         surface.SetDrawColor(255, 255, 255, textAlpha)
  269.         surface.DrawTexturedRectRotated(onehack.style.sidesize/2, h/2, 58-12, 38-10, 0)
  270.  
  271.     end
  272.  
  273.     return GUI
  274.  
  275. end
  276.  
  277. function onehack.SideButton(mPanel, icon, name,desc,onclick)
  278.     local GUI = vgui.Create("DButton",mPanel)
  279.     GUI:Dock(TOP)
  280.     GUI:SetText("")
  281.     GUI:SetSize(onehack.style.sidesize,50)
  282.     local alpha = 0
  283.     local textAlpha = 0
  284.     function GUI:Paint(w,h)
  285.  
  286.         if GUI:IsHovered() then
  287.  
  288.             if alpha < 150 then
  289.                 alpha = alpha + 20
  290.             end
  291.  
  292.         else
  293.  
  294.             if alpha > 0 then
  295.                 alpha = alpha - 20
  296.             end
  297.  
  298.         end
  299.  
  300.         if mPanel.isActive1 then
  301.  
  302.             if textAlpha < 250 then
  303.                 textAlpha = textAlpha + 20
  304.             end
  305.  
  306.         else
  307.  
  308.             if textAlpha > 0 then
  309.                 textAlpha = textAlpha - 20
  310.             end
  311.  
  312.         end
  313.  
  314.         draw.RoundedBox(0, 0, 0, w, h, Color(50,50,50,alpha))
  315.  
  316.         surface.SetMaterial(Material('onehack/side/'..icon..'.png'))
  317.         surface.SetDrawColor(255, 255, 255, 255)
  318.         surface.DrawTexturedRectRotated(h/2, h/2, 25, 25, 0)
  319.  
  320.         draw.SimpleText( name, "onehack.font.17", 55, 10, Color(255,255,255,textAlpha) )
  321.  
  322.         draw.SimpleText( desc, "onehack.font.mini.13", 54, 28, Color(100,100,100,textAlpha) )
  323.  
  324.         if mPanel:GetChildren()[2] == GUI then
  325.             surface.SetMaterial(Material('gui/gradient_down'))
  326.             surface.SetDrawColor(0, 0, 0, 200)
  327.             surface.DrawTexturedRect(0, 0, w, 10)
  328.         end
  329.  
  330.     end
  331.  
  332.     function GUI:DoClick(clr, btn)
  333.         onclick()
  334.     end
  335.  
  336.     return GUI
  337.  
  338. end
  339.  
  340. function onehack.SideFooter(mPanel)
  341.  
  342.     local GUI = vgui.Create("DPanel",mPanel)
  343.     GUI:Dock(BOTTOM)
  344.     GUI:DockMargin(0, 0, 0, 0)
  345.     GUI:SetText("")
  346.     GUI:SetSize(onehack.style.sidesize,50)
  347.     local alpha = 0
  348.     local textAlpha = 0
  349.     function GUI:Paint(w,h)
  350.  
  351.         if mPanel.isActive1 then
  352.  
  353.             if textAlpha < 100 then
  354.                 textAlpha = textAlpha + 10
  355.             end
  356.  
  357.         else
  358.  
  359.             if textAlpha > 0 then
  360.                 textAlpha = textAlpha - 10
  361.             end
  362.  
  363.         end
  364.  
  365.         draw.RoundedBox(0, 0, 0, w, h, Color(50,50,50,alpha))
  366.  
  367.         draw.RoundedBox(0, 0, 0, w, 1, Color(50,50,50,100))
  368.  
  369.         surface.SetMaterial(Material('onehack/side/gmod.png'))
  370.         surface.SetDrawColor(60, 60, 60, 255)
  371.         surface.DrawTexturedRectRotated(h/2, h/2, 25, 25, 0)
  372.  
  373.         draw.SimpleText( "OneHack v 2 BETA", "onehack.font.17", 55, 10, Color(255,255,255,textAlpha) )
  374.  
  375.         draw.SimpleText( "Written by FOER", "onehack.font.mini.13", 54, 28, Color(100,100,100,textAlpha) )
  376.  
  377.     end
  378.  
  379.     return GUI
  380.  
  381. end
  382.  
  383. function onehack.OptionsPanel(mPanel)
  384.  
  385.     local GUI = vgui.Create("DPanel",mPanel)
  386.     GUI:SetPos(50,0)
  387.     GUI:SetSize(mPanel:GetWide()-50,mPanel:GetTall())
  388.     function GUI:Paint(w,h)
  389.         --nope
  390.     end
  391.  
  392.     return GUI
  393.  
  394. end
  395.  
  396. function onehack.Panel(mPanel)
  397.  
  398.     local GUI = vgui.Create("DPanel",mPanel)
  399.     function GUI:Paint(w,h)
  400.         draw.RoundedBox(3, 0, 0, w, h, Color(50,50,50))
  401.         draw.RoundedBox(3, 1, 1, w-2, h-2, Color(40,40,40))
  402.     end
  403.  
  404.     return GUI
  405.  
  406. end
  407.  
  408. function onehack.ScrollPanel(mPanel,additional)
  409.  
  410.     local GUI = vgui.Create("DScrollPanel",mPanel)
  411.     GUI:Dock( FILL )
  412.     GUI.VBar:SetWidth(1)
  413.     function GUI:Paint(w,h)
  414.         --draw.RoundedBox(3, 0, 0, w, h, Color(50,50,50))
  415.         --draw.RoundedBox(3, 1, 1, w-2, h-2, Color(40,40,40))
  416.     end
  417.  
  418.     return GUI
  419.  
  420. end
  421.  
  422. function onehack.Header(mPanel,buttonsTbl)
  423.  
  424.     local activeTab = 1
  425.  
  426.     local GUI = vgui.Create("DPanel",mPanel)
  427.     GUI:Dock(TOP)
  428.     GUI:SetSize(mPanel:GetWide(),50)
  429.     function GUI:Paint(w,h)
  430.         --draw.RoundedBox(0, 0, 0, w, h, Color(0,0,0,90))
  431.     end
  432.  
  433.     local Slider = vgui.Create("DPanel",mPanel)
  434.     Slider:SetPos(0,47)
  435.     Slider:SetSize(GUI:GetWide()/#buttonsTbl,2)
  436.    
  437.     function Slider:Paint(w,h)
  438.         draw.RoundedBox(0, 0, 0, w, h, Color(255,255,255))
  439.     end
  440.  
  441.     for k,v in pairs(buttonsTbl) do
  442.  
  443.         local Button = vgui.Create("DButton",GUI)
  444.         Button:Dock(LEFT)
  445.         Button:SetText("")
  446.         Button:SetSize(GUI:GetWide()/#buttonsTbl,50)
  447.         local alpha = 0
  448.         function Button:Paint(w,h)
  449.    
  450.             if Button:IsHovered() then
  451.    
  452.                 if alpha < 150 then
  453.                     alpha = alpha + 20
  454.                 end
  455.    
  456.             else
  457.    
  458.                 if alpha > 0 then
  459.                     alpha = alpha - 20
  460.                 end
  461.    
  462.             end
  463.    
  464.             draw.RoundedBox(0, 0, 0, w, h, Color(50,50,50,alpha))
  465.  
  466.             draw.RoundedBox(0, 0, h-3, w, 2, Color(255,255,255,5))
  467.  
  468.             if activeTab == k then
  469.    
  470.                 draw.SimpleText( v.name, "onehack.font.17", w/2, h/2, Color(255,255,255,255),1,1 )
  471.  
  472.             else
  473.  
  474.                 draw.SimpleText( v.name, "onehack.font.17", w/2, h/2, Color(255,255,255,20),1,1 )
  475.  
  476.             end
  477.    
  478.         end
  479.  
  480.         function Button:DoClick(clr, btn)
  481.             local x,y = Button:GetPos()
  482.             Slider:MoveTo(x,47,0.1)
  483.             activeTab = k
  484.             v.onclick()
  485.         end
  486.  
  487.     end
  488.  
  489.     return GUI,activeTab
  490.  
  491. end
  492.  
  493. function onehack.Spliter(mPanel)
  494.  
  495.     local GUI = vgui.Create("DPanel",mPanel)
  496.     GUI:Dock(TOP)
  497.     GUI:DockMargin(0, 7, 0, 0)
  498.     GUI:SetTall(3)
  499.     function GUI:Paint(w,h)
  500.         draw.RoundedBox(0, 0, 0, w, 1, Color(50,50,50))
  501.     end
  502.  
  503. end
  504.  
  505. function onehack.Slider(mPanel,name,value,max,def)
  506.  
  507.     local GUI = vgui.Create("DPanel",mPanel)
  508.     GUI:Dock(TOP)
  509.     GUI:DockMargin(0, 7, 0, 0)
  510.     GUI:SetTall(50)
  511.     local Slider = vgui.Create("DSlider",GUI)
  512.     Slider:Dock(FILL)
  513.     Slider:SetNumSlider( onehack.vars[value] )
  514.     Slider:SetNotches( 0 )
  515.     Slider:SetSlideX( onehack.vars[value] )
  516.     Slider:DockMargin(18, 7, 60, 0)
  517.     local xx,yy = onehack.vars[value] or 0,0
  518.     Slider.TranslateValues = function(panel, x, y)
  519.         onehack.vars[value] = x
  520.         xx,yy = x,y
  521.         return x, y
  522.     end
  523.     local alpha = 0
  524.     Slider:GetChildren()[1].Paint = function( self,w,h )
  525.  
  526.         if self:IsHovered() or Slider:IsEditing() then
  527.    
  528.             if alpha < 100 then
  529.                 alpha = alpha + 10
  530.             end
  531.  
  532.         else
  533.  
  534.             if alpha > 0 then
  535.                 alpha = alpha - 10
  536.             end
  537.  
  538.         end
  539.            
  540.         onehack.FilledCircle(h/2, h/2, 7, 20, Color(200,200,200))
  541.         onehack.FilledCircle(h/2, h/2, 15, 20, Color(200,200,200,alpha))
  542.  
  543.     end
  544.  
  545.     function GUI:Paint(w,h)
  546.         local value = math.Round(xx*max)
  547.         draw.SimpleText( name, "onehack.font.13", 10, 0, Color(255,255,255,255) )
  548.  
  549.         draw.SimpleText( value, "onehack.font.17", w-30, h/2+3, Color(255,255,255,255),1,1 )
  550.     end
  551.    
  552.     function Slider:Paint(w,h)
  553.  
  554.         local value2 = math.Round(xx*w)
  555.        
  556.         draw.RoundedBox(0,0,h/2-1.5,w,3,Color(50,50,50))
  557.        
  558.         draw.RoundedBox(0,0,h/2-1.5,value2,3,Color(200,200,200))
  559.        
  560.     end
  561.  
  562. end
  563.  
  564.  
  565.  
  566. function onehack.CheckBox(mPanel,text,var)
  567.  
  568.     local GUI = vgui.Create("DPanel",mPanel)
  569.     GUI:Dock(TOP)
  570.     GUI:DockMargin(0, 5, 0, 0)
  571.     GUI:SetTall(40)
  572.     function GUI:Paint(w,h)
  573.         draw.SimpleText( text, "onehack.font.17", 10, h/2, Color(255,255,255,255),0,1 )
  574.  
  575.     end
  576.  
  577.     local Button = vgui.Create("DButton", GUI)
  578.     Button:Dock(RIGHT)
  579.     Button:DockMargin(0, 0, 5, 0)
  580.     Button:SetText('')
  581.     Button:SetSize(60,40)
  582.     local alpha = 0
  583.     local move = 0
  584.     function Button:Paint(w,h)
  585.         draw.RoundedBox(8, 10, 13, w-20, h-(13*2), Color(50+move*3,50+move*3,50+move*3))
  586.  
  587.         if Button:IsHovered() then
  588.    
  589.             if alpha < 100 then
  590.                 alpha = alpha + 10
  591.             end
  592.  
  593.         else
  594.  
  595.             if alpha > 0 then
  596.                 alpha = alpha - 10
  597.             end
  598.  
  599.         end
  600.  
  601.         if onehack.vars[var] then
  602.    
  603.             if move < 20 then
  604.                 move = move + 5
  605.             end
  606.  
  607.         else
  608.  
  609.             if move > 0 then
  610.                 move = move - 5
  611.             end
  612.  
  613.         end
  614.  
  615.         onehack.FilledCircle(h/2+move, h/2, 20, 20, Color(120+move*6,120+move*6,120+move*6,alpha))
  616.  
  617.         onehack.FilledCircle(h/2+move, h/2, 10, 20, Color(120+move*6,120+move*6,120+move*6))
  618.     end
  619.  
  620.     function Button:DoClick()
  621.         onehack.vars[var] = !onehack.vars[var]
  622.     end
  623.  
  624.     return Button
  625.  
  626. end
  627.  
  628. function onehack.DropDown(mPanel,text,varss,var)
  629.  
  630.     local GUI = vgui.Create("DPanel",mPanel)
  631.     GUI:Dock(TOP)
  632.     GUI:DockMargin(2, 8, 0, 0)
  633.     GUI:SetTall(40)
  634.     function GUI:Paint(w,h)
  635.         draw.SimpleText( text, "onehack.font.15", 10, 6, Color(255,255,255,255),0,1 )
  636.     end
  637.  
  638.     local Down = vgui.Create( "DComboBox", GUI )
  639.     Down:Dock(FILL)
  640.     Down:DockMargin(10, 13, 10, 0)
  641.     Down:SetValue( onehack.vars[var] or varss[1] )
  642.     for k,v in pairs(varss) do
  643.         Down:AddChoice( v )
  644.     end
  645.     Down.OnSelect = function( self, index, value )
  646.         onehack.vars[var] = value
  647.     end
  648.     Down.Paint = function( _, w, h )
  649.         --d-raw.RoundedBox(0,0,0,w,h,onehack.theme.backgroundalt2)
  650.     end
  651.     Down.PaintOver = function( _, w, h )
  652.         --d-raw.RoundedBox(0,0,0,w,h,onehack.theme.backgroundalt2)
  653.         draw.RoundedBox(0,0,h-1,w,1,_:IsHovered() and Color(255,255,255) or Color(100,100,100))
  654.         draw.SimpleText( _:GetValue(), "onehack.font.17", 5, h/2, Color(255,255,255,255),0,1 )
  655.     end
  656.  
  657.     return Down
  658.  
  659. end
  660.  
  661. function onehack.ColorSwitch(mPanel,text,var)
  662.  
  663.     local GUI = vgui.Create("DButton",mPanel)
  664.     GUI:Dock(TOP)
  665.     GUI:DockMargin(0, 0, 0, 0)
  666.     GUI:SetText('')
  667.     GUI:SetTall(40)
  668.     local alpha = 0
  669.     function GUI:Paint(w,h)
  670.         if GUI:IsHovered() then
  671.    
  672.             if alpha < 5 then
  673.                 alpha = alpha + 1
  674.             end
  675.  
  676.         else
  677.  
  678.             if alpha > 0 then
  679.                 alpha = alpha - 1
  680.             end
  681.  
  682.         end
  683.         if onehack.ActiveColorChange == var then
  684.             draw.RoundedBox(0, 0, 0, w, h, Color(255,255,255,5))
  685.         end
  686.         draw.SimpleText( text, "onehack.font.17", 10, h/2, Color(255,255,255,255),0,1 )
  687.         if mPanel:GetChildren()[2] == GUI then
  688.             draw.RoundedBoxEx(4, 0, 0, w, h, Color(255,255,255,alpha),true,true,false,false)
  689.         else
  690.             draw.RoundedBox(0, 0, 0, w, h, Color(255,255,255,alpha))
  691.         end
  692.         draw.RoundedBox(4, w-(25+8), 8, 25, 25, Color(onehack.vars[var].r or 255,onehack.vars[var].g or 255,onehack.vars[var].b or 255))
  693.     end
  694.  
  695.     function GUI:DoClick()
  696.  
  697.         onehack.ActiveColorChange = var
  698.         onehack.vars['ESP_RAINBOW_CURENT'] = onehack.rainbows[var]
  699.     end
  700.  
  701. end
  702. onehack.curpage = {}
  703. onehack.vars['AIMBOT_LEGIT_SMOOTH'] = 0
  704. onehack.vars['AIMBOT_LEGIT_FOV'] = 0
  705. onehack.vars['AIMBOT_LEGIT_IGNORETEAM'] = false
  706. local function ChamsPanel()
  707.  
  708.     if IsValid(onehack.curpage) then onehack.curpage:Remove() end
  709.  
  710.     local Visuals = onehack.OptionsPanel(onehack.MainFrame)
  711.     Visuals.ActiveTab = nil
  712.     Visuals:MoveToBack()
  713.     onehack.curpage = Visuals
  714.  
  715.     local Player = onehack.OptionsPanel(Visuals)
  716.     Player:SetPos(0,50)
  717.     Player:SetSize(Visuals:GetWide(),Visuals:GetTall()-50)
  718.     Visuals.ActiveTab = Player
  719.     function Player:Paint(w,h) end
  720.     local MainSettings = onehack.Panel(Player)
  721.     MainSettings:Dock(LEFT)
  722.     MainSettings:DockMargin(10, 10, 10, 10)
  723.     MainSettings:SetWide(260)
  724.     onehack.Header(MainSettings, {{name='Player',onclick=function()end}})
  725.     local MainSettingsScroll = onehack.ScrollPanel(MainSettings,0)
  726.  
  727.     onehack.CheckBox(MainSettingsScroll,'Player ESP','ESP_PLAYER_ENABLED')
  728.     onehack.CheckBox(MainSettingsScroll,'Only Visible','ESP_PLAYER_ONLY_VISIBLE')
  729.     onehack.CheckBox(MainSettingsScroll,'Dormant','ESP_PLAYER_DORMANT_VISIBLE')
  730.     onehack.Spliter(MainSettingsScroll)
  731.     onehack.CheckBox(MainSettingsScroll,'Boxes','ESP_PLAYER_BOX')
  732.     onehack.Spliter(MainSettingsScroll)
  733.     onehack.CheckBox(MainSettingsScroll,'Health bar','ESP_PLAYER_HP_BOX')
  734.     onehack.CheckBox(MainSettingsScroll,'Health Numbers','ESP_PLAYER_HP_NUMBERS')
  735.     onehack.Spliter(MainSettingsScroll)
  736.     onehack.CheckBox(MainSettingsScroll,'Armor bar','ESP_PLAYER_ARMOR_BOX')
  737.     onehack.CheckBox(MainSettingsScroll,'Armor Numbers','ESP_PLAYER_ARMOR_NUMBERS')
  738.     onehack.Spliter(MainSettingsScroll)
  739.     onehack.CheckBox(MainSettingsScroll,'Weapon name','ESP_PLAYER_WEAPON_NAME')
  740.     onehack.CheckBox(MainSettingsScroll,'Player Name','ESP_PLAYER_NAME')
  741.     onehack.CheckBox(MainSettingsScroll,'Usergroup','ESP_PLAYER_USERGROUP')
  742.     onehack.CheckBox(MainSettingsScroll,'Team name','ESP_PLAYER_TEAM')
  743.     onehack.CheckBox(MainSettingsScroll,'Distance','ESP_PLAYER_DISTANCE')
  744.     onehack.CheckBox(MainSettingsScroll,'Skeleton','ESP_PLAYER_SKELETON')
  745.    
  746.     local MainSettings = onehack.Panel(Player)
  747.     MainSettings:Dock(LEFT)
  748.     MainSettings:DockMargin(0, 10, 10, 10)
  749.     MainSettings:SetWide(260)
  750.     onehack.Header(MainSettings, {{name='Props',onclick=function()end}})
  751.     local MainSettingsScroll = onehack.ScrollPanel(MainSettings,80)
  752.    
  753.     onehack.CheckBox(MainSettingsScroll,'Props ESP','ESP_PROPS_ENABLED')
  754.     --onehack.CheckBox(MainSettingsScroll,'Only Visible','ESP_PROPS_ONLY_VISIBLE')
  755.     onehack.Spliter(MainSettingsScroll)
  756.     onehack.CheckBox(MainSettingsScroll,'Boxes','ESP_PROPS_BOX')
  757.     onehack.Spliter(MainSettingsScroll)
  758.     onehack.CheckBox(MainSettingsScroll,'Health bar','ESP_PROPS_HP_BOX')
  759.     onehack.CheckBox(MainSettingsScroll,'Health Numbers','ESP_PROPS_HP_NUMBERS')
  760.     onehack.Spliter(MainSettingsScroll)
  761.     onehack.CheckBox(MainSettingsScroll,'Distance','ESP_PROPS_DISTANCE')
  762.     onehack.CheckBox(MainSettingsScroll,'Prop URL','ESP_PROPS_URL')
  763.  
  764.     onehack.Header(Visuals, {
  765.         {name='ESP',onclick=function()
  766.  
  767.             if IsValid(Visuals.ActiveTab) then Visuals.ActiveTab:Remove() end
  768.             local Player = onehack.OptionsPanel(Visuals)
  769.             Player:SetPos(0,50)
  770.             Player:SetSize(Visuals:GetWide(),Visuals:GetTall()-50)
  771.             Visuals.ActiveTab = Player
  772.             function Player:Paint(w,h)
  773.                 --draw.RoundedBox(0, 0, 0, w, h, Color(255,255,0))
  774.             end
  775.  
  776.             local MainSettings = onehack.Panel(Player)
  777.             MainSettings:Dock(LEFT)
  778.             MainSettings:DockMargin(10, 10, 10, 10)
  779.             MainSettings:SetWide(260)
  780.             onehack.Header(MainSettings, {{name='Player',onclick=function()end}})
  781.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,0)
  782.  
  783.             onehack.CheckBox(MainSettingsScroll,'Player ESP','ESP_PLAYER_ENABLED')
  784.             onehack.CheckBox(MainSettingsScroll,'Only Visible','ESP_PLAYER_ONLY_VISIBLE')
  785.             onehack.CheckBox(MainSettingsScroll,'Dormant','ESP_PLAYER_DORMANT_VISIBLE')
  786.             onehack.Spliter(MainSettingsScroll)
  787.             onehack.CheckBox(MainSettingsScroll,'Boxes','ESP_PLAYER_BOX')
  788.             onehack.Spliter(MainSettingsScroll)
  789.             onehack.CheckBox(MainSettingsScroll,'Health bar','ESP_PLAYER_HP_BOX')
  790.             onehack.CheckBox(MainSettingsScroll,'Health Numbers','ESP_PLAYER_HP_NUMBERS')
  791.             onehack.Spliter(MainSettingsScroll)
  792.             onehack.CheckBox(MainSettingsScroll,'Armor bar','ESP_PLAYER_ARMOR_BOX')
  793.             onehack.CheckBox(MainSettingsScroll,'Armor Numbers','ESP_PLAYER_ARMOR_NUMBERS')
  794.             onehack.Spliter(MainSettingsScroll)
  795.             onehack.CheckBox(MainSettingsScroll,'Weapon name','ESP_PLAYER_WEAPON_NAME')
  796.             onehack.CheckBox(MainSettingsScroll,'Player Name','ESP_PLAYER_NAME')
  797.             onehack.CheckBox(MainSettingsScroll,'Usergroup','ESP_PLAYER_USERGROUP')
  798.             onehack.CheckBox(MainSettingsScroll,'Team name','ESP_PLAYER_TEAM')
  799.             onehack.CheckBox(MainSettingsScroll,'Distance','ESP_PLAYER_DISTANCE')
  800.             onehack.CheckBox(MainSettingsScroll,'Skeleton','ESP_PLAYER_SKELETON')
  801.            
  802.             local MainSettings = onehack.Panel(Player)
  803.             MainSettings:Dock(LEFT)
  804.             MainSettings:DockMargin(0, 10, 10, 10)
  805.             MainSettings:SetWide(260)
  806.             onehack.Header(MainSettings, {{name='Props',onclick=function()end}})
  807.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,80)
  808.            
  809.             onehack.CheckBox(MainSettingsScroll,'Props ESP','ESP_PROPS_ENABLED')
  810.             --onehack.CheckBox(MainSettingsScroll,'Only Visible','ESP_PROPS_ONLY_VISIBLE')
  811.             onehack.Spliter(MainSettingsScroll)
  812.             onehack.CheckBox(MainSettingsScroll,'Boxes','ESP_PROPS_BOX')
  813.             onehack.Spliter(MainSettingsScroll)
  814.             onehack.CheckBox(MainSettingsScroll,'Health bar','ESP_PROPS_HP_BOX')
  815.             onehack.CheckBox(MainSettingsScroll,'Health Numbers','ESP_PROPS_HP_NUMBERS')
  816.             onehack.Spliter(MainSettingsScroll)
  817.             onehack.CheckBox(MainSettingsScroll,'Distance','ESP_PROPS_DISTANCE')
  818.             onehack.CheckBox(MainSettingsScroll,'Prop URL','ESP_PROPS_URL')
  819.         end},
  820.         {name='World',onclick=function()
  821.  
  822.             if IsValid(Visuals.ActiveTab) then Visuals.ActiveTab:Remove() end
  823.             local World = onehack.OptionsPanel(Visuals)
  824.             World:SetPos(0,50)
  825.             World:SetSize(Visuals:GetWide(),Visuals:GetTall()-50)
  826.             Visuals.ActiveTab = World
  827.             function World:Paint(w,h)
  828.                 --draw.RoundedBox(0, 0, 0, w, h, Color(255,0,0))
  829.             end
  830.  
  831.             local MainSettings = onehack.Panel(World)
  832.             MainSettings:Dock(LEFT)
  833.             MainSettings:DockMargin(10, 10, 10, 10)
  834.             MainSettings:SetWide(260)
  835.             onehack.Header(MainSettings, {{name='Textures',onclick=function()end}})
  836.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,180)
  837.  
  838.             onehack.CheckBox(MainSettingsScroll,'Enabled','WORLD_ENABLED')
  839.             onehack.Spliter(MainSettingsScroll)
  840.             onehack.CheckBox(MainSettingsScroll,'Asus walls','WORLD_ASUSWALLS')
  841.             onehack.Slider(MainSettingsScroll,'Asus wall value','WORLD_ASUSWALLS_NUMB',100,1)
  842.  
  843.             local MainSettings = onehack.Panel(World)
  844.             MainSettings:Dock(LEFT)
  845.             MainSettings:DockMargin(0, 10, 10, 10)
  846.             MainSettings:SetWide(260)
  847.             onehack.Header(MainSettings, {{name='HUD',onclick=function()end}})
  848.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,-10)
  849.  
  850.             onehack.CheckBox(MainSettingsScroll,'Enabled','HUD_ENABLED')
  851.             onehack.Spliter(MainSettingsScroll)
  852.             onehack.CheckBox(MainSettingsScroll,'Crosshair','HUD_CROSSHAIR')
  853.             onehack.Slider(MainSettingsScroll,'Crosshair grap','HUD_CROSSHAIR_GRAP',10,1)
  854.             onehack.Slider(MainSettingsScroll,'Crosshair lenght','HUD_CROSSHAIR_LENGHT',10,1)
  855.             onehack.Spliter(MainSettingsScroll)
  856.             onehack.CheckBox(MainSettingsScroll,'Aim FOV','HUD_VELOCITYFOV')
  857.             onehack.CheckBox(MainSettingsScroll,'Wathermark','HUD_WATHERMARK')
  858.             onehack.CheckBox(MainSettingsScroll,'Hitmarker','HUD_HITMARKER')
  859.             onehack.CheckBox(MainSettingsScroll,'Bullet trace','HUD_BULLETTRACE')
  860.             onehack.CheckBox(MainSettingsScroll,'Snapline','HUD_SNAPLINE')
  861.             onehack.CheckBox(MainSettingsScroll,'No Visual recoil','HUD_NOVISUALRECOIL')
  862.             onehack.Spliter(MainSettingsScroll)
  863.             onehack.CheckBox(MainSettingsScroll,'Thirdpreson','HUD_TPC')
  864.             onehack.Slider(MainSettingsScroll,'Distance','HUD_TPCDIST',100,1)
  865.         end},
  866.         {name='Chams',onclick=function()
  867.  
  868.             if IsValid(Visuals.ActiveTab) then Visuals.ActiveTab:Remove() end
  869.             local Chams = onehack.OptionsPanel(Visuals)
  870.             Chams:SetPos(0,50)
  871.             Chams:SetSize(Visuals:GetWide(),Visuals:GetTall()-50)
  872.             Visuals.ActiveTab = Chams
  873.             function Chams:Paint(w,h)
  874.                 --draw.RoundedBox(0, 0, 0, w, h, Color(0,255,0))
  875.             end
  876.  
  877.             local MainSettings = onehack.Panel(Chams)
  878.             MainSettings:Dock(LEFT)
  879.             MainSettings:DockMargin(10, 10, 10, 10)
  880.             MainSettings:SetWide(260)
  881.             onehack.Header(MainSettings, {{name='Player',onclick=function()end}})
  882.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,80)
  883.  
  884.             onehack.CheckBox(MainSettingsScroll,'Enabled','CPLAYER_ENABLED')
  885.             onehack.Spliter(MainSettingsScroll)
  886.             onehack.CheckBox(MainSettingsScroll,'Visible chams','CPLAYER_ENABLED_VISIBLE')
  887.             onehack.CheckBox(MainSettingsScroll,'Invisible chams','CPLAYER_ENABLED_INVISIBLE')
  888.             onehack.Spliter(MainSettingsScroll)
  889.             onehack.CheckBox(MainSettingsScroll,'Local chams','CPLAYER_SELFENABLED')
  890.             onehack.CheckBox(MainSettingsScroll,'Hands chams','CPLAYER_HANDCHAMS')
  891.  
  892.             local MainSettings = onehack.Panel(Chams)
  893.             MainSettings:Dock(LEFT)
  894.             MainSettings:DockMargin(0, 10, 10, 10)
  895.             MainSettings:SetWide(260)
  896.             onehack.Header(MainSettings, {{name='Props',onclick=function()end}})
  897.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,80)
  898.  
  899.             onehack.CheckBox(MainSettingsScroll,'Enabled','CPROPS_ENABLED')
  900.             onehack.Spliter(MainSettingsScroll)
  901.             onehack.CheckBox(MainSettingsScroll,'Visible chams','CPROPS_ENABLED_VISIBLE')
  902.             onehack.CheckBox(MainSettingsScroll,'Invisible chams','CPROPS_ENABLED_INVISIBLE')
  903.  
  904.         end},
  905.         {name='Glow',onclick=function()
  906.  
  907.             if IsValid(Visuals.ActiveTab) then Visuals.ActiveTab:Remove() end
  908.             local Glow = onehack.OptionsPanel(Visuals)
  909.             Glow:SetPos(0,50)
  910.             Glow:SetSize(Visuals:GetWide(),Visuals:GetTall()-50)
  911.             Visuals.ActiveTab = Glow
  912.             function Glow:Paint(w,h)
  913.                 --draw.RoundedBox(0, 0, 0, w, h, Color(0,0,255))
  914.             end
  915.  
  916.             local MainSettings = onehack.Panel(Glow)
  917.             MainSettings:Dock(LEFT)
  918.             MainSettings:DockMargin(10, 10, 10, 10)
  919.             MainSettings:SetWide(260)
  920.             onehack.Header(MainSettings, {{name='Player',onclick=function()end}})
  921.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,80)
  922.  
  923.             onehack.CheckBox(MainSettingsScroll,'Enabled','GPLAYER_ENABLED')
  924.             onehack.Spliter(MainSettingsScroll)
  925.             onehack.CheckBox(MainSettingsScroll,'Visible glow','GPLAYER_ENABLED_VISIBLE')
  926.             onehack.CheckBox(MainSettingsScroll,'Invisible glow','GPLAYER_ENABLED_INVISIBLE')
  927.             onehack.Spliter(MainSettingsScroll)
  928.             onehack.CheckBox(MainSettingsScroll,'Local glow','GPLAYER_SELFENABLED')
  929.             onehack.Spliter(MainSettingsScroll)
  930.             onehack.CheckBox(MainSettingsScroll,'Dynamic light','GPLAYER_DYNAMICLIGHT')
  931.             onehack.Slider(MainSettingsScroll,'Dynamic light range','GPLAYER_DYNAMICLIGHT_RANGE',100,1)
  932.  
  933.             local MainSettings = onehack.Panel(Glow)
  934.             MainSettings:Dock(LEFT)
  935.             MainSettings:DockMargin(0, 10, 10, 10)
  936.             MainSettings:SetWide(260)
  937.             onehack.Header(MainSettings, {{name='Props',onclick=function()end}})
  938.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,80)
  939.  
  940.             onehack.CheckBox(MainSettingsScroll,'Enabled','GPROPS_ENABLED')
  941.             onehack.Spliter(MainSettingsScroll)
  942.             onehack.CheckBox(MainSettingsScroll,'Visible glow','GPROPS_ENABLED_VISIBLE')
  943.             onehack.CheckBox(MainSettingsScroll,'Invisible glow','GPROPS_ENABLED_INVISIBLE')
  944.  
  945.         end},
  946.  
  947.         {name='Colors',onclick=function()
  948.  
  949.             if IsValid(Visuals.ActiveTab) then Visuals.ActiveTab:Remove() end
  950.             local Colors = onehack.OptionsPanel(Visuals)
  951.             Colors:SetPos(0,50)
  952.             Colors:SetSize(Visuals:GetWide(),Visuals:GetTall()-50)
  953.             Visuals.ActiveTab = Colors
  954.             function Colors:Paint(w,h)
  955.                 --draw.RoundedBox(0, 0, 0, w, h, Color(0,0,255))
  956.             end
  957.  
  958.             local MainSettings = onehack.Panel(Colors)
  959.             MainSettings:Dock(LEFT)
  960.             MainSettings:DockMargin(10, 10, 10, 10)
  961.             MainSettings:SetWide(260)
  962.             local MainSettingsScroll = onehack.ScrollPanel(MainSettings,-99)
  963.  
  964.             onehack.ColorSwitch(MainSettingsScroll,"ESP Player boxes","COLOR_ESP_PLAYER_BOXES")
  965.             onehack.ColorSwitch(MainSettingsScroll,"ESP Player Weapon Name","COLOR_ESP_PLAYER_WEAPON_NAME")
  966.             onehack.ColorSwitch(MainSettingsScroll,"ESP Player Weapon Name","COLOR_ESP_PLAYER_NAME")
  967.             onehack.ColorSwitch(MainSettingsScroll,"ESP Player Usergroup","COLOR_ESP_PLAYER_USERGROUP")
  968.             onehack.ColorSwitch(MainSettingsScroll,"ESP Player Team","COLOR_ESP_PLAYER_TEAM")
  969.             onehack.ColorSwitch(MainSettingsScroll,"ESP Player Distance","COLOR_ESP_PLAYER_DISTANCE")
  970.             onehack.ColorSwitch(MainSettingsScroll,"ESP Player Skeleton","COLOR_ESP_PLAYER_SKELETON")
  971.             onehack.ColorSwitch(MainSettingsScroll,"ESP Props boxes","COLOR_ESP_PROPS_BOXES")
  972.             onehack.ColorSwitch(MainSettingsScroll,"ESP Props URL","COLOR_ESP_PROPS_URL")
  973.             onehack.ColorSwitch(MainSettingsScroll,"ESP Props Distance","COLOR_ESP_PROPS_DISTANCE")
  974.             onehack.ColorSwitch(MainSettingsScroll,"HUD Crosshair","COLOR_WORLD_CROSSHAIR")
  975.             onehack.ColorSwitch(MainSettingsScroll,"HUD Spread FOV","COLOR_WORLD_SPREADFOV")
  976.             onehack.ColorSwitch(MainSettingsScroll,"HUD Wathermark","COLOR_WORLD_WATHERMARK")
  977.             onehack.ColorSwitch(MainSettingsScroll,"HUD Hitmarker","COLOR_WORLD_HITMARKER")
  978.             onehack.ColorSwitch(MainSettingsScroll,"HUD Snapline","COLOR_WORLD_SNAPLINE")
  979.             onehack.ColorSwitch(MainSettingsScroll,"HUD Bullet trace","COLOR_WORLD_BULLETTRACE")
  980.  
  981.             onehack.ColorSwitch(MainSettingsScroll,"Chams Player Visible","COLOR_CHAMS_PLAYER_VISIBLE")
  982.             onehack.ColorSwitch(MainSettingsScroll,"Anti-Aim Real Chams","COLOR_CHAMS_PLAYER_REALAA")
  983.             onehack.ColorSwitch(MainSettingsScroll,"Anti-Aim Fake Chams","COLOR_CHAMS_PLAYER_AA")
  984.             onehack.ColorSwitch(MainSettingsScroll,"Chams Player InVisible","COLOR_CHAMS_PLAYER_INVISIBLE")
  985.             onehack.ColorSwitch(MainSettingsScroll,"Chams Props Visible","COLOR_CHAMS_PROPS_VISIBLE")
  986.             onehack.ColorSwitch(MainSettingsScroll,"Chams Props InVisible","COLOR_CHAMS_PROPS_INVISIBLE")
  987.             onehack.ColorSwitch(MainSettingsScroll,"Chams Hands","COLOR_CHAMS_HANDS")
  988.  
  989.             onehack.ColorSwitch(MainSettingsScroll,"Glow Player","COLOR_GLOW_PLAYER")
  990.             onehack.ColorSwitch(MainSettingsScroll,"Glow Props","COLOR_GLOW_PROPS")
  991.  
  992.             onehack.ColorSwitch(MainSettingsScroll,"Light","COLOR_LIGHT")
  993.            
  994.             local MainSettings = onehack.Panel(Colors)
  995.             MainSettings:Dock(TOP)
  996.             MainSettings:DockMargin(0, 10, 10, 10)
  997.             MainSettings:SetSize(260,270)
  998.  
  999.             local Mixer = vgui.Create( "DColorMixer", MainSettings )
  1000.             Mixer:SetSize(240,210)
  1001.             Mixer:Dock(TOP)
  1002.             Mixer:DockMargin(10, 10, 10, 0)
  1003.             Mixer:SetPalette( false )
  1004.             Mixer:SetAlphaBar( true )
  1005.             Mixer:SetWangs( false )
  1006.             Mixer:SetColor( onehack.vars[onehack.ActiveColorChange] or Color(255,255,255) )
  1007.             function Mixer:ValueChanged( col )
  1008.                 onehack.vars[onehack.ActiveColorChange] = col
  1009.             end
  1010.             local check = onehack.CheckBox(MainSettings,'Rainbow','ESP_RAINBOW_CURENT')
  1011.             function check:DoClick()
  1012.                 onehack.rainbows[onehack.ActiveColorChange] = !onehack.rainbows[onehack.ActiveColorChange]
  1013.                 onehack.vars['ESP_RAINBOW_CURENT'] = onehack.rainbows[onehack.ActiveColorChange]
  1014.             end
  1015.         end},
  1016.     })
  1017.  
  1018. end
  1019.  
  1020. local function AimPanel()
  1021.  
  1022.     if IsValid(onehack.curpage) then onehack.curpage:Remove() end
  1023.  
  1024.     local Aimbot = onehack.OptionsPanel(onehack.MainFrame)
  1025.     Aimbot.ActiveTab = nil
  1026.     Aimbot:MoveToBack()
  1027.     onehack.curpage = Aimbot
  1028.  
  1029.     local Legitbot = onehack.OptionsPanel(Aimbot)
  1030.     Legitbot:SetPos(0,50)
  1031.     Legitbot:SetSize(Aimbot:GetWide(),Aimbot:GetTall()-50)
  1032.     Aimbot.ActiveTab = Legitbot
  1033.     function Legitbot:Paint(w,h) end
  1034.  
  1035.     local MainSettings = onehack.Panel(Legitbot)
  1036.     MainSettings:Dock(TOP)
  1037.     MainSettings:DockMargin(10, 10, 10, 10)
  1038.     MainSettings:SetTall(50)
  1039.  
  1040.     onehack.CheckBox(MainSettings,'Enabled','AIMBOT_LEGIT_ENABLED')
  1041.  
  1042.     local Options = onehack.Panel(Legitbot)
  1043.     Options:Dock(LEFT)
  1044.     Options:DockMargin(10, 0, 10, 10)
  1045.     Options:SetWide(260)
  1046.     onehack.Header(Options, {{name='Options',onclick=function()end}})
  1047.     local OptionsScroll = onehack.ScrollPanel(Options,-30)
  1048.  
  1049.     onehack.CheckBox(OptionsScroll,'Auto shot','AIMBOT_LEGIT_AUTOSHOT')
  1050.     onehack.Slider(OptionsScroll,'FOV','AIMBOT_LEGIT_FOV',180,1)
  1051.     onehack.Slider(OptionsScroll,'Smooth','AIMBOT_LEGIT_SMOOTH',100,1)
  1052.     onehack.Spliter(OptionsScroll)
  1053.     onehack.CheckBox(OptionsScroll,'Ignore team','AIMBOT_LEGIT_IGNORETEAM')
  1054.     onehack.CheckBox(OptionsScroll,'Ignore admins','AIMBOT_LEGIT_IGNOREADMINS')
  1055.     onehack.CheckBox(OptionsScroll,'Ignore nocliped','AIMBOT_LEGIT_IGNORENOCLIP')
  1056.     onehack.Spliter(OptionsScroll)
  1057.     onehack.CheckBox(OptionsScroll,'Slient','AIMBOT_LEGIT_SLIENT')
  1058.     onehack.CheckBox(OptionsScroll,'No Recoil','AIMBOT_LEGIT_RECOIL')
  1059.     onehack.CheckBox(OptionsScroll,'No Spread (OD)','AIMBOT_LEGIT_SPREAD')
  1060.  
  1061.     local Settings = onehack.Panel(Legitbot)
  1062.     Settings:Dock(LEFT)
  1063.     Settings:DockMargin(0, 0, 10, 10)
  1064.     Settings:SetWide(260)
  1065.     onehack.Header(Settings, {{name='Anti-aim',onclick=function()end}})
  1066.     local SettingsScroll = onehack.ScrollPanel(Settings,4)
  1067.  
  1068.     onehack.CheckBox(SettingsScroll,'Enabled','AIMBOT_ANTIAIM_ENABLED')
  1069.     onehack.CheckBox(SettingsScroll,'Show Real Chams','AIMBOT_ANTIAIM_AACHAMS')
  1070.     onehack.Spliter(SettingsScroll)
  1071.     onehack.DropDown(SettingsScroll,"Pich",{"Disabled","Jitter","Down","Up"},"AIMBOT_ANTIAIM_PICH")
  1072.     onehack.DropDown(SettingsScroll,"Yaw",{"Disabled","Jitter","Switch","Switch + Backward","Switch + 180","Backward","180"},"AIMBOT_ANTIAIM_YAW")
  1073.     onehack.Slider(SettingsScroll,'Yaw Switch Range','AIMBOT_ANTIAIM_SWITCHRANGE',180,1)
  1074.     onehack.Slider(SettingsScroll,'Fake Yaw Switch Speed','AIMBOT_ANTIAIM_SWITCHSPEED',100,1)
  1075.     onehack.Spliter(SettingsScroll)
  1076.     onehack.CheckBox(SettingsScroll,'Enable Fake','AIMBOT_ANTIAIM_FAKE_ENABLED')
  1077.     onehack.CheckBox(SettingsScroll,'Show Fake Chams','AIMBOT_ANTIAIM_FAACHAMS')
  1078.     onehack.DropDown(SettingsScroll,"Fake Pich",{"Disabled","Jitter","Down","Up"},"AIMBOT_ANTIAIM_FAKE_PICH")
  1079.     onehack.DropDown(SettingsScroll,"Fake Yaw",{"Disabled","Jitter","Switch","Switch + Backward","Switch + 180","Backward","180"},"AIMBOT_ANTIAIM_FAKE_YAW")
  1080.     onehack.Slider(SettingsScroll,'Fake Yaw Switch Range','AIMBOT_ANTIAIM_FAKE_SWITCHRANGE',180,1)
  1081.     onehack.Slider(SettingsScroll,'Fake Yaw Switch Speed','AIMBOT_ANTIAIM_FAKE_SWITCHSPEED',100,1)
  1082.     onehack.Spliter(SettingsScroll)
  1083.     onehack.Slider(SettingsScroll,'Fake Lagg Factor','AIMBOT_ANTIAIM_FAKE_LAGG',100,1)
  1084.     onehack.CheckBox(SettingsScroll,'Show Lagg Chams','AIMBOT_ANTIAIM_FAKELAGG')
  1085.  
  1086.     onehack.Header(Aimbot, {
  1087.         {name='Legitbot',onclick=function()
  1088.  
  1089.             if IsValid(Aimbot.ActiveTab) then Aimbot.ActiveTab:Remove() end
  1090.             local Legitbot = onehack.OptionsPanel(Aimbot)
  1091.             Legitbot:SetPos(0,50)
  1092.             Legitbot:SetSize(Aimbot:GetWide(),Aimbot:GetTall()-50)
  1093.             Aimbot.ActiveTab = Legitbot
  1094.             function Legitbot:Paint(w,h) end
  1095.  
  1096.             local MainSettings = onehack.Panel(Legitbot)
  1097.             MainSettings:Dock(TOP)
  1098.             MainSettings:DockMargin(10, 10, 10, 10)
  1099.             MainSettings:SetTall(50)
  1100.  
  1101.             onehack.CheckBox(MainSettings,'Enabled','AIMBOT_LEGIT_ENABLED')
  1102.  
  1103.             local Options = onehack.Panel(Legitbot)
  1104.             Options:Dock(LEFT)
  1105.             Options:DockMargin(10, 0, 10, 10)
  1106.             Options:SetWide(260)
  1107.             onehack.Header(Options, {{name='Options',onclick=function()end}})
  1108.             local OptionsScroll = onehack.ScrollPanel(Options,-30)
  1109.  
  1110.             onehack.CheckBox(OptionsScroll,'Auto shot','AIMBOT_LEGIT_AUTOSHOT')
  1111.             onehack.Slider(OptionsScroll,'FOV','AIMBOT_LEGIT_FOV',180,1)
  1112.             onehack.Slider(OptionsScroll,'Smooth','AIMBOT_LEGIT_SMOOTH',100,1)
  1113.             onehack.Spliter(OptionsScroll)
  1114.             onehack.CheckBox(OptionsScroll,'Ignore team','AIMBOT_LEGIT_IGNORETEAM')
  1115.             onehack.CheckBox(OptionsScroll,'Ignore admins','AIMBOT_LEGIT_IGNOREADMINS')
  1116.             onehack.CheckBox(OptionsScroll,'Ignore nocliped','AIMBOT_LEGIT_IGNORENOCLIP')
  1117.             onehack.Spliter(OptionsScroll)
  1118.             onehack.CheckBox(OptionsScroll,'Slient','AIMBOT_LEGIT_SLIENT')
  1119.             onehack.CheckBox(OptionsScroll,'No Recoil','AIMBOT_LEGIT_RECOIL')
  1120.             onehack.CheckBox(OptionsScroll,'No Spread','AIMBOT_LEGIT_SPREAD')
  1121.  
  1122.             local Settings = onehack.Panel(Legitbot)
  1123.             Settings:Dock(LEFT)
  1124.             Settings:DockMargin(0, 0, 10, 10)
  1125.             Settings:SetWide(260)
  1126.             onehack.Header(Settings, {{name='Anti-aim',onclick=function()end}})
  1127.             local SettingsScroll = onehack.ScrollPanel(Settings,4)
  1128.  
  1129.             onehack.CheckBox(SettingsScroll,'Enabled','AIMBOT_ANTIAIM_ENABLED')
  1130.             onehack.CheckBox(SettingsScroll,'Show Real Chams','AIMBOT_ANTIAIM_AACHAMS')
  1131.             onehack.Spliter(SettingsScroll)
  1132.             onehack.DropDown(SettingsScroll,"Pich",{"Disabled","Jitter","Down","Up"},"AIMBOT_ANTIAIM_PICH")
  1133.             onehack.DropDown(SettingsScroll,"Yaw",{"Disabled","Jitter","Switch","Switch + Backward","Switch + 180","Backward","180"},"AIMBOT_ANTIAIM_YAW")
  1134.             onehack.Slider(SettingsScroll,'Yaw Switch Range','AIMBOT_ANTIAIM_SWITCHRANGE',180,1)
  1135.             onehack.Slider(SettingsScroll,'Fake Yaw Switch Speed','AIMBOT_ANTIAIM_SWITCHSPEED',100,1)
  1136.             onehack.Spliter(SettingsScroll)
  1137.             onehack.CheckBox(SettingsScroll,'Enable Fake','AIMBOT_ANTIAIM_FAKE_ENABLED')
  1138.             onehack.CheckBox(SettingsScroll,'Show Fake Chams','AIMBOT_ANTIAIM_FAACHAMS')
  1139.             onehack.DropDown(SettingsScroll,"Fake Pich",{"Disabled","Jitter","Down","Up"},"AIMBOT_ANTIAIM_FAKE_PICH")
  1140.             onehack.DropDown(SettingsScroll,"Fake Yaw",{"Disabled","Jitter","Switch","Switch + Backward","Switch + 180","Backward","180"},"AIMBOT_ANTIAIM_FAKE_YAW")
  1141.             onehack.Slider(SettingsScroll,'Fake Yaw Switch Range','AIMBOT_ANTIAIM_FAKE_SWITCHRANGE',180,1)
  1142.             onehack.Slider(SettingsScroll,'Fake Yaw Switch Speed','AIMBOT_ANTIAIM_FAKE_SWITCHSPEED',100,1)
  1143.             onehack.Spliter(SettingsScroll)
  1144.             onehack.Slider(SettingsScroll,'Fake Lagg Factor','AIMBOT_ANTIAIM_FAKE_LAGG',100,1)
  1145.             onehack.CheckBox(SettingsScroll,'Show Lagg Chams','AIMBOT_ANTIAIM_FAKELAGG')
  1146.        
  1147.         end},
  1148.  
  1149.         {name='Trigger',onclick=function()
  1150.  
  1151.             if IsValid(Aimbot.ActiveTab) then Aimbot.ActiveTab:Remove() end
  1152.             local Trigger = onehack.OptionsPanel(Aimbot)
  1153.             Trigger:SetPos(0,50)
  1154.             Trigger:SetSize(Aimbot:GetWide(),Aimbot:GetTall()-50)
  1155.             Aimbot.ActiveTab = Trigger
  1156.             function Trigger:Paint(w,h) end
  1157.  
  1158.             local MainSettings = onehack.Panel(Trigger)
  1159.             MainSettings:Dock(TOP)
  1160.             MainSettings:DockMargin(10, 10, 10, 10)
  1161.             MainSettings:SetTall(50)
  1162.  
  1163.             onehack.CheckBox(MainSettings,'Enabled','TRIGGER_ENABLED')
  1164.  
  1165.         end},
  1166.  
  1167.     })
  1168.  
  1169. end
  1170.  
  1171. local function MiscPanel()
  1172.  
  1173.     if IsValid(onehack.curpage) then onehack.curpage:Remove() end
  1174.  
  1175.     local Misc = onehack.OptionsPanel(onehack.MainFrame)
  1176.     Misc.ActiveTab = nil
  1177.     Misc:MoveToBack()
  1178.     onehack.curpage = Misc
  1179.  
  1180.     local Legitbot = onehack.OptionsPanel(Misc)
  1181.     Legitbot:SetPos(0,50)
  1182.     Legitbot:SetSize(Misc:GetWide(),Misc:GetTall()-50)
  1183.     Misc.ActiveTab = Legitbot
  1184.     function Legitbot:Paint(w,h) end
  1185.  
  1186.     local Options = onehack.Panel(Legitbot)
  1187.     Options:Dock(LEFT)
  1188.     Options:DockMargin(10, 10, 10, 10)
  1189.     Options:SetWide(260)
  1190.     onehack.Header(Options, {{name='Self',onclick=function()end}})
  1191.     local OptionsScroll = onehack.ScrollPanel(Options,-30)
  1192.  
  1193.     onehack.CheckBox(OptionsScroll,'Auto Bhop','OTHERS_BHOP')
  1194.     onehack.CheckBox(OptionsScroll,'Auto Strafe','OTHERS_STRAFE')
  1195.     onehack.CheckBox(OptionsScroll,'Flash-Spam','OTHERS_FSPAM')
  1196.  
  1197.     local Settings = onehack.Panel(Legitbot)
  1198.     Settings:Dock(LEFT)
  1199.     Settings:DockMargin(0, 10, 10, 10)
  1200.     Settings:SetWide(260)
  1201.     onehack.Header(Settings, {{name='Global',onclick=function()end}})
  1202.     local SettingsScroll = onehack.ScrollPanel(Settings,4)
  1203.  
  1204.     onehack.CheckBox(SettingsScroll,'Soon...','OTHRES_SOON')
  1205.  
  1206.     onehack.Header(Misc, {
  1207.         {name='Misc',onclick=function()
  1208.  
  1209.             if IsValid(Misc.ActiveTab) then Misc.ActiveTab:Remove() end
  1210.             local Legitbot = onehack.OptionsPanel(Misc)
  1211.             Legitbot:SetPos(0,50)
  1212.             Legitbot:SetSize(Misc:GetWide(),Misc:GetTall()-50)
  1213.             Misc.ActiveTab = Legitbot
  1214.             function Legitbot:Paint(w,h) end
  1215.  
  1216.             local Options = onehack.Panel(Legitbot)
  1217.             Options:Dock(LEFT)
  1218.             Options:DockMargin(10, 10, 10, 10)
  1219.             Options:SetWide(260)
  1220.             onehack.Header(Options, {{name='Self',onclick=function()end}})
  1221.             local OptionsScroll = onehack.ScrollPanel(Options,-30)
  1222.  
  1223.             onehack.CheckBox(OptionsScroll,'Auto Bhop','OTHERS_BHOP')
  1224.             onehack.CheckBox(OptionsScroll,'Auto Strafe','OTHERS_STRAFE')
  1225.             onehack.CheckBox(OptionsScroll,'Flash-Spam','OTHERS_FSPAM')
  1226.  
  1227.             local Settings = onehack.Panel(Legitbot)
  1228.             Settings:Dock(LEFT)
  1229.             Settings:DockMargin(0, 10, 10, 10)
  1230.             Settings:SetWide(260)
  1231.             onehack.Header(Settings, {{name='Global',onclick=function()end}})
  1232.             local SettingsScroll = onehack.ScrollPanel(Settings,4)
  1233.  
  1234.             onehack.CheckBox(SettingsScroll,'Soon...','OTHRES_SOON')
  1235.        
  1236.         end}
  1237.  
  1238.     })
  1239.  
  1240. end
  1241.  
  1242. function onehack.ToggleMenu()
  1243. onehack.MainFrame = onehack.DrawFrame(600,550)
  1244.  
  1245. onehack.SideFrame = onehack.SideMenu(onehack.MainFrame)
  1246.  
  1247. onehack.SideHeader(onehack.SideFrame)
  1248.  
  1249. ChamsPanel()
  1250.  
  1251. onehack.SideButton(onehack.SideFrame,'chams',"Visuals","Player, World, Chams, Glow",function()
  1252.  
  1253.     ChamsPanel()
  1254.  
  1255. end)
  1256.  
  1257. onehack.SideButton(onehack.SideFrame,'aimbot',"Aimbot","Legitbot, Trigger, Ragebot",function()
  1258.  
  1259.     AimPanel()
  1260.  
  1261. end)
  1262.  
  1263. onehack.SideButton(onehack.SideFrame,'other',"Misc","Other functions",function()
  1264.  
  1265.     MiscPanel()
  1266.  
  1267. end)
  1268.  
  1269. onehack.SideButton(onehack.SideFrame,'lconf',"Load config","Load your config",function()
  1270.  
  1271.     if file.Exists("o_conf.dat", "DATA") then
  1272.         local data = file.Read("o_conf.dat")
  1273.         for k,v in pairs(util.JSONToTable(data)) do
  1274.             onehack.vars[k] = v
  1275.         end
  1276.     end
  1277.  
  1278. end)
  1279.  
  1280. onehack.SideButton(onehack.SideFrame,'sconf',"Save config","Save your config",function()
  1281.  
  1282.     file.Write("o_conf.dat", util.TableToJSON(onehack.vars))
  1283.  
  1284. end)
  1285.  
  1286. onehack.SideFooter(onehack.SideFrame)
  1287. end
  1288.  
  1289. local input = input
  1290. local timer = timer
  1291. hook.Add("Think",'onehack.hooks',function()
  1292.    
  1293.     if onehack.vars['OTHERS_BHOP'] and input.IsKeyDown( KEY_SPACE ) then
  1294.         if LocalPlayer():IsTyping() == false and LocalPlayer():IsOnGround() and LocalPlayer():WaterLevel() <= 1 && LocalPlayer():GetMoveType() != MOVETYPE_LADDER then
  1295.  
  1296.             RunConsoleCommand("+jump")
  1297.             timer.Create("Bhop", 0, math.random( .280, .290 ), function()
  1298.                 RunConsoleCommand("-jump")
  1299.             end)
  1300.         end
  1301.     end
  1302.     if input.IsKeyDown( KEY_F11 ) then
  1303.         if not timer.Exists('onehack.MenuIsPressed') then
  1304.             if IsValid(onehack.MainFrame) then
  1305.                 onehack.MainFrame:AlphaTo(0, 0.2)
  1306.                 timer.Simple(0.2,function()
  1307.                     onehack.MainFrame:Remove()
  1308.                 end)
  1309.             else
  1310.                 onehack.ToggleMenu()
  1311.             end
  1312.             timer.Create('onehack.MenuIsPressed',0.3,1,function() end)
  1313.         end
  1314.     end
  1315. end)
  1316. require("bsendpacket")
  1317. local TickLagg = 1
  1318. function onehack.FakeLag(cmd)
  1319.     if onehack.vars['AIMBOT_ANTIAIM_FAKE_LAGG'] and onehack.vars['AIMBOT_ANTIAIM_FAKE_LAGG'] > 0 then
  1320.         TickLagg = TickLagg + 1
  1321.         bSendPacket = (TickLagg % (math.Round(onehack.vars['AIMBOT_ANTIAIM_FAKE_LAGG']*10+1))) == 0
  1322.  
  1323.     else
  1324.         bSendPacket = cmd:CommandNumber() % 2 == 1
  1325.     end
  1326. end
  1327. onehack.Hit = {}
  1328. onehack.HitTracers = {}
  1329. onehack.Hit.Active = false
  1330. onehack.ActiveColorChange = 'none'
  1331. function onehack.coordinates( ent )
  1332.     local min, max = ent:OBBMins(), ent:OBBMaxs()
  1333.     local corners = {
  1334.             Vector( min.x, min.y, min.z ),
  1335.             Vector( min.x, min.y, max.z ),
  1336.             Vector( min.x, max.y, min.z ),
  1337.             Vector( min.x, max.y, max.z ),
  1338.             Vector( max.x, min.y, min.z ),
  1339.             Vector( max.x, min.y, max.z ),
  1340.             Vector( max.x, max.y, min.z ),
  1341.             Vector( max.x, max.y, max.z )
  1342.     }
  1343.  
  1344.     local minX, minY, maxX, maxY = ScrW() * 2, ScrH() * 2, 0, 0
  1345.     for _, corner in pairs( corners ) do
  1346.             local onScreen = ent:LocalToWorld( corner ):ToScreen()
  1347.             minX, minY = math.min( minX, onScreen.x ), math.min( minY, onScreen.y )
  1348.             maxX, maxY = math.max( maxX, onScreen.x ), math.max( maxY, onScreen.y )
  1349.     end
  1350.     return minX, minY, maxX, maxY
  1351. end
  1352.  
  1353. function onehack.IsVisible(pOne,pTwo)
  1354.     local trace = {
  1355.         start = pOne:EyePos(),
  1356.         endpos = pTwo:EyePos(),
  1357.         filter = {pOne, pTwo},
  1358.         mask = MASK_SHOT,
  1359.     };
  1360.    
  1361.     if (util.TraceLine(trace).Fraction == 1 ) then
  1362.         return true;
  1363.     end
  1364.    
  1365.     return false;
  1366. end
  1367.  
  1368. hook.Add("ScalePlayerDamage","onehack.SDamage", function(ply, hitgroup, dmginfo)
  1369.     onehack.Hit = {}
  1370.     onehack.Hit.Active = true
  1371.     onehack.Hit.Pos = LocalPlayer():GetEyeTrace().HitPos
  1372.     onehack.Hit.Alpha = 255
  1373.     if (onehack.Hit) then timer.Simple(1.3, function() onehack.Hit.Active = false end) end
  1374. end)
  1375.  
  1376. hook.Add("PlayerTraceAttack", "onehack.DamageTrace", function(ent, dmg, dir, trace)
  1377.     if(!IsFirstTimePredicted()) then return; end
  1378.     local pos1, pos2;
  1379.     pos1 = trace.HitPos;
  1380.     pos2 = trace.StartPos;
  1381.     table.insert(onehack.HitTracers, {pos1, pos2, 3, onehack.vars['COLOR_WORLD_BULLETTRACE'], LocalPlayer():EyeAngles()});
  1382. end);
  1383. onehack.SourceSkyname = GetConVar("sv_skyname"):GetString()
  1384. onehack.orgskyname = onehack.SourceSkyname
  1385. onehack.SourceSkyPre = {"lf", "ft", "rt", "bk", "dn", "up"}
  1386. onehack.SourceSkyMat = {
  1387.     Material("skybox/".. onehack.SourceSkyname.. "lf"),
  1388.     Material("skybox/".. onehack.SourceSkyname.. "ft"),
  1389.     Material("skybox/".. onehack.SourceSkyname.. "rt"),
  1390.     Material("skybox/".. onehack.SourceSkyname.. "bk"),
  1391.     Material("skybox/".. onehack.SourceSkyname.. "dn"),
  1392.     Material("skybox/".. onehack.SourceSkyname.. "up")
  1393. }
  1394. function onehack.ChangeSkybox(skyboxname)
  1395.     for i = 1, 6 do
  1396.         onehack.D = Material("skybox/".. skyboxname.. onehack.SourceSkyPre[i]):GetTexture("$basetexture")
  1397.         onehack.SourceSkyMat[i]:SetTexture("$basetexture", onehack.D)
  1398.     end
  1399. end
  1400.  
  1401. onehack.chamsMaterial = CreateMaterial("a", "VertexLitGeneric", {
  1402.     ["$ignorez"] = 1,
  1403.     ["$model"] = 1,
  1404.     ["$basetexture"] = "models/debug/debugwhite",
  1405. })
  1406. onehack.chamsMaterialZ = CreateMaterial("@", "VertexLitGeneric", {
  1407.     ["$ignorez"] = 0,
  1408.     ["$model"] = 1,
  1409.     ["$basetexture"] = "models/debug/debugwhite",
  1410. })
  1411. onehack.chamsHMaterialZ = CreateMaterial("@", "VertexLitGeneric", {
  1412.     ["$basetexture"] = "models/debug/debugwhite",
  1413.     ["$model"] = 1,
  1414.     ["$nocull"]      = 1,
  1415.     ["$ignorez"] = 1,
  1416.     ["vertexcolor"] = 1,
  1417.     ["$color2"] = "{255 255 255}"
  1418. })
  1419. function onehack.Chams(v,ignorez,color)
  1420.     cam.Start3D()
  1421.  
  1422.         render.SuppressEngineLighting(true)
  1423.  
  1424.         if(ignorez) then
  1425.  
  1426.             render.MaterialOverride(onehack.chamsMaterial)
  1427.             render.SetColorModulation(color.r/255,color.g/255,color.b/255)
  1428.            
  1429.             v:DrawModel()
  1430.  
  1431.         else
  1432.  
  1433.             render.SetColorModulation(color.r/255,color.g/255,color.b/255)
  1434.             render.MaterialOverride(onehack.chamsMaterialZ)
  1435.        
  1436.             v:DrawModel()
  1437.  
  1438.         end
  1439.  
  1440.     cam.End3D()
  1441. end
  1442.  
  1443. function onehack.DynamicLights(v,color)
  1444.     dlight = DynamicLight(v)
  1445.        
  1446.     if(dlight) then
  1447.         dlight.pos = v:GetPos()-Vector(0,0,1)
  1448.         dlight.r = color.r
  1449.         dlight.g = color.g
  1450.         dlight.b = color.b
  1451.         dlight.brightness = (onehack.vars['GPLAYER_DYNAMICLIGHT_RANGE'] or 1) *50
  1452.         dlight.Decay = 0.4
  1453.         dlight.Size = (onehack.vars['GPLAYER_DYNAMICLIGHT_RANGE'] or 1) * 50
  1454.         dlight.DieTime = CurTime() + 0.5
  1455.     end
  1456. end
  1457.  
  1458. function onehack.InFOV(v)
  1459.     local sang = LocalPlayer():GetAngles()
  1460.     if onehack.vars['AIMBOT_LEGIT_SLIENT'] then
  1461.         sang = onehack.fakeangles
  1462.     end
  1463.     if(360*onehack.vars['AIMBOT_LEGIT_FOV'] < 180) then
  1464.         onehack.lpang = sang
  1465.         onehack.ang = (v:GetPos() - LocalPlayer():GetPos()):Angle()
  1466.         onehack.ady = math.abs(math.NormalizeAngle(onehack.lpang.y - onehack.ang.y))
  1467.         onehack.adp = math.abs(math.NormalizeAngle(onehack.lpang.p - onehack.ang.p ))
  1468.  
  1469.         if(onehack.ady > 360*onehack.vars['AIMBOT_LEGIT_FOV'] || onehack.adp > 360*onehack.vars['AIMBOT_LEGIT_FOV']) then return(false) end
  1470.     end
  1471.  
  1472.     return(true)
  1473. end
  1474.  
  1475. function onehack.PredictPos(pos)
  1476.     pos = pos - (LocalPlayer():GetVelocity() * engine.TickInterval())
  1477.     return(pos)
  1478. end
  1479.  
  1480. function onehack.Autofire(ucmd)
  1481.     ucmd:SetButtons(bit.bor(ucmd:GetButtons(), 1))
  1482. end
  1483.  
  1484. function onehack.Visible( ply )
  1485.     if (!IsValid( ply )) then return false end
  1486.    
  1487.     local vecPos, _ = ply:GetBonePosition( ply:LookupBone( "ValveBiped.Bip01_Head1" ) or 12 );
  1488.     local trace = { start = LocalPlayer():EyePos(), endpos = vecPos, filter = LocalPlayer(), mask = MASK_SHOT };
  1489.     local traceRes = util.TraceLine( trace );
  1490.    
  1491.     TraceRes = traceRes;
  1492.    
  1493.     if (traceRes.HitWorld || traceRes.Entity != ply) then return false end;
  1494.    
  1495.     return true;
  1496. end
  1497.  
  1498. function onehack.PrepareForAStomping( ply )
  1499.     if !ply:IsValid() then return false end
  1500.  
  1501.     if ply:GetModel() == "models/crow.mdl" then return ply:LocalToWorld( Vector(0, 0, 5) ) end
  1502.     local head = ply:LookupAttachment( "eyes" )
  1503.     if head then
  1504.         local pos = ply:GetAttachment(head)
  1505.         if pos then
  1506.             local tpoz = pos.Pos + ply:EyeAngles():Forward() * -1.5
  1507.             return tpoz
  1508.         end
  1509.     end
  1510.  
  1511.     local lastresort = ply:LocalToWorld( ply:OBBCenter() )
  1512.     if onehack.Visible( ply ) then return lastresort end
  1513.     return false
  1514. end
  1515.  
  1516. function onehack.FixMovment(cmd)
  1517.  
  1518.     local move = Vector( cmd:GetForwardMove(), cmd:GetSideMove(), cmd:GetUpMove() )
  1519.     local speed = math.sqrt( move.x * move.x + move.y * move.y )
  1520.     local mang = move:Angle()
  1521.     local yaw = math.rad( cmd:GetViewAngles().y - onehack.fakeangles.y + mang.y )
  1522.     cmd:SetForwardMove( (math.cos(yaw) * speed) * 1 )
  1523.     cmd:SetSideMove( math.sin(yaw) * speed )
  1524.  
  1525. end
  1526.  
  1527. function onehack.Silent(ucmd)
  1528.     if(!onehack.fakeangles) then onehack.fakeangles = ucmd:GetViewAngles(); end
  1529.     onehack.fakeangles = onehack.fakeangles + Angle(ucmd:GetMouseY() * .023, ucmd:GetMouseX() * -.023, 0);
  1530.     onehack.fakeangles.x = math.NormalizeAngle(onehack.fakeangles.x);
  1531.     onehack.fakeangles.p = math.Clamp(onehack.fakeangles.p, -89, 89);
  1532.     if(ucmd:CommandNumber() == 0) then
  1533.         ucmd:SetViewAngles(onehack.fakeangles);
  1534.         return;
  1535.     end
  1536. end
  1537.  
  1538. local awaitme = CurTime()
  1539. local target = nil
  1540. function onehack.FroceBackStap(cmd)
  1541.     if not onehack.CurTarget and onehack.vars['AIMBOT_FORCEBACKSTAP'] and awaitme < CurTime() then
  1542.         local backstap = LocalPlayer():GetEyeTrace().Entity
  1543.         local weap = LocalPlayer():GetActiveWeapon()
  1544.         if weap:IsValid() and string.find(weap:GetClass(),"csgo") and backstap:IsPlayer() then
  1545.             local pose = LocalPlayer():GetEyeTrace().HitPos
  1546.             target = backstap
  1547.             if target:IsPlayer() and pose:Distance(LocalPlayer():GetPos()) < 80 then
  1548.                 cmd:SetViewAngles(target:GetPos():Angle())
  1549.                 cmd:SetButtons(bit.bor(cmd:GetButtons(), 2048))
  1550.                 cmd:SetViewAngles(target:GetAngles()-Angle(180,0,0))
  1551.                 awaitme = CurTime() + 1
  1552.             end
  1553.         end
  1554.     end
  1555. end
  1556.  
  1557. function onehack.AStrafe(cmd)
  1558.     if (cmd:KeyDown(IN_JUMP) and onehack.vars['OTHERS_BHOP'] and onehack.vars['OTHERS_STRAFE']) then
  1559.         print(cmd:GetMouseX())
  1560.         if(cmd:GetMouseX() < 0) then --spinning right
  1561.             cmd:SetForwardMove(-1000000)
  1562.         elseif(cmd:GetMouseX() > 0) then
  1563.             cmd:SetForwardMove(1000000)
  1564.         end
  1565.     end
  1566. end
  1567.  
  1568. hook.Add("CreateMove", "onehack.PredirMovment", function(ucmd)
  1569.     if input.IsKeyDown(KEY_F) and onehack.vars["OTHERS_FSPAM"] then ucmd:SetImpulse(100) end
  1570.     onehack.FakeLag(ucmd)
  1571.     onehack.AStrafe(ucmd)
  1572.     if onehack.vars['AIMBOT_LEGIT_SLIENT'] or onehack.vars['AIMBOT_ANTIAIM_ENABLED'] then
  1573.         if onehack.vars['AIMBOT_ANTIAIM_ENABLED'] then
  1574.             onehack.AntiAim(ucmd)
  1575.         else
  1576.             bSendPacket = true
  1577.         end
  1578.         onehack.Silent(ucmd)
  1579.         onehack.FixMovment(ucmd)
  1580.     end
  1581. end)
  1582.  
  1583. function onehack.SnapRotate(snapendx,snapendy)
  1584.     local _x = snapendx - ScrW()/2
  1585.     local _y = snapendy - ScrH()/2
  1586.  
  1587.     local snapangle = math.deg(math.atan2(_y,_x))
  1588.  
  1589.     local x = math.cos(math.rad(snapangle - 90))
  1590.     local y = -math.cos(math.rad(snapangle))
  1591.  
  1592.     if (x > 0) then
  1593.         x = math.ceil(x)
  1594.     else
  1595.         x = math.floor(x)
  1596.     end
  1597.  
  1598.     if (y > 0) then
  1599.         y = math.ceil(y)
  1600.     else
  1601.         y = math.floor(y)
  1602.     end
  1603.  
  1604.     return x, y
  1605. end
  1606.  
  1607. local onehackRT = GetRenderTarget( "onehackRT" .. os.time(), ScrW(), ScrH() )
  1608.  
  1609. hook.Add( "RenderScene", "onehack.ASG", function( vOrigin, vAngle, vFOV )
  1610.     local view = {
  1611.         x = 0,
  1612.         y = 0,
  1613.         w = ScrW(),
  1614.         h = ScrH(),
  1615.         dopostprocess = true,
  1616.         origin = vOrigin,
  1617.         angles = vAngle,
  1618.         fov = vFOV,
  1619.         drawhud = true,
  1620.         drawmonitors = true,
  1621.         drawviewmodel = true
  1622.     }
  1623.  
  1624.     render.RenderView( view )
  1625.     render.CopyTexture( nil, onehackRT )
  1626.  
  1627.     cam.Start2D()
  1628.         hook.Run( "OnePaint" )
  1629.     cam.End2D()
  1630.  
  1631.     render.SetRenderTarget( onehackRT )
  1632.  
  1633.     return true
  1634. end )
  1635.  
  1636. hook.Add( "ShutDown", "onehack.ASG", function()
  1637.     render.SetRenderTarget()
  1638. end )
  1639.  
  1640. hook.Add("Think","onehack.RainBow",function()
  1641.  
  1642.     local col = HSVToColor( CurTime()*100 % 360, 1, 1 )
  1643.  
  1644.     for i, v in next, onehack.rainbows do
  1645.         if v  == true then
  1646.             onehack.vars[i] = col
  1647.         end
  1648.     end
  1649.  
  1650. end)
  1651. local alpha = 0
  1652.  
  1653.  
  1654. hook.Add("OnePaint", "onehack.ESP", function()
  1655.  
  1656.     if onehack.MainFrame and onehack.MainFrame:IsValid() and alpha < 200 then
  1657.         alpha = alpha + 5
  1658.     elseif alpha > 0 and not onehack.MainFrame:IsValid() then
  1659.         alpha = alpha - 5
  1660.     end
  1661.  
  1662.     if alpha > 1 then
  1663.         surface.SetDrawColor(0,0,0,alpha)
  1664.         surface.DrawRect(0,0,ScrW(),ScrH())
  1665.     end
  1666.  
  1667.     if onehack.vars['ESP_PLAYER_ENABLED'] then
  1668.  
  1669.         for k,ply in pairs(player.GetAll()) do
  1670.  
  1671.             local left,top,right,bottom = onehack.coordinates(ply)
  1672.  
  1673.             local dist = ply:GetPos():Distance(LocalPlayer():GetPos())
  1674.  
  1675.             if ply ~= LocalPlayer() and not (ply:IsDormant() and not onehack.vars['ESP_PLAYER_DORMANT_VISIBLE']) and ((onehack.IsVisible(LocalPlayer(),ply) and onehack.vars['ESP_PLAYER_ONLY_VISIBLE']) or not onehack.vars['ESP_PLAYER_ONLY_VISIBLE']) and ply:Alive() then
  1676.  
  1677.                 if left ~= 0 and right ~= 0 and top ~= 0 and bottom ~= 0 then
  1678.  
  1679.                     if onehack.vars['ESP_PLAYER_BOX'] then
  1680.                         surface.SetDrawColor(onehack.vars['COLOR_ESP_PLAYER_BOXES'])
  1681.                         surface.DrawLine( left, top, right, top )
  1682.                         surface.DrawLine( left, top, left, bottom )
  1683.                         surface.DrawLine( right, top,  right, bottom )
  1684.                         surface.DrawLine( left, bottom, right, bottom )
  1685.        
  1686.                         surface.SetDrawColor(Color(0,0,0))
  1687.                         surface.DrawLine( left-1, top-1, right+1, top-1 )
  1688.                         surface.DrawLine( left-1, top-1, left-1, bottom+1 )
  1689.                         surface.DrawLine( right+1, top-1, right+1, bottom+1 )
  1690.                         surface.DrawLine( left-1, bottom+1, right+1, bottom+1 )
  1691.        
  1692.                         surface.SetDrawColor(Color(0,0,0))
  1693.                         surface.DrawLine( left+1, top+1, right-1, top+1 )
  1694.                         surface.DrawLine( left+1, top+1, left+1, bottom-1 )
  1695.                         surface.DrawLine( right-1, top+1, right-1, bottom-1 )
  1696.                         surface.DrawLine( left+1, bottom-1, right-1, bottom-1 )
  1697.                     end
  1698.  
  1699.  
  1700.                     if onehack.vars['ESP_PLAYER_HP_BOX'] then
  1701.                         local height = bottom - top - 1
  1702.                         local hp = math.min(ply:Health(), 100)
  1703.  
  1704.                         onehack.InfoBoxes( 0,"", left - 8, bottom - height - 2,left - 2, bottom,0,0,0,255 )
  1705.                         onehack.InfoBoxes( 0,"", left - 7, bottom - height - 1,left - 3, bottom-1,0,200,0,30 )
  1706.                         if onehack.vars['ESP_PLAYER_HP_NUMBERS'] then
  1707.                             onehack.InfoBoxes( 0,ply:Health().."%", left - 7, bottom - (hp / 100) * height - 1,left - 3, bottom-1,255 - (hp*2.55),hp * 2.55,0,255 )
  1708.                         else
  1709.                             onehack.InfoBoxes( 0,"", left - 7, bottom - (hp / 100) * height - 1,left - 3, bottom-1,255 - (hp*2.55),hp * 2.55,0,255 )
  1710.                         end
  1711.                     end
  1712.  
  1713.                     if onehack.vars['ESP_PLAYER_ARMOR_BOX'] then
  1714.                         local height = bottom - top - 1
  1715.                         local ar = math.min(ply:Armor(), 100)
  1716.  
  1717.                         onehack.InfoBoxes( 0,"", left - 15, bottom - height - 2,left - 10, bottom,0,0,0,255 )
  1718.                         onehack.InfoBoxes( 0,"", left - 14, bottom - height - 1,left - 11, bottom-1,19-20,136-20,191-20,100 )
  1719.                         if onehack.vars['ESP_PLAYER_ARMOR_NUMBERS'] then
  1720.                             onehack.InfoBoxes( 2,ply:Armor().."%", left - 14, bottom - (ar / 100) * height - 1,left - 11, bottom-1,19,136,191,255 )
  1721.                         else
  1722.                             onehack.InfoBoxes( 2,"", left - 14, bottom - (ar / 100) * height - 1,left - 11, bottom-1,19,136,191,255 )
  1723.                         end
  1724.                     end
  1725.  
  1726.                     if onehack.vars['ESP_PLAYER_WEAPON_NAME'] and ply:GetActiveWeapon():IsValid() then
  1727.                         draw.SimpleTextOutlined(ply:GetActiveWeapon():GetPrintName() or ply:GetActiveWeapon():GetClass(),"onehack.font.18",left + (right - left) / 2, bottom + 10,onehack.vars['COLOR_ESP_PLAYER_WEAPON_NAME'],1,1,1,Color(0,0,0))
  1728.                     end
  1729.  
  1730.                     if onehack.vars['ESP_PLAYER_NAME'] then
  1731.                         draw.SimpleTextOutlined(ply:Name(),"onehack.font.18",left + (right - left) / 2, top - 10,onehack.vars['COLOR_ESP_PLAYER_NAME'],1,1,1,Color(0,0,0))
  1732.                     end
  1733.  
  1734.                     local tabber = 0
  1735.  
  1736.                     if onehack.vars['ESP_PLAYER_USERGROUP'] then
  1737.                         draw.SimpleTextOutlined(ply:GetUserGroup(),"onehack.font.18",right + 5, top,onehack.vars['COLOR_ESP_PLAYER_USERGROUP'],0,0,1,Color(0,0,0))
  1738.                         tabber = tabber + 20
  1739.                     end
  1740.  
  1741.                     if onehack.vars['ESP_PLAYER_TEAM'] then
  1742.                         draw.SimpleTextOutlined(team.GetName(ply:Team()),"onehack.font.18",right + 5, top+tabber,onehack.vars['COLOR_ESP_PLAYER_TEAM'],0,0,1,Color(0,0,0))
  1743.                         tabber = tabber + 20
  1744.                     end
  1745.  
  1746.                     if onehack.vars['ESP_PLAYER_DISTANCE'] then
  1747.                         draw.SimpleTextOutlined(math.Round(dist/10).."f","onehack.font.18",right + 5, top+tabber,onehack.vars['COLOR_ESP_PLAYER_DISTANCE'],0,0,1,Color(0,0,0))
  1748.                         tabber = tabber + 20
  1749.                     end
  1750.  
  1751.  
  1752.                     if onehack.vars['ESP_PLAYER_SKELETON'] and dist < 1400 then
  1753.                         local Bones = {}
  1754.                         local sBones = {
  1755.                         "ValveBiped.Bip01_Head1",
  1756.                         "ValveBiped.Bip01_Neck1",
  1757.                         "ValveBiped.Bip01_Spine4",
  1758.                         "ValveBiped.Bip01_Spine2",
  1759.                         "ValveBiped.Bip01_Spine1",
  1760.                         "ValveBiped.Bip01_Spine",
  1761.                         "ValveBiped.Bip01_Pelvis",
  1762.                         "ValveBiped.Bip01_R_UpperArm",
  1763.                         "ValveBiped.Bip01_R_Forearm",
  1764.                         "ValveBiped.Bip01_R_Hand",
  1765.                         "ValveBiped.Bip01_L_UpperArm",
  1766.                         "ValveBiped.Bip01_L_Forearm",
  1767.                         "ValveBiped.Bip01_L_Hand",
  1768.                         "ValveBiped.Bip01_R_Thigh",
  1769.                         "ValveBiped.Bip01_R_Calf",
  1770.                         "ValveBiped.Bip01_R_Foot",
  1771.                         "ValveBiped.Bip01_R_Toe0",
  1772.                         "ValveBiped.Bip01_L_Thigh",
  1773.                         "ValveBiped.Bip01_L_Calf",
  1774.                         "ValveBiped.Bip01_L_Foot",
  1775.                         "ValveBiped.Bip01_L_Toe0"
  1776.                         }
  1777.                         local Success = true
  1778.                         for k, v in pairs(sBones) do
  1779.                             if ply:LookupBone(v) != nil && ply:GetBonePosition(ply:LookupBone(v)) != nil then
  1780.                                 table.insert( Bones, ply:GetBonePosition(ply:LookupBone(v)):ToScreen() )
  1781.                             else
  1782.                                 Success = false
  1783.                             end
  1784.                         end
  1785.                         surface.SetDrawColor(onehack.vars['COLOR_ESP_PLAYER_SKELETON'])
  1786.                         surface.DrawLine( Bones[1].x, Bones[1].y, Bones[2].x, Bones[2].y )
  1787.                         surface.DrawLine( Bones[2].x, Bones[2].y, Bones[3].x, Bones[3].y )
  1788.                         surface.DrawLine( Bones[3].x, Bones[3].y, Bones[4].x, Bones[4].y )
  1789.                         surface.DrawLine( Bones[4].x, Bones[4].y, Bones[5].x, Bones[5].y )
  1790.                         surface.DrawLine( Bones[5].x, Bones[5].y, Bones[6].x, Bones[6].y )
  1791.                         surface.DrawLine( Bones[6].x, Bones[6].y, Bones[7].x, Bones[7].y )
  1792.  
  1793.                         //Legs
  1794.                         surface.DrawLine( Bones[7].x, Bones[7].y, Bones[14].x, Bones[14].y )
  1795.                         surface.DrawLine( Bones[14].x, Bones[14].y, Bones[15].x, Bones[15].y )
  1796.                         surface.DrawLine( Bones[15].x, Bones[15].y, Bones[16].x, Bones[16].y )
  1797.                         surface.DrawLine( Bones[16].x, Bones[16].y, Bones[17].x, Bones[17].y )
  1798.  
  1799.                         surface.DrawLine( Bones[7].x, Bones[7].y, Bones[18].x, Bones[18].y )
  1800.                         surface.DrawLine( Bones[18].x, Bones[18].y, Bones[19].x, Bones[19].y )
  1801.                         surface.DrawLine( Bones[19].x, Bones[19].y, Bones[20].x, Bones[20].y )
  1802.                         surface.DrawLine( Bones[20].x, Bones[20].y, Bones[21].x, Bones[21].y )
  1803.  
  1804.                         //Arms
  1805.                         surface.DrawLine( Bones[3].x, Bones[3].y, Bones[8].x, Bones[8].y )
  1806.                         surface.DrawLine( Bones[8].x, Bones[8].y, Bones[9].x, Bones[9].y )
  1807.                         surface.DrawLine( Bones[9].x, Bones[9].y, Bones[10].x, Bones[10].y )
  1808.  
  1809.                         surface.DrawLine( Bones[3].x, Bones[3].y, Bones[11].x, Bones[11].y )
  1810.                         surface.DrawLine( Bones[11].x, Bones[11].y, Bones[12].x, Bones[12].y )
  1811.                         surface.DrawLine( Bones[12].x, Bones[12].y, Bones[13].x, Bones[13].y )
  1812.                     end
  1813.  
  1814.                 end
  1815.  
  1816.             end
  1817.            
  1818.         end
  1819.     end
  1820.  
  1821.  
  1822.     if onehack.vars['ESP_PROPS_ENABLED'] then
  1823.  
  1824.         for _, prop in pairs( ents.FindByClass( "prop_*" ) ) do
  1825.  
  1826.             local left,top,right,bottom = onehack.coordinates(prop)
  1827.  
  1828.             local dist = prop:GetPos():Distance(LocalPlayer():GetPos())
  1829.  
  1830.             if left ~= 0 and right ~= 0 and top ~= 0 and bottom ~= 0 then
  1831.  
  1832.                 if onehack.vars['ESP_PROPS_BOX'] then
  1833.                     surface.SetDrawColor(onehack.vars['COLOR_ESP_PROPS_BOXES'])
  1834.                     surface.DrawLine( left, top, right, top )
  1835.                     surface.DrawLine( left, top, left, bottom )
  1836.                     surface.DrawLine( right, top,  right, bottom )
  1837.                     surface.DrawLine( left, bottom, right, bottom )
  1838.    
  1839.                     surface.SetDrawColor(Color(0,0,0))
  1840.                     surface.DrawLine( left-1, top-1, right+1, top-1 )
  1841.                     surface.DrawLine( left-1, top-1, left-1, bottom+1 )
  1842.                     surface.DrawLine( right+1, top-1, right+1, bottom+1 )
  1843.                     surface.DrawLine( left-1, bottom+1, right+1, bottom+1 )
  1844.    
  1845.                     surface.SetDrawColor(Color(0,0,0))
  1846.                     surface.DrawLine( left+1, top+1, right-1, top+1 )
  1847.                     surface.DrawLine( left+1, top+1, left+1, bottom-1 )
  1848.                     surface.DrawLine( right-1, top+1, right-1, bottom-1 )
  1849.                     surface.DrawLine( left+1, bottom-1, right-1, bottom-1 )
  1850.                 end
  1851.  
  1852.  
  1853.                 if onehack.vars['ESP_PROPS_HP_BOX'] then
  1854.                     local height = bottom - top - 1
  1855.                     local hp = math.min(prop:Health(), 100)
  1856.  
  1857.                     onehack.InfoBoxes( 0,"", left - 8, bottom - height - 2,left - 2, bottom,0,0,0,255 )
  1858.                     onehack.InfoBoxes( 0,"", left - 7, bottom - height - 1,left - 3, bottom-1,0,200,0,30 )
  1859.                     if onehack.vars['ESP_PROPS_HP_NUMBERS'] then
  1860.                         onehack.InfoBoxes( 0,prop:Health().."%", left - 7, bottom - (hp / 100) * height - 1,left - 3, bottom-1,255 - (hp*2.55),hp * 2.55,0,255 )
  1861.                     else
  1862.                         onehack.InfoBoxes( 0,"", left - 7, bottom - (hp / 100) * height - 1,left - 3, bottom-1,255 - (hp*2.55),hp * 2.55,0,255 )
  1863.                     end
  1864.                 end
  1865.  
  1866.                 if onehack.vars['ESP_PROPS_URL'] then
  1867.                     draw.SimpleTextOutlined(prop:GetModel(),"onehack.font.18",left + (right - left) / 2, bottom + 10,onehack.vars['COLOR_ESP_PROPS_URL'],1,1,1,Color(0,0,0))
  1868.                 end
  1869.  
  1870.                 if onehack.vars['ESP_PROPS_DISTANCE'] then
  1871.                     draw.SimpleTextOutlined(math.Round(dist/10).."f","onehack.font.18",left + (right - left) / 2, top - 10,onehack.vars['COLOR_ESP_PROPS_DISTANCE'],1,1,1,Color(0,0,0))
  1872.                 end
  1873.  
  1874.             end
  1875.  
  1876.         end
  1877.  
  1878.     end
  1879.  
  1880. end)
  1881. local mattable = {};
  1882. hook.Add("RenderScene", "onehack.WORLD", function()
  1883.  
  1884.     if onehack.vars['WORLD_ASUSWALLS'] and onehack.vars['WORLD_ENABLED'] then
  1885.         if (#mattable == 0) then
  1886.             for k,v in next, game.GetWorld():GetMaterials() do
  1887.                 mattable[#mattable + 1] = Material(v);
  1888.             end
  1889.         end
  1890.  
  1891.         for k,v in next, mattable do
  1892.             v:SetFloat("$alpha", (onehack.vars["WORLD_ASUSWALLS_NUMB"] or 1));
  1893.         end
  1894.     else
  1895.         if (#mattable == 0) then
  1896.             for k,v in next, game.GetWorld():GetMaterials() do
  1897.                 mattable[#mattable + 1] = Material(v);
  1898.             end
  1899.         end
  1900.  
  1901.         for k,v in next, mattable do
  1902.             v:SetFloat("$alpha", 1);
  1903.         end
  1904.     end
  1905.  
  1906. end)
  1907.  
  1908. hook.Add("CalcView", "onehack.Thirdperson", function(p, o, a, f)
  1909.     if onehack.vars['HUD_TPC'] and onehack.vars['HUD_ENABLED'] then
  1910.         local lang = LocalPlayer():EyeAngles()
  1911.         if onehack.vars['AIMBOT_LEGIT_SLIENT'] or onehack.vars['AIMBOT_ANTIAIM_ENABLED'] then
  1912.             lang = onehack.fakeangles
  1913.         end
  1914.         local tr = util.TraceLine( {
  1915.             start = o - lang:Forward() * 2,
  1916.             endpos = o - lang:Forward() * (onehack.vars['HUD_TPCDIST']*1000),
  1917.             filter = player.GetAll(),
  1918.             mask = MASK_SHOT
  1919.         } )
  1920.  
  1921.         return({
  1922.             angles = lang,
  1923.             origin = tr.HitPos + lang:Forward() * 20,
  1924.             fov = f,
  1925.         })
  1926.     end
  1927. end)
  1928.  
  1929. hook.Add("ShouldDrawLocalPlayer", "onehack.Thirdperson", function()
  1930.     return(onehack.vars['HUD_TPC'] and onehack.vars['HUD_ENABLED'] )
  1931. end)
  1932.  
  1933.  
  1934. local alpha = 0
  1935. local hight = 0
  1936. hook.Add('OnePaint','onehack.HUD',function()
  1937.    
  1938.    
  1939.     --draw.RoundedBox(5, 10, 10, 20, 20, bSendPacket and Color(0,255,0) or Color(255,0,0)) DEV
  1940.  
  1941.     if not onehack.vars['HUD_ENABLED'] then return end
  1942.  
  1943.     if onehack.vars['HUD_CROSSHAIR'] then
  1944.         local p = LocalPlayer():GetEyeTrace().HitPos:ToScreen()
  1945.         local x,y = p.x, p.y
  1946.         local active_weapon = LocalPlayer():GetActiveWeapon()
  1947.         if IsValid(active_weapon) then
  1948.             active_weapon = active_weapon:GetClass()
  1949.         end
  1950.         if LocalPlayer():IsValid() then
  1951.             surface.SetDrawColor( onehack.vars['COLOR_WORLD_CROSSHAIR'] )      
  1952.             local gap = (onehack.vars['HUD_CROSSHAIR_GRAP'] or 0.4) * 50
  1953.             local length = gap + (onehack.vars['HUD_CROSSHAIR_LENGHT'] or 0.4) * 50
  1954.             surface.DrawLine( x - length, y, x - gap, y )
  1955.             surface.DrawLine( x + length, y, x + gap, y )
  1956.             surface.DrawLine( x, y - length, x, y - gap )
  1957.             surface.DrawLine( x, y + length, x, y + gap )
  1958.         end
  1959.     end
  1960.  
  1961.     if onehack.vars['HUD_SNAPLINE'] and onehack.CurTarget then
  1962.  
  1963.         local pos = onehack.CurTarget:GetShootPos():ToScreen()
  1964.  
  1965.         if (math.abs(pos.x) < ScrW()*5 && math.abs(pos.y) < ScrH()*5) then
  1966.  
  1967.             draw.NoTexture()
  1968.             local offsetx, offsety = onehack.SnapRotate(pos.x, pos.y)
  1969.             surface.SetDrawColor(Color(0,0,0))
  1970.             surface.DrawLine( ScrW()/2-offsetx,  ScrH()/2-offsety, pos.x-offsetx, pos.y-offsety)
  1971.  
  1972.             surface.SetDrawColor(onehack.vars['COLOR_WORLD_SNAPLINE'])
  1973.             surface.DrawLine(ScrW()/2, ScrH()/2, pos.x, pos.y)
  1974.  
  1975.             surface.SetDrawColor(Color(0,0,0))
  1976.             surface.DrawLine( ScrW()/2+offsetx,  ScrH()/2+offsety, pos.x+offsetx, pos.y+offsety)
  1977.  
  1978.         end
  1979.  
  1980.     end
  1981.  
  1982.     if onehack.vars['HUD_VELOCITYFOV'] then
  1983.  
  1984.         onehack.FilledCircle(ScrW()/2, ScrH()/2,4624*onehack.vars['AIMBOT_LEGIT_FOV'], 50, onehack.vars['COLOR_WORLD_SPREADFOV'])
  1985.  
  1986.     end
  1987.  
  1988.     if onehack.vars['HUD_WATHERMARK'] then
  1989.         surface.SetFont("DermaDefault")
  1990.         local tw,th = surface.GetTextSize("OneHack.su | "..math.Round(1/FrameTime()).." FPS | "..LocalPlayer():Ping().." PING | "..os.date( "%H:%M:%S" , os.time() ).." | "..LocalPlayer():Name())
  1991.         tw = tw + 3
  1992.         onehack.DrawRect(5,5,10+tw,25,onehack.vars['COLOR_WORLD_WATHERMARK'])
  1993.         onehack.DrawRect(9,9,2+tw,17,onehack.vars['COLOR_WORLD_WATHERMARK'])
  1994.         onehack.DrawOutLinedRect(5,5,10+tw,25,Color(0,0,0,50))
  1995.         onehack.DrawOutLinedRect(9,9,2+tw,17,Color(0,0,0,50))
  1996.         draw.SimpleText("OneHack.su | "..math.Round(1/FrameTime()).." FPS | "..LocalPlayer():Ping().." PING | "..os.date( "%H:%M:%S" , os.time() ).." | "..LocalPlayer():Name(),"DermaDefault",13,11,Color(0,0,0))
  1997.         draw.SimpleText("OneHack.su | "..math.Round(1/FrameTime()).." FPS | "..LocalPlayer():Ping().." PING | "..os.date( "%H:%M:%S" , os.time() ).." | "..LocalPlayer():Name(),"DermaDefault",12,10,Color(255,255,255))
  1998.     end
  1999.  
  2000.  
  2001.     for k,v in next, onehack.HitTracers do
  2002.         if(v[3] <= 0) then
  2003.                 table.remove(onehack.HitTracers, k);
  2004.                 continue;
  2005.         end
  2006.         onehack.HitTracers[k][3] = onehack.HitTracers[k][3] - FrameTime();
  2007.         local pos1, pos2 = v[1], v[2];
  2008.  
  2009.         if onehack.vars['HUD_BULLETTRACE'] then
  2010.             cam.Start3D();
  2011.                     render.DrawLine(pos1, pos2, v[4], true);
  2012.             cam.End3D();
  2013.         end
  2014.  
  2015.         local p = pos1:ToScreen()
  2016.         local x,y = p.x, p.y
  2017.  
  2018.         if onehack.vars['HUD_HITMARKER'] then
  2019.             surface.SetDrawColor( onehack.vars['COLOR_WORLD_HITMARKER'] )      
  2020.             surface.DrawLine( x+10, y-10, x+3, y-3 )
  2021.             surface.DrawLine( x-10, y-10, x-3, y-3 )
  2022.  
  2023.             surface.DrawLine( x+10, y+10, x+3, y+3 )
  2024.             surface.DrawLine( x-10, y+10, x-3, y+3 )
  2025.         end
  2026.  
  2027.     end
  2028.  
  2029. end)
  2030.  
  2031. hook.Add("CalcView", "onehack.NoRecoil", function(vm)
  2032.     if not onehack.vars['HUD_ENABLED'] then return end
  2033.     if !LocalPlayer():IsValid() or !LocalPlayer():Alive() or LocalPlayer():GetViewEntity() != LocalPlayer() or LocalPlayer():InVehicle() then return end
  2034.     local tps = {}
  2035.     if onehack.vars['HUD_NOVISUALRECOIL'] then
  2036.         tps.angles = LocalPlayer():EyeAngles()
  2037.         return tps
  2038.     end
  2039. end)
  2040.  
  2041. onehack.AntiAimAngle = Angle(0,0,0)
  2042. onehack.AntiAimFakeAngle = Angle(0,0,0)
  2043. onehack.fakeModelChams = NULL
  2044. onehack.fakeAAModelChams = NULL
  2045. onehack.FakeLaggModelChams = NULL
  2046.  
  2047. local function CopyPoseParams(pEntityFrom, pEntityTo)
  2048.     for i = 0, pEntityFrom:GetNumPoseParameters() - 1 do
  2049.         local flMin, flMax = pEntityFrom:GetPoseParameterRange(i)
  2050.         local sPose = pEntityFrom:GetPoseParameterName(i)
  2051.         pEntityTo:SetPoseParameter(sPose, math.Remap(pEntityFrom:GetPoseParameter(sPose), 0, 1, flMin, flMax))
  2052.     end
  2053. end
  2054.  
  2055. function onehack.DrawFakeAngle()
  2056.     if(onehack.fakeModelChams == NULL) then
  2057.         onehack.fakeModelChams = ClientsideModel(LocalPlayer():GetModel(), 1)
  2058.         onehack.fakeModelChams.cs_filter = true
  2059.     end
  2060.     onehack.fakeModelChams:SetNoDraw(true)
  2061.     onehack.fakeModelChams:SetSequence(LocalPlayer():GetSequence())
  2062.     onehack.fakeModelChams:SetCycle(LocalPlayer():GetCycle())
  2063.        
  2064.     onehack.fakeModelChams:SetModel(LocalPlayer():GetModel())
  2065.     onehack.fakeModelChams:SetPos(LocalPlayer():GetPos())
  2066.        
  2067.     CopyPoseParams(LocalPlayer(), onehack.fakeModelChams)
  2068.  
  2069.     onehack.fakeModelChams:SetPoseParameter("aim_pitch", onehack.AntiAimAngle.x)
  2070.     onehack.fakeModelChams:SetPoseParameter("head_pitch", onehack.AntiAimAngle.x)
  2071.     onehack.fakeModelChams:SetPoseParameter("head_yaw", onehack.AntiAimAngle.y)
  2072.     onehack.fakeModelChams:SetPoseParameter("aim_yaw", onehack.AntiAimAngle.y)
  2073.        
  2074.     onehack.fakeModelChams:InvalidateBoneCache()
  2075.     onehack.fakeModelChams:SetRenderAngles(Angle(0, onehack.AntiAimAngle.y, 0))
  2076.     cam.Start3D()
  2077.         if(onehack.fakeModelChams:IsValid()) then
  2078.             render.SuppressEngineLighting(true)    
  2079.             onehack.fakeModelChams:SetRenderMode(RENDERMODE_TRANSALPHA)
  2080.             render.MaterialOverride(onehack.chamsHMaterialZ)
  2081.             render.SetColorModulation( onehack.vars['COLOR_CHAMS_PLAYER_REALAA'].r/255,onehack.vars['COLOR_CHAMS_PLAYER_REALAA'].g/255,onehack.vars['COLOR_CHAMS_PLAYER_REALAA'].b/255 )
  2082.  
  2083.             render.SetBlend(onehack.vars['COLOR_CHAMS_PLAYER_REALAA'].a/255)
  2084.  
  2085.             onehack.fakeModelChams:DrawModel()
  2086.  
  2087.             render.SetBlend(1)
  2088.  
  2089.             render.SetColorModulation( 1,1,1 )
  2090.  
  2091.             render.SuppressEngineLighting(false)
  2092.         end
  2093.     cam.End3D()
  2094. end
  2095.  
  2096. local alpha = 1;
  2097. local plus_or_minus = true;
  2098. function onehack.DrawFakeAAAngle()
  2099.     if(onehack.fakeAAModelChams == NULL) then
  2100.         onehack.fakeAAModelChams = ClientsideModel(LocalPlayer():GetModel(), 1)
  2101.         onehack.fakeAAModelChams.cs_filter = true
  2102.     end
  2103.     onehack.fakeAAModelChams:SetNoDraw(true)
  2104.     onehack.fakeAAModelChams:SetSequence(LocalPlayer():GetSequence())
  2105.     onehack.fakeAAModelChams:SetCycle(LocalPlayer():GetCycle())
  2106.        
  2107.     onehack.fakeAAModelChams:SetModel(LocalPlayer():GetModel())
  2108.     onehack.fakeAAModelChams:SetPos(LocalPlayer():GetPos())
  2109.        
  2110.     CopyPoseParams(LocalPlayer(),onehack.fakeAAModelChams)
  2111.  
  2112.     onehack.fakeAAModelChams:SetPoseParameter("aim_pitch", onehack.AntiAimFakeAngle.x)
  2113.     onehack.fakeAAModelChams:SetPoseParameter("head_yaw", onehack.AntiAimFakeAngle.y)
  2114.     onehack.fakeAAModelChams:SetPoseParameter("head_pitch", onehack.AntiAimFakeAngle.x)
  2115.     onehack.fakeAAModelChams:SetPoseParameter("aim_yaw", onehack.AntiAimFakeAngle.y)
  2116.        
  2117.     onehack.fakeAAModelChams:InvalidateBoneCache()
  2118.     onehack.fakeAAModelChams:SetRenderAngles(Angle(0, onehack.AntiAimFakeAngle.y, 0))
  2119.     cam.Start3D()
  2120.         if(onehack.fakeAAModelChams:IsValid()) then
  2121.             render.SuppressEngineLighting(true)    
  2122.             onehack.fakeAAModelChams:SetRenderMode(RENDERMODE_TRANSALPHA)
  2123.             render.MaterialOverride(onehack.chamsHMaterialZ)
  2124.             render.SetColorModulation( onehack.vars['COLOR_CHAMS_PLAYER_AA'].r/255,onehack.vars['COLOR_CHAMS_PLAYER_AA'].g/255,onehack.vars['COLOR_CHAMS_PLAYER_AA'].b/255 )
  2125.  
  2126.             if alpha <= 0 then
  2127.                 plus_or_minus = !plus_or_minus;
  2128.             elseif alpha >= 0.5 then
  2129.                 plus_or_minus = !plus_or_minus;
  2130.             end
  2131.             if plus_or_minus then
  2132.                 alpha = alpha - 0.005
  2133.             else
  2134.                 alpha = alpha + 0.005
  2135.             end
  2136.             alpha = math.Clamp(alpha, 0, 0.5);
  2137.    
  2138.             render.SetBlend(alpha)
  2139.  
  2140.             onehack.fakeAAModelChams:DrawModel()
  2141.  
  2142.             render.SetBlend(1)
  2143.  
  2144.             render.SetColorModulation( 1,1,1 )
  2145.  
  2146.             render.SuppressEngineLighting(false)
  2147.         end
  2148.     cam.End3D()
  2149. end
  2150.  
  2151. local alpha2 = 1;
  2152. local plus_or_minus2 = true;
  2153. function onehack.DrawFakeLagg()
  2154.     if(onehack.FakeLaggModelChams == NULL) then
  2155.         onehack.FakeLaggModelChams = ClientsideModel(LocalPlayer():GetModel(), 1)
  2156.         onehack.FakeLaggModelChams.cs_filter = true
  2157.     end
  2158.     onehack.FakeLaggModelChams:SetNoDraw(true)
  2159.     if bSendPacket then
  2160.         onehack.FakeLaggModelChams:SetSequence(LocalPlayer():GetSequence())
  2161.         onehack.FakeLaggModelChams:SetCycle(LocalPlayer():GetCycle())
  2162.        
  2163.         onehack.FakeLaggModelChams:SetModel(LocalPlayer():GetModel())
  2164.         onehack.FakeLaggModelChams:SetPos(LocalPlayer():GetPos())
  2165.        
  2166.         CopyPoseParams(LocalPlayer(),onehack.FakeLaggModelChams)
  2167.        
  2168.         onehack.FakeLaggModelChams:InvalidateBoneCache()
  2169.         onehack.FakeLaggModelChams:SetRenderAngles(Angle(0, LocalPlayer():GetAngles().y, 0))
  2170.     end
  2171.     cam.Start3D()
  2172.         if(onehack.FakeLaggModelChams:IsValid()) then
  2173.             render.SuppressEngineLighting(true)    
  2174.             onehack.FakeLaggModelChams:SetRenderMode(RENDERMODE_TRANSALPHA)
  2175.             render.MaterialOverride(onehack.chamsHMaterialZ)
  2176.             render.SetColorModulation( onehack.vars['COLOR_CHAMS_PLAYER_FAKE'].r/255,onehack.vars['COLOR_CHAMS_PLAYER_FAKE'].g/255,onehack.vars['COLOR_CHAMS_PLAYER_FAKE'].b/255)
  2177.  
  2178.             if alpha2 <= 0 then
  2179.                 plus_or_minus2 = !plus_or_minus2;
  2180.             elseif alpha2 >= 0.5 then
  2181.                 plus_or_minus2 = !plus_or_minus2;
  2182.             end
  2183.             if plus_or_minus2 then
  2184.                 alpha2 = alpha2 - 0.005
  2185.             else
  2186.                 alpha2 = alpha2 + 0.005
  2187.             end
  2188.             alpha2 = math.Clamp(alpha2, 0, 0.5);
  2189.    
  2190.             render.SetBlend(alpha2)
  2191.  
  2192.             onehack.FakeLaggModelChams:DrawModel()
  2193.  
  2194.             render.SetBlend(1)
  2195.  
  2196.             render.SetColorModulation( 1,1,1 )
  2197.  
  2198.             render.SuppressEngineLighting(false)
  2199.         end
  2200.     cam.End3D()
  2201. end
  2202.  
  2203. hook.Add('RenderScreenspaceEffects','onehack.Chams',function()
  2204.     if onehack.vars['AIMBOT_ANTIAIM_ENABLED'] then
  2205.         if onehack.vars['AIMBOT_ANTIAIM_AACHAMS'] and onehack.vars['HUD_TPC'] then
  2206.             onehack.DrawFakeAngle()
  2207.         end
  2208.         if onehack.vars['AIMBOT_ANTIAIM_FAKELAGG'] and onehack.vars['HUD_TPC'] and LocalPlayer():GetVelocity():Length() > 50 then
  2209.             onehack.DrawFakeLagg()
  2210.         end
  2211.         if onehack.vars['AIMBOT_ANTIAIM_FAACHAMS'] and onehack.vars['HUD_TPC'] then
  2212.             onehack.DrawFakeAAAngle()
  2213.         end
  2214.     end
  2215.     if(onehack.vars['CPLAYER_ENABLED']) then
  2216.         for k,v in pairs(player.GetAll()) do
  2217.             if (v == LocalPlayer() and onehack.vars['CPLAYER_SELFENABLED']) or v ~= LocalPlayer() then
  2218.                 if onehack.vars['CPLAYER_ENABLED_INVISIBLE'] then
  2219.                     onehack.Chams(v,true,onehack.vars['COLOR_CHAMS_PLAYER_INVISIBLE'])
  2220.                 end
  2221.                 if onehack.vars['CPLAYER_ENABLED_VISIBLE'] and ply:IsDormant() then
  2222.                     onehack.Chams(v,false,onehack.vars['COLOR_CHAMS_PLAYER_VISIBLE'])
  2223.                 end
  2224.             end
  2225.         end
  2226.     end
  2227.  
  2228.     if(onehack.vars['CPROPS_ENABLED']) then
  2229.         for k,v in pairs(ents.FindByClass( "prop_*" )) do
  2230.             if onehack.vars['CPROPS_ENABLED_INVISIBLE'] then
  2231.                 onehack.Chams(v,true,onehack.vars['COLOR_CHAMS_PROPS_INVISIBLE'])
  2232.             end
  2233.             if onehack.vars['CPROPS_ENABLED_VISIBLE'] then
  2234.                 onehack.Chams(v,false,onehack.vars['COLOR_CHAMS_PROPS_VISIBLE'])
  2235.             end
  2236.         end
  2237.     end
  2238.  
  2239. end)
  2240.  
  2241. hook.Add("PreDrawViewModel", "onehack.Chams", function(vm)
  2242.     if(onehack.vars['CPLAYER_HANDCHAMS'] and onehack.vars['CPLAYER_ENABLED']) then
  2243.         if(!vm) then return; end
  2244.         render.SetLightingMode(2);
  2245.         for k,v in next, vm:GetMaterials() do
  2246.             if(v:find("v_hands")) then
  2247.                 render.MaterialOverrideByIndex(k - 1, onehack.chamsHMaterialZ);
  2248.             else
  2249.                 render.MaterialOverrideByIndex(k - 1, CreateMaterial("ViewModel_1", "VertexLitGeneric", {
  2250.                     ["$basetexture"] = "models/debug/debugwhite",
  2251.                     ["$model"] = 1,
  2252.                     ["$ignorez"] = 0,
  2253.                     ["vertexcolor"] = 1,
  2254.                     ["$color2"] = "{"..onehack.vars['COLOR_CHAMS_HANDS'].r.." "..onehack.vars['COLOR_CHAMS_HANDS'].g.." "..onehack.vars['COLOR_CHAMS_HANDS'].b.."}"
  2255.                 })
  2256.                 )
  2257.             end
  2258.         end
  2259.     else
  2260.         if(!vm) then return; end
  2261.         render.SetLightingMode(0);
  2262.     end
  2263. end)
  2264.  
  2265. hook.Add("PostPlayerDraw", "onehack.ChamsFIX", function(vm)
  2266.     if(!vm) then return; end
  2267.     render.SetLightingMode(0)
  2268.     render.SuppressEngineLighting(false)
  2269. end)
  2270.  
  2271. hook.Add("PostDrawViewModel", "onehack.ChamsFIX", function(vm)
  2272.     if(!vm) then return; end
  2273.     render.SetLightingMode(0)
  2274.     for k,v in next, vm:GetMaterials() do
  2275.         render.MaterialOverrideByIndex(k - 1, nil)
  2276.     end
  2277. end)
  2278.  
  2279. hook.Add("Think",'onehack.DLights',function()
  2280.     if(!onehack.vars['GPLAYER_ENABLED']) then return end
  2281.     if onehack.vars['GPLAYER_DYNAMICLIGHT'] then
  2282.         for k,v in pairs(player.GetAll()) do
  2283.             if v:IsValid() and v:Alive() then
  2284.                 onehack.DynamicLights(v,onehack.vars['COLOR_LIGHT'])
  2285.             end
  2286.         end
  2287.     end
  2288.  
  2289. end)
  2290.  
  2291. hook.Add("PreDrawHalos",'onehack.Halos',function()
  2292.     if onehack.vars['GPLAYER_ENABLED_VISIBLE'] and onehack.vars['GPLAYER_ENABLED'] then
  2293.         halo.Add(player.GetAll(), onehack.vars['COLOR_GLOW_PLAYER'], 2, 2, 2, true, onehack.vars['GPLAYER_ENABLED_INVISIBLE'])
  2294.     end
  2295.  
  2296.     if onehack.vars['GPROPS_ENABLED_VISIBLE'] and onehack.vars['GPROPS_ENABLED'] then
  2297.         halo.Add(ents.FindByClass( "prop_*" ), onehack.vars['COLOR_GLOW_PROPS'], 2, 2, 2, true, onehack.vars['GPROPS_ENABLED_INVISIBLE'])
  2298.     end
  2299.  
  2300. end)
  2301.  
  2302.  
  2303. onehack.CurTarget = false
  2304.  
  2305. local function max(t, fn)
  2306.     if #t == 0 then return nil, nil end
  2307.     local key, value = 1, t[1]
  2308.     for i = 2, #t do
  2309.         if fn(value, t[i]) then
  2310.             key, value = i, t[i]
  2311.         end
  2312.     end
  2313.     return key, value
  2314. end
  2315.  
  2316. function onehack.AimTarget()
  2317.  
  2318.     local dist = 0
  2319.  
  2320.     if not onehack.CurTarget then
  2321.  
  2322.         for k,ply in pairs(player.GetAll()) do
  2323.  
  2324.             if onehack.Visible(ply) and onehack.InFOV(ply) and ply ~= LocalPlayer() and ( onehack.vars['AIMBOT_LEGIT_IGNORETEAM'] and ply:Team() ~= LocalPlayer():Team() or not onehack.vars['AIMBOT_LEGIT_IGNORETEAM'] ) and ( onehack.vars['AIMBOT_LEGIT_IGNOREADMINS'] and ply:IsAdmin() or not onehack.vars['AIMBOT_LEGIT_IGNOREADMINS'] ) and ( onehack.vars['AIMBOT_LEGIT_IGNORENOCLIP'] and ply:GetMoveType() ~= 8 or not onehack.vars['AIMBOT_LEGIT_IGNORENOCLIP'] ) then
  2325.  
  2326.                 if dist < ply:GetPos():Distance(LocalPlayer():GetPos()) then
  2327.  
  2328.                     dist = ply:GetPos():Distance(LocalPlayer():GetPos())
  2329.  
  2330.                     onehack.CurTarget = ply
  2331.  
  2332.                 end
  2333.  
  2334.             end
  2335.  
  2336.         end
  2337.  
  2338.     end
  2339.  
  2340.     if onehack.CurTarget and onehack.CurTarget:IsValid() and onehack.CurTarget:Alive() and onehack.Visible(onehack.CurTarget) and onehack.InFOV(onehack.CurTarget) then
  2341.         -- ya xui znaet
  2342.     else
  2343.         onehack.CurTarget = false
  2344.     end
  2345.  
  2346. end
  2347.  
  2348. local PrimeSala = {}
  2349.  
  2350. function onehack.AimBotLogic()
  2351.     if IsValid(onehack.CurTarget) and onehack.CurTarget:IsPlayer() and not onehack.InFOV(onehack.CurTarget) then
  2352.         onehack.CurTarget = false
  2353.     end
  2354.  
  2355.     if LocalPlayer():GetActiveWeapon():IsValid() and LocalPlayer():GetActiveWeapon().Primary then
  2356.         if not PrimeSala[LocalPlayer():GetActiveWeapon():GetClass()] then
  2357.             PrimeSala[LocalPlayer():GetActiveWeapon():GetClass()] = {
  2358.                 KickUp = LocalPlayer():GetActiveWeapon().Primary.KickUp,
  2359.                 KickDown = LocalPlayer():GetActiveWeapon().Primary.KickDown,
  2360.                 KickHorizontal = LocalPlayer():GetActiveWeapon().Primary.KickHorizontal,
  2361.                 Spread = LocalPlayer():GetActiveWeapon().Primary.Spread,
  2362.             }
  2363.         end
  2364.         if onehack.vars['AIMBOT_LEGIT_RECOIL'] then
  2365.             LocalPlayer():GetActiveWeapon().Primary.KickUp = 0
  2366.             LocalPlayer():GetActiveWeapon().Primary.KickDown = 0
  2367.             LocalPlayer():GetActiveWeapon().Primary.KickHorizontal = 0
  2368.         else
  2369.             LocalPlayer():GetActiveWeapon().Primary.KickUp = PrimeSala[LocalPlayer():GetActiveWeapon():GetClass()].KickUp
  2370.             LocalPlayer():GetActiveWeapon().Primary.KickDown = PrimeSala[LocalPlayer():GetActiveWeapon():GetClass()].KickDown
  2371.             LocalPlayer():GetActiveWeapon().Primary.KickHorizontal = PrimeSala[LocalPlayer():GetActiveWeapon():GetClass()].KickHorizontal
  2372.         end
  2373.  
  2374.         if onehack.vars['AIMBOT_LEGIT_SPREAD'] then
  2375.             LocalPlayer():GetActiveWeapon().Primary.Spread = 0
  2376.         else
  2377.             LocalPlayer():GetActiveWeapon().Primary.Spread = PrimeSala[LocalPlayer():GetActiveWeapon():GetClass()].Spread
  2378.         end
  2379.        
  2380.     end
  2381.  
  2382.     if onehack.vars['AIMBOT_LEGIT_ENABLED'] and onehack.vars['AIMBOT_LEGIT_SLIENT'] then
  2383.         onehack.AimTarget()
  2384.         local tg = onehack.CurTarget
  2385.         if tg and tg:GetFriendStatus()!="friend" then
  2386.             targetlerp2 = LocalPlayer():EyeAngles()
  2387.             local aids2 = onehack.PrepareForAStomping( tg ) - LocalPlayer():GetShootPos()
  2388.             aids2 = aids2:Angle()
  2389.             if onehack.vars['AIMBOT_LEGIT_SMOOTH'] > 0 then
  2390.                 targetlerp2 = LerpAngle(FrameTime() * ((1.1*10)-(onehack.vars['AIMBOT_LEGIT_SMOOTH']*10)), targetlerp2, aids2)
  2391.                 aids2 = targetlerp2
  2392.             end
  2393.             LocalPlayer():SetEyeAngles(aids2)
  2394.         end
  2395.     end
  2396.    
  2397. end
  2398.  
  2399. local emt = FindMetaTable("Entity");
  2400.  
  2401. local oFireBullets = oFireBullets || emt.FireBullets;
  2402. local cones = {};
  2403.  
  2404. function emt.FireBullets(ply, data)
  2405.     local wep = ply:GetActiveWeapon():GetClass();
  2406.     if (-data.Spread != cones[wep]) then
  2407.         cones[wep] = -data.Spread;
  2408.     end
  2409.     return oFireBullets(ply, data);
  2410. end
  2411.  
  2412. local function PredictSpread(cmd, ang)
  2413.     local wep = LocalPlayer():GetActiveWeapon();
  2414.     if (!IsValid(wep) || !cones[wep:GetClass()]) then return ang; end
  2415.     wep = wep:GetClass();
  2416.     local ang = (dickwrap.Predict(cmd, ang:Forward(), cones[wep])):Angle();
  2417.     ang.x, ang.y = math.NormalizeAngle(ang.x), math.NormalizeAngle(ang.y);
  2418.     return ang;
  2419. end
  2420.  
  2421. local waitoiiiinsdf = CurTime()
  2422. function onehack.AutoFire(cmd)
  2423.     local target = LocalPlayer():GetEyeTrace().Entity
  2424.     if target and target:IsValid() and target:IsPlayer() and (onehack.vars['TRIGGER_ENABLED'] or onehack.vars['AIMBOT_LEGIT_AUTOSHOT']) then
  2425.         cmd:SetButtons(bit.bor(cmd:GetButtons(), 1))
  2426.     end
  2427.     local target2 = onehack.CurTarget
  2428.     if target2 and target2:IsValid() and target2:IsPlayer() and onehack.vars['AIMBOT_LEGIT_AUTOSHOT'] then
  2429.         cmd:SetButtons(bit.bor(cmd:GetButtons(), 1))
  2430.     end
  2431. end
  2432.  
  2433. hook.Add("CreateMove", "onehack.Trigger", onehack.AutoFire)
  2434. hook.Add("Think","onehack.AimbotL",onehack.AimBotLogic)
  2435.  
  2436. local real_switch = 0
  2437. local real_plus = true
  2438. local fake_switch = 0
  2439. local fake_plus = true
  2440. bSendPacket = true
  2441. onehack.fakeangles = Angle(0,0,0)
  2442. function onehack.AntiAim(cmd)
  2443.     if not onehack.CurTarget then
  2444.         if real_switch <= -(onehack.vars['AIMBOT_ANTIAIM_SWITCHRANGE']*100) then
  2445.             real_plus = !real_plus;
  2446.         elseif real_switch >= onehack.vars['AIMBOT_ANTIAIM_SWITCHRANGE']*010 then
  2447.             real_plus = !real_plus;
  2448.         end
  2449.         if real_plus then
  2450.             real_switch = real_switch + onehack.vars['AIMBOT_ANTIAIM_SWITCHSPEED'] * 100
  2451.         else
  2452.             real_switch = real_switch - onehack.vars['AIMBOT_ANTIAIM_SWITCHSPEED'] * 100
  2453.         end
  2454.  
  2455.         if fake_switch <= -(onehack.vars['AIMBOT_ANTIAIM_SWITCHRANGE']*100) then
  2456.             fake_plus = !fake_plus;
  2457.         elseif fake_switch >= onehack.vars['AIMBOT_ANTIAIM_SWITCHRANGE']*100 then
  2458.             fake_plus = !fake_plus;
  2459.         end
  2460.         if fake_plus then
  2461.             fake_switch = fake_switch + onehack.vars['AIMBOT_ANTIAIM_FAKE_SWITCHSPEED'] * 100
  2462.         else
  2463.             fake_switch = fake_switch - onehack.vars['AIMBOT_ANTIAIM_FAKE_SWITCHSPEED']* 100
  2464.         end
  2465.  
  2466.         local yaw = 0
  2467.         local pich = 0
  2468.  
  2469.         local fakeyaw = 0
  2470.         local fakepich = 0
  2471.  
  2472.         if onehack.vars['AIMBOT_ANTIAIM_PICH'] == "Jitter" then
  2473.             pich = math.random(-60, 60)
  2474.         elseif onehack.vars['AIMBOT_ANTIAIM_PICH'] == "Switch" then
  2475.             pich = pich + anglex/2
  2476.         elseif onehack.vars['AIMBOT_ANTIAIM_PICH'] == "Down" then
  2477.             pich = 80
  2478.         elseif onehack.vars['AIMBOT_ANTIAIM_PICH'] == "Up" then
  2479.             pich = -80
  2480.         elseif onehack.vars['AIMBOT_ANTIAIM_PICH'] == "Disabled" then
  2481.             pich = onehack.fakeangles.x
  2482.         end
  2483.  
  2484.         if onehack.vars['AIMBOT_ANTIAIM_YAW'] == "Jitter" then
  2485.             yaw = math.random(-60, 60)
  2486.         elseif onehack.vars['AIMBOT_ANTIAIM_YAW'] == "Switch" then
  2487.             yaw = yaw + real_switch
  2488.         elseif onehack.vars['AIMBOT_ANTIAIM_YAW'] == "Backward" then
  2489.             yaw = onehack.fakeangles.y-180
  2490.         elseif onehack.vars['AIMBOT_ANTIAIM_YAW'] == "180" then
  2491.             yaw = onehack.fakeangles.y
  2492.         elseif onehack.vars['AIMBOT_ANTIAIM_YAW'] == "Switch + Backward" then
  2493.             yaw = onehack.fakeangles.y-180 + real_switch
  2494.         elseif onehack.vars['AIMBOT_ANTIAIM_YAW'] == "Switch + 180" then
  2495.             yaw = onehack.fakeangles.y + real_switch
  2496.         elseif onehack.vars['AIMBOT_ANTIAIM_YAW'] == "Disabled" then
  2497.             yaw = onehack.fakeangles.y
  2498.         end
  2499. --------------------------------------------------------------------------------------
  2500.         if onehack.vars['AIMBOT_ANTIAIM_FAKE_PICH'] == "Jitter" then
  2501.             fakepich = math.random(-60, 60)
  2502.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_PICH'] == "Switch" then
  2503.             fakepich = fakepich + anglex/2
  2504.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_PICH'] == "Down" then
  2505.             fakepich = 80
  2506.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_PICH'] == "Up" then
  2507.             fakepich = -80
  2508.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_PICH'] == "Disabled" then
  2509.             fakepich = onehack.fakeangles.x
  2510.         end
  2511.  
  2512.         if onehack.vars['AIMBOT_ANTIAIM_FAKE_YAW'] == "Jitter" then
  2513.             fakeyaw = math.random(-60, 60)
  2514.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_YAW'] == "Switch" then
  2515.             fakeyaw = fakeyaw + fake_switch
  2516.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_YAW'] == "Backward" then
  2517.             fakeyaw = onehack.fakeangles.y-180
  2518.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_YAW'] == "180" then
  2519.             fakeyaw = onehack.fakeangles.y
  2520.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_YAW'] == "Switch + Backward" then
  2521.             fakeyaw = onehack.fakeangles.y-180 + fake_switch
  2522.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_YAW'] == "Switch + 180" then
  2523.             fakeyaw = onehack.fakeangles.y + fake_switch
  2524.         elseif onehack.vars['AIMBOT_ANTIAIM_FAKE_YAW'] == "Disabled" then
  2525.             fakeyaw = onehack.fakeangles.y
  2526.         end
  2527.  
  2528.         if !bSendPacket then
  2529.             cmd:SetViewAngles(Angle(pich,yaw,0))
  2530.             onehack.AntiAimAngle = cmd:GetViewAngles()
  2531.         elseif bSendPacket then
  2532.             if onehack.vars['AIMBOT_ANTIAIM_FAKE_ENABLED'] then
  2533.                 cmd:SetViewAngles(Angle(fakepich,fakeyaw,0))
  2534.                 onehack.AntiAimFakeAngle = cmd:GetViewAngles()
  2535.             end
  2536.         end
  2537.        
  2538.     end
  2539. end
  2540. onehack.finishload = true
RAW Paste Data