viewing paste Unknown #258 | Plain text

Posted on the
  1. local SB = {
  2.  
  3. 	Filenames = {
  4.  
  5. 		"cstrike\\lua\\SBot.log", 	-- Log file
  6. 		"cstrike\\lua\\SBot.cfg"	-- Config file
  7.  
  8. 	},
  9.  
  10. 	Information = {
  11.  
  12. 		Name = "SteveBot",
  13. 		Version = "5.0",
  14. 		PrintColor = { 255, 0, 0, 255 },
  15. 		PrintColor2 = { 0, 255, 255, 255 },
  16. 		Log = true,
  17. 		PrintLogInfo = true
  18.  
  19. 	},
  20.  
  21. 	-- If you have a weapon from this list, the aimbot and triggerbot wont shoot/aim (if weapon checking is enabled).
  22. 	BannedWeapons = {
  23.  
  24. 		"weapon_flashbang", 
  25. 		"weapon_smokegrenade", 
  26. 		"weapon_c4", 
  27. 		"weapon_hegrenade",
  28. 		"weapon_knife"
  29.  
  30. 	},
  31.  
  32. 	DefaultSettings = {
  33.  
  34. 		-- Aimbot
  35. 		["Aimbot"] = true,
  36. 		["AimbotDelay"] = 5,
  37. 		["AimbotHold"] = 25,
  38. 		["AimbotAutoShoot"] = false,
  39. 		["AimbotAutoShootDelay"] = 15,
  40. 		["AimbotMode"] = 1,
  41. 		["AimbotFovX"] = 100,
  42. 		["AimbotFovY"] = 100,
  43. 		["AimbotAimOnce"] = 1,
  44. 		["AimbotFriendlyFire"] = false,
  45. 		["AimbotKey"] = 1,
  46. 		["AimbotMousefix"] = 1,
  47. 		["AimbotMousefixSleep"] = 15,
  48. 		["AimbotHitboxPos"] = 12,
  49.  
  50. 		-- Triggerbot
  51. 		["Triggerbot"] = true,
  52. 		["TriggerbotAim"] = false,
  53. 		["TriggerbotMousefix"] = false,
  54. 		["TriggerbotMousefixSleep"] = 15,
  55. 		["TriggerbotHold"] = 25,
  56. 		["TriggerbotDelay"] = 0,
  57. 		["TriggerbotKey"] = 5,
  58. 		["TriggerbotFriendlyFire"] = false,
  59. 		["TriggerbotMode"] = 0,
  60. 		["TriggerbotFovX"] = 7,
  61. 		["TriggerbotFovY"] = 27,
  62. 		["TriggerbotHitboxPos"] = 12,
  63.  
  64. 		-- Autopistol
  65. 		["Autopistol"] = true,
  66. 		["AutopistolKey"] = 1,
  67. 		["AutopistolHold"] = 20,
  68.  
  69. 		-- AntiRecoil
  70. 		["AntiRecoil"] = true,
  71. 		["AntiRecoilKey"] = 1,
  72. 		["AntiRecoilExtraAimDown"] = 0.0,
  73.  
  74. 		-- Bunnyhop
  75. 		["Bunnyhop"] = true,
  76. 		["BunnyhopKey"] = 32,
  77.  
  78. 		-- EnemyDown
  79. 		["EnemyDown"] = false,
  80. 		["EnemyDownDelay"] = 30,
  81.  
  82. 		-- Knifebot
  83. 		["Knifebot"] = true,
  84. 		["KnifebotKey"] = 6,
  85.  
  86. 		-- AntiAim
  87. 		["AntiAim"] = false,
  88. 		["AntiAimDelay"] = 20,
  89.  
  90. 		-- Speedhack
  91. 		["Speedhack"] = true,
  92. 		["SpeedhackKey"] = 69,
  93. 		["SpeedhackSpeed"] = 20,
  94.  
  95. 		-- Misc
  96. 		["WeaponCheck"] = false,
  97. 		--["WeaponCheckDelay"] = 0,
  98. 		["AntiSmoke"] = true,
  99. 		["AntiFlash"] = true,
  100. 		["NoHands"] = true,
  101. 		["PlayerChams"] = true
  102.  
  103. 	},
  104.  
  105. 	SettingsPrefix = "sbot_"
  106.  
  107. }
  108.  
  109. -- We want to speed up things.
  110. local pairs = pairs
  111. local ipairs = ipairs
  112. local setmetatable = setmetatable
  113. local getmetatable = getmetatable
  114. local tonumber = tonumber
  115. local tostring = tostring
  116. local error = error
  117. local pcall = pcall
  118. local xpcall = xpcall
  119. local collectgarbage = collectgarbage
  120. local unpack = unpack
  121. local type = type
  122. local print = print
  123.  
  124. local math = math
  125. local string = string
  126. local table = table
  127. local coroutine = coroutine
  128.  
  129. local getCVar = getCVar
  130. local setCVar = setCVar
  131. local existsCVar = existsCVar
  132. local renameCVar = renameCVar
  133. local removeFlags = removeFlags
  134. local setMinValue = setMinValue
  135. local setMaxValue = setMaxValue
  136. local wait = wait
  137. local getMyIndex = getMyIndex
  138. local isCrouched = isCrouched
  139. local onGround = onGround
  140. local inWater = inWater
  141. local getPos = getPos
  142. local getAng = getAng
  143. local getEyePos = getEyePos
  144. local getHitboxPos = getHitboxPos
  145. local getTeam = getTeam
  146. local isEnemy = isEnemy
  147. local isAlive = isAlive
  148. local getName = getName
  149. local getDistance = getDistance
  150. local isVisible = isVisible
  151. local aimTarget = aimTarget
  152. local isPlayer = isPlayer
  153. local isBot = isBot
  154. local isConnected = isConnected
  155. local getBindForKey = getBindForKey
  156. local getKeyForBind = getKeyForBind
  157. local getWeaponID = getWeaponID
  158. local getAppID = getAppID
  159. local getGameDir = getGameDir
  160.  
  161. -- 	###################################
  162. -- 	#######	     PRINTING  	    #######
  163. -- 	###################################
  164. local oldprint = print
  165.  
  166. function print(str)
  167. 	oldprint("[" .. SB.Information.Name .. " v" .. SB.Information.Version .. "]: ", SB.Information.PrintColor[1], SB.Information.PrintColor[2], SB.Information.PrintColor[3], SB.Information.PrintColor[4])
  168. 	oldprint(str, SB.Information.PrintColor2[1], SB.Information.PrintColor2[2], SB.Information.PrintColor2[3], SB.Information.PrintColor2[4])
  169. end
  170.  
  171. -- 	###################################
  172. -- 	#######	    ANTI-LEAK  	    #######
  173. -- 	###################################
  174. do
  175. 	local RegisteredUsers = { "stenox123456789" }
  176. 	local GameDir = getGameDir()
  177. 	local CanUse = false
  178.  
  179. 	for k, v in pairs(RegisteredUsers) do
  180. 		if GameDir:find(v) then
  181. 			CanUse = true
  182. 		end
  183. 	end
  184.  
  185. 	if not CanUse then
  186. 		print("Logged that someone wanted to leak my cheat, no more cheats will come.\n")
  187.  
  188. 		os.remove("cstrike\\lua\\" .. arg[2] .. ".lua")
  189.  
  190. 		return
  191. 	end
  192. end
  193.  
  194. -- 	###################################
  195. -- 	#######	      CHECKS  	    #######
  196. -- 	###################################
  197. if existsCVar("_menuopen") then
  198. 	if getCVar("_menuopen") == "1" then
  199. 		print("Script has been loaded already!\n")
  200.  
  201. 		return
  202. 	end
  203. else
  204. 	createCVar("_menuopen", 0)
  205. end
  206.  
  207. -- 	###################################
  208. -- 	#######	      MENU  	    #######
  209. -- 	###################################
  210. Menu = {
  211.  
  212.     defaultMenuColor = { 255, 255, 255 }, -- color to draw all the submenus that are not selected with
  213.     selectedMenuColor = { 100, 255, 255 }, --  color to draw currently selected menu with
  214.     defaultOpenState = false, -- whenever submenu is created, should it's open state be false or true if no open parameter was given
  215.     firstDrawLine = 20, -- line to start drawing menu from
  216.     subMenus = {},
  217.     open = true
  218.  
  219. }
  220.  
  221. function Menu:new(label, action, open)
  222.     local inst = {
  223.         parent = self,
  224.         label = label,
  225.         action = action,
  226.         open = open or self.defaultOpenState,
  227.         selected = false
  228.     }
  229.     if not self.metatable then
  230.         self.metatable = { __index = self }
  231.     end
  232.     setmetatable( inst, self.metatable )
  233.     if rawget( self, "subMenus" ) then
  234.         table.insert( self.subMenus, inst )
  235.     else
  236.         self.subMenus = { inst }
  237.     end
  238.     return inst
  239. end
  240.  
  241. function Menu:setSettings(settings)
  242.     for k, v in pairs(settings) do
  243.         self[k] = v
  244.     end
  245. end
  246.  
  247. function Menu:hasAvailableSubMenus()
  248.     if rawget( self, "subMenus" ) and rawget( self, "open" ) then
  249.         return true
  250.     else
  251.         return false
  252.     end
  253. end
  254.  
  255. function Menu:getSelectedMenu()
  256.     if self.selected then
  257.         return self
  258.     elseif self:hasAvailableSubMenus() then
  259.         for k, v in ipairs( self.subMenus ) do
  260.             local result = v:getSelectedMenu()
  261.             if result then
  262.                 return result
  263.             end
  264.         end
  265.     end
  266. end
  267.  
  268. function Menu:getChildIndex()
  269.     for k, v in ipairs( self.parent.subMenus ) do
  270.         if v == self then
  271.             return k
  272.         end
  273.     end
  274. end
  275.  
  276. function Menu:getNextSibling()
  277.     if self:getChildIndex() < #self.parent.subMenus then
  278.         return self.parent.subMenus[ self:getChildIndex() + 1 ]
  279.     else
  280.         return self
  281.     end
  282. end
  283.  
  284. function Menu:getPreviousSibling()
  285.     if self:getChildIndex() > 1 then
  286.         return self.parent.subMenus[ self:getChildIndex() - 1 ]
  287.     else
  288.         return self
  289.     end
  290. end
  291.  
  292. function Menu:getLastMenuInDescendingOrder()
  293.     if self:hasAvailableSubMenus() then
  294.         return self.subMenus[ #self.subMenus ]:getLastMenuInDescendingOrder()
  295.     else
  296.         return self
  297.     end
  298. end
  299.  
  300. function Menu:getFirstMenuWithYoungerSiblingsInAscendingOrder()
  301.     if self.parent.open then
  302.         if self:getChildIndex() < #self.parent.subMenus then
  303.             return self
  304.         elseif self.parent == Menu then
  305.             return Menu.subMenus[ 1 ]
  306.         else
  307.             return self.parent:getFirstMenuWithYoungerSiblingsInAscendingOrder()
  308.         end
  309.     else
  310.         return self
  311.     end
  312. end
  313.  
  314. function Menu:getPreviousMenu()
  315.     if self:getChildIndex() == 1 then
  316.         if self.parent.open then
  317.             if self.parent == Menu then
  318.                 return Menu:getLastMenuInDescendingOrder()
  319.             else
  320.                 return self.parent
  321.             end
  322.         else
  323.             return self:getLastMenuInDescendingOrder()
  324.         end
  325.     else
  326.         if self.parent.open then
  327.             return self:getPreviousSibling():getLastMenuInDescendingOrder()
  328.         else
  329.             return self:getLastMenuInDescendingOrder()
  330.         end
  331.     end
  332. end
  333.  
  334. function Menu:getNextMenu()
  335.     if self:hasAvailableSubMenus() then
  336.         return self.subMenus[ 1 ]
  337.     elseif self:getChildIndex() < #self.parent.subMenus then
  338.         return self:getNextSibling()
  339.     else -- if it's last child
  340.         return self:getFirstMenuWithYoungerSiblingsInAscendingOrder()
  341.     end
  342. end
  343.  
  344. function Menu:getDrawColor()
  345.     if rawget( self, "selected" ) then
  346.         return self.selectedMenuColor[ 1 ], self.selectedMenuColor[ 2 ], self.selectedMenuColor[ 3 ]
  347.     else
  348.         return self.defaultMenuColor[ 1 ], self.defaultMenuColor[ 2 ], self.defaultMenuColor[ 3 ]
  349.     end
  350. end
  351.  
  352. function Menu:getDirectoryMark()
  353.     if rawget( self, "subMenus" ) then
  354.         if self.open then
  355.             return "[-]"
  356.         else
  357.             return "[+]"
  358.         end
  359.     else
  360.         return ""
  361.     end
  362. end
  363.  
  364. function Menu:draw(indent, firstDrawLine)
  365.     local line = firstDrawLine or { 20 }
  366.     local indent = indent or 0
  367.     if self.label then
  368.         con_nxprintf( line[ 1 ], self.label .. self:getDirectoryMark() .. string.rep( "     ", indent ), 999999, self:getDrawColor() )
  369.         line[ 1 ] = line[ 1 ] + 1
  370.     end
  371.     if self:hasAvailableSubMenus() then
  372.         for k, v in ipairs( self.subMenus ) do
  373.             v:draw( indent + 1, line )
  374.         end
  375.     end
  376. end
  377.  
  378. function Menu.clear()
  379.     for i = 0, 200 do
  380.         con_nxprintf( i, "", 0 )
  381.     end
  382. end
  383.  
  384. function Menu:execAction(action)
  385.     if action == "select" then
  386.         if self.action then
  387.             self.action()
  388.         else
  389.             self.open = not self.open
  390.         end
  391.     elseif action == "up" then
  392.         self.selected = false
  393.         self:getPreviousMenu().selected = true
  394.     elseif action == "down" then
  395.         self.selected = false
  396.         self:getNextMenu().selected = true
  397.     elseif action == "close" then
  398.         setCVar( "_menuopen", "0" )
  399.     end
  400. end
  401.  
  402. function Menu.initCVars()
  403.     if not existsCVar( "menu" ) then
  404.         createCVar( "menu", "", "Control Mahi's LSS menu template with values: up, down, select" )
  405.     else
  406.         setCVar( "menu", "" )
  407.     end
  408.     if not existsCVar( "_menuopen" ) then
  409.         createCVar( "_menuopen", "1" )
  410.     elseif getCVar( "_menuopen" ) ~= "0" then
  411.         error( "Menu error: Menu is already open!\n", 255, 100, 100 )
  412.     else
  413.         setCVar( "_menuopen", "1" )
  414.     end
  415. end
  416.  
  417. function Menu:exec()
  418.     Menu.initCVars()
  419.  
  420.     if not self:getSelectedMenu() then
  421.         if self == Menu then
  422.             self.subMenus[ 1 ].selected = true
  423.         else
  424.             self.selected = true
  425.         end
  426.     end
  427.  
  428.     if self.parent then self.parent.open = false end
  429.  
  430.     while getCVar("_menuopen") ~= "0" do
  431.         self:draw((self == Menu) and -1 or 0, { self.firstDrawLine })
  432.  
  433.         while getCVar("menu") == "" do 
  434. 			SB:UpdateLoops() 
  435. 			wait(0.1)
  436. 		end
  437.  
  438.         self:getSelectedMenu():execAction(getCVar("menu"))
  439.         setCVar("menu", "")
  440.         Menu:clear()
  441.     end
  442. end
  443.  
  444. -- 	###################################
  445. -- 	#######	   FILE-RELATED  	#######
  446. -- 	###################################
  447. do
  448. 	local function IsDir(self, path)
  449. 		return lfs.attributes(path, "mode") == "directory"
  450. 	end
  451.  
  452. 	local function IsFile(self, file)
  453. 		return lfs.attributes(file, "mode") == "file"
  454. 	end
  455.  
  456. 	local function Read(self, file, mode)
  457. 		if not self:IsFile(file) then return "" end
  458.  
  459. 		local mode = mode or "*all"
  460. 		local str = ""
  461. 		local f = io.open(file, "w")
  462.  
  463. 		if not f then return "" end
  464.  
  465. 		str = f:read(mode)
  466.  
  467. 		f:close()
  468.  
  469. 		return str
  470. 	end
  471.  
  472. 	local function Write(self, file, str)
  473. 		local str = str or ""
  474.  
  475. 		file = io.open(file, "w")
  476.  
  477. 		if not file then return end
  478.  
  479. 		file:write(str)
  480. 		file:close()
  481. 	end
  482.  
  483. 	local function Append(self, file, str)
  484. 		local content = self:ReadFile(file)
  485.  
  486. 		if not self:IsFile(file) then self:WriteFile(file) end
  487.  
  488. 		local f = io.open(file, "w")
  489.  
  490. 		f:write(content .. str)
  491. 		f:close()
  492. 	end
  493.  
  494. 	local function MakeDir(self, path)
  495. 		lfs.mkdir(path)
  496. 	end
  497.  
  498. 	local function Log(self, log, ...)
  499. 		log = string.format(log, ...)
  500.  
  501. 		if self.Information.PrintLogInfo then 
  502. 			if string.len(log) >= 1 then
  503. 				print(log .. "\n")
  504. 			else
  505. 				oldprint("\n")
  506. 			end
  507. 		end
  508.  
  509. 		if self.Information.Log then
  510. 			local file = self.Filenames[1]
  511.  
  512. 			if lfs.attributes(file, "mode") ~= "file" then
  513. 				io.output(file)
  514. 				io.write(log)
  515. 				io.close()
  516.  
  517. 				return
  518. 			end
  519.  
  520. 			local f = io.open(file, "rb")
  521. 			local str = f:read("*all")
  522.  
  523. 			f:close()
  524.  
  525. 			f2 = io.open(file, "w")
  526.  
  527. 			f2:write(str .."\n" .. log)
  528. 			f2:close()
  529. 		end
  530. 	end
  531.  
  532. 	SB.Log = Log
  533. 	SB.MakeDir = MakeDir
  534. 	SB.AppendFile = Append
  535. 	SB.WriteFile = Write
  536. 	SB.ReadFile = Read
  537. 	SB.IsFile = IsFile
  538. 	SB.IsDir = IsDir
  539. end
  540.  
  541. -- 	###################################
  542. -- 	#######	     LOOPS  	    #######
  543. -- 	###################################
  544. do
  545. 	local Registered = {}
  546. 	local Created = {}
  547. 	local End = false
  548. 	local HandleCommand = "Handle"
  549.  
  550. 	local function Prefix(self)
  551. 		return string.lower(self.SettingsPrefix or "")
  552. 	end
  553.  
  554. 	local function AddLoop(self, name, func)
  555. 		local name = string.lower(name)
  556.  
  557. 		if not Created[name] then
  558. 			Created[name] = true
  559.  
  560. 			table.insert(Registered, func)
  561.  
  562. 			self:Log("Created loop \"" .. name .. "\" with " .. tostring(func))
  563. 		end
  564. 	end
  565.  
  566. 	local function UpdateLoops(self)
  567. 		for key, value in pairs(Registered) do
  568. 			ok, err = pcall(value)
  569.  
  570. 			if not ok then
  571. 				error(err)
  572. 			elseif err then
  573. 				err()
  574. 			end
  575. 		end
  576.  
  577. 		wait(0.1)
  578.  
  579. 		collectgarbage()
  580. 	end
  581.  
  582. 	local function StartLoop(self)
  583. 		Menu:exec()
  584.  
  585. 		setCVar(Prefix(self) .. HandleCommand, "")
  586. 		setCVar(Prefix(self) .. "framerate", "0")
  587.  
  588. 		self:AntiAim("off", false)
  589. 		self:AntiSmoke("off", false)
  590. 		self:AntiFlash("off", false)
  591. 		self:PlayerChams("off", false)
  592. 		self:NoHands("off", false)
  593. 		self:AFKBot("off", false)
  594. 		self:SaveSettings()
  595.  
  596.  
  597. 		self:Log("")
  598. 		self:Log("")
  599. 		self:Log("%s Version %s unloaded @ %s - %s", self.Information.Name, self.Information.Version, os.date("%x"), os.date("%X"))
  600. 		self:Log("")
  601. 		self:Log("")
  602.  
  603. 		if not self.Information.PrintLogInfo then print("Successfully Unloaded!\n\n\n") end
  604. 	end
  605.  
  606. 	-- States
  607. 	--[[local State_HasBannedWeapon = 0
  608. 	local State_GetWeaponID = 0
  609. 	local State_GetWeaponSlot = 0
  610.  
  611. 	-- Enable(s)
  612. 	local HasBannedWeapon_Enable = true
  613. 	local GetWeaponID_Enable = true
  614. 	local GetWeaponSlot_Enable = true
  615.  
  616. 	-- Extra Functions
  617. 	local function GetAlives()
  618. 		local Count = 0
  619.  
  620. 		for i = 1, 64 do
  621. 			if isPlayer(i) and isAlive(i) then
  622. 				Count = Count + 1
  623. 			end
  624. 		end
  625.  
  626. 		return Count - 1
  627. 	end
  628.  
  629. 	-- Updates
  630. 	local function HasBannedWeapon_Update()
  631. 		if State_HasBannedWeapon == 0 then
  632. 			if GetAlives() < 1 then
  633. 				HasBannedWeapon_Enable = false
  634.  
  635. 				State_HasBannedWeapon = 1
  636. 			end
  637. 		else
  638. 			if GetAlives() > 1 then
  639. 				SB.Time = os.time()
  640.  
  641. 				HasBannedWeapon_Enable = true
  642.  
  643. 				State_HasBannedWeapon = 0
  644. 			end
  645. 		end
  646. 	end
  647.  
  648. 	local function GetWeaponID_Update()
  649. 		if State_GetWeaponID == 0 then
  650. 			if GetAlives() < 1 then
  651. 				HasBannedWeapon_Enable = false
  652.  
  653. 				HasBannedWeapon_State = 1
  654. 			end
  655. 		else
  656. 			if GetAlives() > 1 then
  657. 				SB.WeapTime = os.time()
  658.  
  659. 				GetWeaponID_Enable = true
  660.  
  661. 				HasBannedWeapon_State = 0
  662. 			end
  663. 		end
  664. 	end
  665.  
  666. 	local function GetWeaponSlot_Update()
  667. 		if State_GetWeaponSlot == 0 then
  668. 			if GetAlives() < 1 then
  669. 				GetWeaponSlot_Enable = false
  670.  
  671. 				GetWeaponSlot_State = 1
  672. 			end
  673. 		else
  674. 			if GetAlives() > 1 then
  675. 				SB.SlotTime = os.time()
  676.  
  677. 				GetWeaponSlot_Enable = true
  678.  
  679. 				GetWeaponSlot_State = 0
  680. 			end
  681. 		end
  682. 	end]]
  683.  
  684. 	-- Functions
  685. 	--[[local function GetWeaponSlot(self)
  686. 		if not self:Setting("weapon_check") then return 1337 end
  687.  
  688. 		local del = self:Setting("weapon_check_delay")
  689.  
  690. 		if not self.WeaponSlot then
  691. 			self.WeaponSlot = self:LocalPlayer():WeaponSlot()
  692.  
  693. 			self.SlotTime = os.time()
  694. 		else
  695. 			if os.time() - del > self.SlotTime then
  696. 				self.WeaponSlot = self:LocalPlayer():WeaponSlot()
  697.  
  698. 				self.SlotTime = os.time()
  699. 			end
  700. 		end
  701.  
  702. 		return self.WeaponSlot
  703. 	end
  704.  
  705. 	local function GetWeaponID(self)
  706. 		if not self:Setting("weapon_check") then return 73 end
  707.  
  708. 		local del = self:Setting("weapon_check_delay")
  709.  
  710. 		if not self.WeaponID then
  711. 			self.WeaponID = self:LocalPlayer():WeaponID()
  712.  
  713. 			self.WeapTime = os.time()
  714. 		else
  715. 			if os.time() - del > self.WeapTime then
  716. 				self.WeaponID = self:LocalPlayer():WeaponID()
  717.  
  718. 				self.WeapTime = os.time()
  719. 			end
  720. 		end
  721.  
  722. 		return self.WeaponID
  723. 	end
  724.  
  725. 	local function HasBannedWeapon(self)
  726. 		if not self:Setting("weapon_check") then return false end
  727.  
  728. 		local del = self:Setting("weapon_check_delay")
  729.  
  730. 		if not self.WeaponName then
  731. 			self.WeaponName = self:LocalPlayer():WeaponName()
  732.  
  733. 			self.Time = os.time()
  734. 		else
  735. 			if os.time() - del > self.Time then
  736. 				self.WeaponName = self:LocalPlayer():WeaponName()
  737.  
  738. 				self.Time = os.time()
  739. 			end
  740. 		end
  741.  
  742. 		for k, v in pairs(self.BannedWeapons) do
  743. 			if v == self.WeaponName then
  744. 				return true
  745. 			end
  746. 		end
  747.  
  748. 		return false
  749. 	end]]
  750.  
  751. 	local function HasBannedWeapon(self)
  752. 		if not self:Setting("weapon_check") then return false end
  753.  
  754. 		local WeaponName = self:LocalPlayer():WeaponName()
  755.  
  756. 		for k, v in pairs(self.BannedWeapons) do
  757. 			if v == WeaponName then
  758. 				return true
  759. 			end
  760. 		end
  761.  
  762. 		return false
  763. 	end
  764.  
  765. 	local function GetWeaponID(self)
  766. 		if not self:Setting("weapon_check") then return 1337 end
  767.  
  768. 		return self:LocalPlayer():WeaponID() or 1337
  769. 	end
  770.  
  771. 	local function GetWeaponSlot(self)
  772. 		if not self:Setting("weapon_check") then return 1337 end
  773.  
  774. 		return self:LocalPlayer():WeaponSlot() or 1337
  775. 	end
  776.  
  777. 	local function EndLoop(self)
  778. 		rawcmd("menu close\n")
  779. 	end
  780.  
  781. 	SB.Prefix = Prefix
  782. 	SB.EndLoop = EndLoop
  783. 	SB.StartLoop = StartLoop
  784. 	SB.AddLoop = AddLoop
  785. 	SB.HasBannedWeapon = HasBannedWeapon
  786. 	SB.GetWeaponSlot = GetWeaponSlot
  787. 	SB.GetWeaponID = GetWeaponID
  788. 	SB.UpdateLoops = UpdateLoops
  789.  
  790. 	--[[SB:AddLoop("Weapon Update", function()
  791. 		HasBannedWeapon_Update()
  792. 		GetWeaponID_Update()
  793. 		GetWeaponSlot_Update()
  794. 	end)]]
  795. end
  796.  
  797. -- 	###################################
  798. -- 	#######	    COMMANDS  	    #######
  799. -- 	###################################
  800. do
  801. 	local Registered = {}
  802. 	local RegisteredCommands = {}
  803. 	local Commands = {}
  804. 	local HandleCommand = "Handle"
  805.  
  806. 	local function Prefix(self)
  807. 		return string.lower(self.SettingsPrefix or "")
  808. 	end
  809.  
  810. 	local function AddCVar(command, set)
  811. 		local command = string.lower(command)
  812.  
  813. 		if not existsCVar(command) then
  814. 			--createCVar(command, set)
  815.  
  816. 			rawcmd("setinfo \"" .. command .. "\" \"" .. set .. "\"\n")
  817.  
  818. 			wait(10)
  819. 		else
  820. 			if getCVar(command) ~= set then
  821. 				setCVar(command, set)
  822. 			end
  823. 		end
  824. 	end
  825.  
  826. 	local function AddConCommand(self, command, func)
  827. 		if not command or not func then return end
  828.  
  829. 		local command = string.lower(command)
  830.  
  831. 		if not Commands[command] then
  832. 			Commands[command] = true
  833.  
  834. 			local Pre = Prefix(self)
  835. 			local Name = (not command:find("+") and Pre or "") .. command
  836.  
  837. 			AddCVar(Name, "")
  838.  
  839. 			rawcmd("alias \"" .. Name .. "\" \"" .. Pre .. HandleCommand .. " " .. command .. "\"\n")
  840.  
  841. 			table.insert(RegisteredCommands, { command, func })
  842. 		end
  843. 	end
  844.  
  845. 	local function AddChangeCallback(self, convar, callback)
  846. 		if not existsCVar(convar) or not callback then return end
  847.  
  848. 		convar = string.lower(convar)
  849.  
  850. 		if not Registered[convar] then
  851. 			Registered[convar] = {}
  852. 		end
  853.  
  854. 		table.insert(Registered[convar], callback)
  855.  
  856. 		if not Registered[convar].oldvar then
  857. 			Registered[convar].oldvar = getCVar(convar)
  858. 		end
  859.  
  860. 		if not Registered[convar].name then
  861. 			Registered[convar].name = convar
  862. 		end
  863. 	end
  864.  
  865. 	local function GetConVarCallbacks(self, convar)
  866. 		local t = {}
  867.  
  868. 		for _, value in pairs(Registered[convar]) do
  869. 			if type(value) == "function" then
  870. 				table.insert(t, value)
  871. 			end
  872. 		end
  873.  
  874. 		return t
  875. 	end
  876.  
  877. 	local function Update(self)
  878. 		local ok, err
  879.  
  880. 		for k, v in pairs(Registered) do
  881. 			if v.oldvar ~= getCVar(v.name) then
  882. 				local old = v.oldvar
  883.  
  884. 				v.oldvar = getCVar(v.name)
  885.  
  886. 				for key, value in pairs(v) do
  887. 					if type(value) == "function" then
  888. 						ok, err = pcall(value, v.oldvar, old)
  889.  
  890. 						if not ok then
  891. 							print(err .. "\n", 200, 50, 50, 255)
  892. 						elseif not err then
  893. 							value(v.oldvar, old)
  894. 						end
  895. 					end
  896. 				end
  897. 			end
  898. 		end
  899.  
  900. 		if getCVar(Prefix(self) .. HandleCommand) ~= "" then
  901. 			local Command = string.lower(getCVar(Prefix(self) .. HandleCommand))
  902.  
  903. 			setCVar(Prefix(self) .. HandleCommand, "")
  904.  
  905. 			for _, value in pairs(RegisteredCommands) do
  906. 				if value[1] == Command then
  907. 					ok, err = pcall(value[2])
  908.  
  909. 					if not ok then
  910. 						error(err)
  911. 					elseif err then
  912. 						err()
  913. 					end
  914. 				end
  915. 			end
  916. 		end
  917. 	end
  918.  
  919. 	local function HideCmd(self, cmd, name, value, added)
  920. 		if not cmd then return self:Log("HideCmd error: No command argument given") end
  921.  
  922. 		if not existsCVar(cmd) then return self:Log("HideCmd error: Command '%s' does not exist", cmd) end
  923.  
  924. 		if not name then return self:Log("HideCmd error: No name argument given") end
  925.  
  926. 		name = ((not added) and self:Prefix() or "") .. name
  927.  
  928. 		value = value or getCVar(cmd)
  929.  
  930. 		if not existsCVar(name) then
  931. 			hideCVar(cmd, name)
  932.  
  933. 			rawcmd(name .. " " .. value .. "\n")
  934.  
  935. 			self:Log("Hided Console-Command '%s' with command '%s' and value '%s'", cmd, name, value)
  936. 		else
  937. 			self:Log("Could not hide command '%s' with value '%s' (Hidden command already exists)", cmd, value)
  938. 		end
  939. 	end
  940.  
  941. 	local function CreateCmd(self, cmd, value, added, pr)
  942. 		if not cmd then return self:Log("CreateCmd error: No command argument given") end
  943.  
  944. 		cmd = ((not added) and self:Prefix() or "") .. cmd
  945.  
  946. 		value = value or getCVar(cmd)
  947.  
  948. 		AddCVar(cmd, value)
  949. 	end
  950.  
  951. 	SB.CreateCmd = CreateCmd
  952. 	SB.HideCmd = HideCmd
  953.  
  954. 	SB:CreateCmd(HandleCommand, "")
  955.  
  956. 	SB.AddChangeCallback = AddChangeCallback
  957. 	SB.GetConVarCallbacks = GetConVarCallbacks
  958. 	SB.AddClientConVar = AddConCommand
  959.  
  960. 	SB:AddLoop("Global Update", function() Update(SB) end)
  961. end
  962.  
  963. -- 	###################################
  964. -- 	#######	   FILE-RELATED	    #######
  965. -- 	###################################
  966. do
  967. 	local function StringExplode(seperator, str)
  968. 		if seperator == "" then return string.ToTable(str) end
  969.  
  970. 		local tble = {}  
  971. 		local ll = 0
  972.  
  973. 		while true do
  974. 			l = string.find(str, seperator, ll, true)
  975.  
  976. 			if l ~= nil then
  977. 				table.insert(tble, string.sub(str, ll, l - 1))
  978.  
  979. 				ll = l + 1
  980. 			else
  981. 				table.insert(tble, string.sub(str, ll))
  982.  
  983. 				break
  984. 			end
  985. 		end
  986.  
  987. 		return tble
  988. 	end
  989.  
  990. 	local function GetSettingsFromFile(self)
  991. 		filename = self.Filenames[2]
  992.  
  993. 		if not self:IsFile(filename) then con = true else con = false end
  994.  
  995. 		local Table = {}
  996.  
  997. 		if not con then
  998. 			for x in io.lines(filename) do
  999. 				if x:find("=") then
  1000. 					local StringTable = StringExplode("=", x)
  1001.  
  1002. 					Table[string.lower(string.gsub(StringTable[1], " ", ""))] = string.lower(string.gsub(StringTable[#StringTable], '"', ""))
  1003. 				end
  1004. 			end
  1005. 		end
  1006.  
  1007. 		for k, v in pairs(self.DefaultSettings) do
  1008. 			if Table[string.lower(tostring(k))] == nil then Table[string.lower(tostring(k))] = string.lower(tostring(v)) end
  1009. 		end
  1010.  
  1011. 		return Table
  1012. 	end
  1013.  
  1014. 	local function W(w)
  1015. 		if type(w) == "string" then
  1016. 			return "\"" .. w .. "\""
  1017. 		end
  1018.  
  1019. 		return tostring(w)
  1020. 	end
  1021.  
  1022. 	local function tobool(val)
  1023. 		if val == nil or val == false or val == 0 or val == "0" or val == "false" then return "false" end
  1024.  
  1025. 		return "true"
  1026. 	end
  1027.  
  1028. 	local function SaveFile(self)
  1029. 		self:WriteFile(self.Filenames[2], "" ..
  1030. 			"[Aimbot]" ..
  1031. 			"\nAimbot = " .. tobool(W(self:Setting("aimbot_enabled"))) ..
  1032. 			"\nAimbotDelay = " .. W(self:Setting("aimbot_delay")) ..
  1033. 			"\nAimbotHold = " .. W(self:Setting("aimbot_hold")) ..
  1034. 			"\nAimbotAutoShoot = " .. tobool(W(self:Setting("aimbot_autoshoot"))) ..
  1035. 			"\nAimbotAutoShootDelay = " .. W(self:Setting("aimbot_autoshoot_delay")) ..
  1036. 			"\nAimbotMode = " .. W(self:Setting("aimbot_mode")) ..
  1037. 			"\nAimbotFovX = " .. W(self:Setting("aimbot_fovX")) ..
  1038. 			"\nAimbotFovY = " .. W(self:Setting("aimbot_fovY")) ..
  1039. 			"\nAimbotAimOnce = " .. tobool(W(self:Setting("aimbot_aimonce"))) ..
  1040. 			"\nAimbotFriendlyFire = " .. tobool(W(self:Setting("aimbot_friendlyfire"))) ..
  1041. 			"\nAimbotHitboxPos = " .. W(self:Setting("aimbot_hitbox_pos")) ..
  1042. 			"\nAimbotKey = " .. W(self:Setting("aimbot_key")) ..
  1043. 			"\nAimbotMousefix = " .. tobool(W(self:Setting("aimbot_mousefix"))) ..
  1044. 			"\nAimbotMousefixSleep = " .. W(self:Setting("aimbot_mousefix_sleep")) .. "\n\n" ..
  1045. 			"[Triggerbot]" ..
  1046. 			"\nTriggerbot = " .. tobool(W(self:Setting("triggerbot_enabled"))) ..
  1047. 			"\nTriggerbotAim = " .. tobool(W(self:Setting("triggerbot_aim"))) ..
  1048. 			"\nTriggerbotMousefix = " .. tobool(W(self:Setting("triggerbot_mousefix"))) ..
  1049. 			"\nTriggerbotMousefixSleep = " .. W(self:Setting("triggerbot_mousefix_sleep")) ..
  1050. 			"\nTriggerbotHold = " .. W(self:Setting("triggerbot_hold")) ..
  1051. 			"\nTriggerbotDelay = " .. W(self:Setting("triggerbot_delay")) ..
  1052. 			"\nTriggerbotKey = " .. W(self:Setting("triggerbot_key")) ..
  1053. 			"\nTriggerbotFriendlyFire = " .. tobool(W(self:Setting("triggerbot_friendlyfire"))) ..
  1054. 			"\nTriggerbotMode = " .. W(self:Setting("triggerbot_mode")) ..
  1055. 			"\nTriggerbotFovX = " .. W(self:Setting("triggerbot_fovX")) ..
  1056. 			"\nTriggerbotFovY = " .. W(self:Setting("triggerbot_fovY")) ..
  1057. 			"\nTriggerbotHitboxPos = " .. W(self:Setting("triggerbot_hitbox_pos")) .. "\n\n" ..
  1058. 			"[Autopistol]" ..
  1059. 			"\nAutopistol = " .. tobool(W(self:Setting("autopistol_enabled"))) ..
  1060. 			"\nAutopistolKey = " .. W(self:Setting("autopistol_key")) ..
  1061. 			"\nAutopistolHold = " .. W(self:Setting("autopistol_hold")) .. "\n\n" ..
  1062. 			"[AntiRecoil]" ..
  1063. 			"\nAntiRecoil = " .. tobool(W(self:Setting("antirecoil_enabled"))) ..
  1064. 			"\nAntiRecoilKey = " .. W(self:Setting("antirecoil_key")) ..
  1065. 			"\nAntiRecoilExtraAimDown = " .. W(self:Setting("antirecoil_add")) .. "\n\n" ..
  1066. 			"[Bunnyhop]" ..
  1067. 			"\nBunnyhop = " .. tobool(W(self:Setting("bunnyhop_enabled"))) ..
  1068. 			"\nBunnyhopKey = " .. W(self:Setting("bunnyhop_key")) .. "\n\n" ..
  1069. 			"[Knifebot]" ..
  1070. 			"\nKnifebot = " .. tobool(W(self:Setting("knifebot_enabled"))) ..
  1071. 			"\nKnifebotKey = " .. W(self:Setting("knifebot_key")) .. "\n\n" ..
  1072. 			"[AntiAim]" ..
  1073. 			"\nAntiAim = " .. tobool(W(self:Setting("anti_aim"))) ..
  1074. 			"\nAntiAimDelay = " .. W(self:Setting("anti_aim_delay")) .. "\n\n" ..
  1075. 			"[Speedhack]" ..
  1076. 			"\nSpeedhack = " .. tobool(W(self:Setting("speedhack_enabled"))) ..
  1077. 			"\nSpeedhackKey = " .. W(self:Setting("speedhack_key")) ..
  1078. 			"\nSpeedhackSpeed = " .. W(self:Setting("speedhack_speed")) .. "\n\n" ..
  1079. 			"[EnemyDown]" ..
  1080. 			"\nEnemyDown = " .. tobool(W(self:Setting("enemy_down"))) ..
  1081. 			"\nEnemyDownDelay = " .. W(self:Setting("enemy_down_delay")) .. "\n\n" ..
  1082. 			"[Misc]" ..
  1083. 			"\nWeaponCheck = " .. tobool(W(self:Setting("weapon_check"))) ..
  1084. 			--"\nWeaponCheckDelay = " .. W(self:Setting("weapon_check_delay")) ..
  1085. 			"\nPlayerChams = " .. tobool(W(self:Setting("player_chams"))) ..
  1086. 			"\nAntiSmoke = " .. tobool(W(self:Setting("anti_smoke"))) ..
  1087. 			"\nAntiFlash = " .. tobool(W(self:Setting("anti_flash"))) ..
  1088. 			"\nNoHands = " .. tobool(W(self:Setting("no_hands"))))
  1089. 	end
  1090.  
  1091. 	SB.GetSettingsFromFile = GetSettingsFromFile
  1092. 	SB.SaveSettings = SaveFile
  1093.  
  1094. 	SB.FileSettings = SB:GetSettingsFromFile()
  1095.  
  1096. 	local function PrintTable(tab, indent, done)
  1097. 		done = done or {}
  1098. 		indent = indent or 0
  1099.  
  1100. 		for key, value in pairs(tab) do
  1101. 			print(string.rep("\t", indent))
  1102.  
  1103. 			if type(value) == "table" and not done[value] then
  1104. 				done[value] = true
  1105.  
  1106. 				print(tostring(key) .. ":" .. "\n")
  1107. 				PrintTable(value, indent + 2, done)
  1108. 			else
  1109. 				print(tostring(key) .. "\t=\t")
  1110. 				print(tostring(value) .. " (Type: " .. type(value) .. ")\n")
  1111. 			end
  1112. 		end
  1113. 	end
  1114.  
  1115. 	local function GetSetting(self, stri)
  1116. 		local var = self.FileSettings[string.lower(stri)]
  1117.  
  1118. 		if var:find("true") or var:find("false") then
  1119. 			return var:find("true") and true or false
  1120. 		end
  1121.  
  1122. 		if type(tonumber(var)) == "number" then return tonumber(var) end
  1123.  
  1124. 		return var
  1125. 	end
  1126.  
  1127. 	SB.GetSetting = GetSetting
  1128. end
  1129.  
  1130. -- 	###################################
  1131. -- 	#######	    SETTINGS  	    #######
  1132. -- 	###################################
  1133. do
  1134. 	local Settings = {}
  1135.  
  1136. 	local function SettingVar(self, name)
  1137. 		--if not Settings[name] then return end
  1138.  
  1139. 		return string.lower((self.SettingsPrefix or "") .. name)
  1140. 	end
  1141.  
  1142. 	local function SetSetting(name, new)
  1143. 		if not Settings[name] then return end
  1144.  
  1145. 		local Info = Settings[name]
  1146.  
  1147. 		if Info.Type == "number" then
  1148. 			new = tonumber(new)
  1149. 		elseif Info.Type == "boolean" then
  1150. 			new = (tonumber(new) or 0) > 0
  1151. 		end
  1152.  
  1153. 		Info.Value = new
  1154. 	end
  1155.  
  1156. 	local function CreateSetting(self, name, desc, default, misc)
  1157. 		if not name then error("CreateSetting Error: No name given") end
  1158.  
  1159. 		local cvar = SettingVar(self, name)
  1160.  
  1161. 		if type(tonumber(default)) == "number" then default = tonumber(default) end
  1162.  
  1163. 		local info = { Name = name, Desc = desc, CVar = cvar, Type = type(default), Value = default }
  1164.  
  1165. 		for key, value in pairs(misc or {}) do
  1166. 			if not info[key] then info[key] = value end
  1167. 		end
  1168.  
  1169. 		if info.Type == "boolean" then default = default and 1 or 0 end
  1170.  
  1171. 		self:CreateCmd(cvar, default, true, true)
  1172.  
  1173. 		Settings[cvar] = info
  1174.  
  1175. 		SetSetting(cvar, tostring(getCVar(cvar)))
  1176.  
  1177. 		self:AddChangeCallback(cvar, function(new, old)
  1178. 			SetSetting(cvar, tostring(new))
  1179.  
  1180. 			if type(info["Func"]) == "function" then
  1181. 				info["Func"]()
  1182. 			end
  1183. 		end)
  1184.  
  1185. 		print("Created setting \"" .. cvar .. "\" with value \"" .. default .. "\"\n")
  1186. 	end
  1187.  
  1188. 	local function SetAngle(self, pitch, yaw)
  1189. 		if pitch and yaw then
  1190. 			setAng(pitch, yaw, 0)
  1191. 		end
  1192. 	end
  1193.  
  1194. 	local function GetSetting(self, name)
  1195. 		local cvar = SettingVar(self, name)
  1196.  
  1197. 		if not Settings[cvar] then return end
  1198.  
  1199. 		return Settings[cvar].Value
  1200. 	end
  1201.  
  1202. 	local Strings = {}
  1203.  
  1204. 	local function CalculateString(self, len)
  1205. 		local ret = ""
  1206.  
  1207. 		for i = 1 , len do
  1208. 			ret = ret .. string.char(math.random(65, 116))
  1209. 		end
  1210.  
  1211. 		if not Strings[ret] then
  1212. 			Strings[ret] = true
  1213.  
  1214. 			return ret
  1215. 		else
  1216. 			return self:CalculateString(len)
  1217. 		end
  1218. 	end
  1219.  
  1220. 	SB.CalculateString = CalculateString
  1221.  
  1222. 	--[[
  1223. 	-- 	###################################
  1224. 	-- 	#######	       Menu         #######
  1225. 	-- 	###################################
  1226. 	local SubMenus = {}
  1227.  
  1228. 	local function BuildMenu(self)
  1229. 		local c = 0
  1230.  
  1231. 		for key, info in pairs(Settings) do
  1232. 			if info.AddToMenu then
  1233. 				if not SubMenus[info.SubMenu] then
  1234. 					local SubMenuName = info.SubMenu or self:CalculateString(12)
  1235.  
  1236. 					loadstring(self:CalculateString(11) .. ' = Menu:new("' .. SubMenuName .. '")')
  1237.  
  1238. 					SubMenus[SubMenuName] = true
  1239.  
  1240. 					info.SubMenu = SubMenuName
  1241. 				else
  1242. 					loadstring(self:CalculateString(10) .. ' = Menu:new("' .. (info.Name or self:CalculateString(13)) .. '", ' .. info.SubMenu .. ', function() Settings[' .. key .. '].Function() end)')
  1243. 				end
  1244.  
  1245. 				c = c + 1
  1246. 			end
  1247. 		end
  1248.  
  1249. 		if c > 1 then
  1250. 			Menu:exec()
  1251. 		else
  1252. 			print("No items added to the menu yet!\n")
  1253. 		end
  1254. 	end
  1255.  
  1256. 	SB.BuildMenu = BuildMenu]]
  1257. 	SB.Setting = GetSetting
  1258. 	SB.CreateSetting = CreateSetting
  1259. 	SB.SetAngle = SetAngle
  1260. end
  1261.  
  1262. --SB:CreateSetting("weapon_check_delay", "Defines the weapon-check delay (in seconds).", SB:GetSetting("WeaponCheckDelay"))
  1263. SB:CreateSetting("weapon_check", "If set to 1, SBot searches for WeaponIDs. If not, then not.", SB:GetSetting("WeaponCheck"))
  1264.  
  1265. -- 	#######################################
  1266. -- 	#######	    ADDRESS-RELATED  	#######
  1267. -- 	#######################################
  1268. do
  1269. 	local VGuiAddr = 0x11A314
  1270. 	local ChatAddr = 0x7435BC
  1271. 	local ChatAddrOffset = 0x17C
  1272. 	local AmmoAddr = 0x38C0C4
  1273. 	local AmmoAddrOffset = 0x1534
  1274. 	local EngineBase = getBaseAddr("engine.dll")
  1275. 	local ClientBase = getBaseAddr("client.dll")
  1276. 	local VGuiBase = getBaseAddr("vguimatsurface.dll")
  1277.  
  1278. 	local function Address(addr)
  1279. 		return "0x" .. string.upper(string.format("%x", addr))
  1280. 	end
  1281.  
  1282. 	local function ConsoleVisible()
  1283. 		return (readmem(readmem(ClientBase + ChatAddr, 4) + ChatAddrOffset, 4) == 1 or readmem(VGuiBase + VGuiAddr, 4) == 1)
  1284. 	end
  1285.  
  1286. 	local function GetAmmo()
  1287. 		return readmem(readmem(EngineBase + AmmoAddr, 4) + AmmoAddrOffset, 4)
  1288. 	end
  1289.  
  1290. 	local function InGame(self)
  1291. 		return inGame() and not ConsoleVisible() and GetAmmo() > 0
  1292. 		--return inGame() and not ConsoleVisible()
  1293. 	end
  1294.  
  1295. 	SB.InGame = InGame
  1296.  
  1297. 	SB:Log("")
  1298. 	SB:Log("-------------------------------------------------")
  1299. 	SB:Log("VGui Address: " .. Address(VGuiAddr))
  1300. 	SB:Log("Chat Address: " .. Address(ChatAddr))
  1301. 	SB:Log("Chat Offset: " .. Address(ChatAddrOffset))
  1302. 	SB:Log("Ammo Address: " .. Address(AmmoAddr))
  1303. 	SB:Log("Ammo Offset: " .. Address(AmmoAddrOffset))
  1304. 	SB:Log("Engine Base: " .. Address(EngineBase))
  1305. 	SB:Log("Client Base: " .. Address(ClientBase))
  1306. 	SB:Log("VGui Base: " .. Address(VGuiBase))
  1307. 	SB:Log("-------------------------------------------------")
  1308. 	SB:Log("")
  1309. 	SB:Log("")
  1310. end
  1311.  
  1312. -- 	#######################################
  1313. -- 	#######	    PLAYER-RELATED  	#######
  1314. -- 	#######################################
  1315. do
  1316. 	local player = {}
  1317.  
  1318. 	function SetMeta(id)
  1319. 		local metatable = { Index = id }
  1320.  
  1321. 		setmetatable(metatable, { __index = player })
  1322. 		return metatable
  1323. 	end
  1324.  
  1325. 	function player:Enemy() return isEnemy(self.Index) end
  1326. 	function player:Crouched() return isCrouched(self.Index) end
  1327. 	function player:GetPos() return getPos(self.Index) end
  1328. 	function player:GetAng() return getAng(self.Index) end
  1329. 	function player:GetEyePos() return getEyePos(self.Index) end
  1330. 	function player:AimTarget() return SetMeta(aimTarget(self.Index)) end
  1331. 	function player:Team() return getTeam(self.Index) end
  1332. 	function player:IsPlayer() return isPlayer(self.Index) end
  1333. 	function player:IsBot() return isBot(self.Index) end
  1334. 	function player:Name() return getName(self.Index) end
  1335. 	function player:Alive() return isAlive(self.Index) end
  1336. 	function player:OnGround() return onGround(self.Index) end
  1337. 	function player:InWater() return inWater(self.Index) end
  1338. 	function player:WeaponSlot() return getWeaponSlot(self.Index) or 1337 end
  1339. 	function player:WeaponID() return getWeaponID(self.Index) or 1337 end
  1340. 	function player:Distance() return getDistance(self.Index) end
  1341. 	function player:GetHitboxPos(pos) return getHitboxPos(self.Index, pos) end
  1342. 	function player:Visible() return isVisible(self.Index) end
  1343.  
  1344. 	function player:WeaponName()
  1345. 		local weapon = self:WeaponID()
  1346.  
  1347. 		-- Knife
  1348. 		if weapon == 73 then
  1349. 			return "weapon_knife"
  1350.  
  1351. 		-- Grenades
  1352. 		elseif weapon == 68 then
  1353. 			return "weapon_hegrenade"
  1354.  
  1355. 		elseif weapon == 52 then
  1356. 			return "weapon_flashbang"
  1357.  
  1358. 		elseif weapon == 101 then
  1359. 			return "weapon_smokegrenade"
  1360.  
  1361. 		-- Pistols
  1362. 		elseif weapon == 176 then
  1363. 			return "weapon_glock"
  1364.  
  1365. 		elseif weapon == 189 then
  1366. 			return "weapon_usp"
  1367.  
  1368. 		elseif weapon == 182 then
  1369. 			return "weapon_p228"
  1370.  
  1371. 		elseif weapon == 32 then
  1372. 			return "weapon_deagle"
  1373.  
  1374. 		elseif weapon == 171 then
  1375. 			return "weapon_elite"
  1376.  
  1377. 		elseif weapon == 173 then
  1378. 			return "weapon_fiveseven"
  1379.  
  1380. 		-- Shotguns
  1381. 		elseif weapon == 178 then
  1382. 			return "weapon_m3"
  1383.  
  1384. 		elseif weapon == 190 then
  1385. 			return "weapon_xm1014"
  1386.  
  1387. 		-- SMGs
  1388. 		elseif weapon == 180 then
  1389. 			return "weapon_mac10"
  1390.  
  1391. 		elseif weapon == 181 then
  1392. 			return "weapon_mp5"
  1393.  
  1394. 		elseif weapon == 188 then
  1395. 			return "weapon_ump45"
  1396.  
  1397. 		elseif weapon == 183 then
  1398. 			return "weapon_p90"
  1399.  
  1400. 		-- Rifles
  1401. 		elseif weapon == 175 then
  1402. 			return "weapon_galil"
  1403.  
  1404. 		elseif weapon == 1 then
  1405. 			return "weapon_ak47"
  1406.  
  1407. 		elseif weapon == 184 then
  1408. 			return "weapon_scout"
  1409.  
  1410. 		elseif weapon == 186 then
  1411. 			return "weapon_sg552"
  1412.  
  1413. 		elseif weapon == 167 then
  1414. 			return "weapon_awp"
  1415.  
  1416. 		elseif weapon == 174 then
  1417. 			return "weapon_g3sg1"
  1418.  
  1419. 		elseif weapon == 179 then
  1420. 			return "weapon_m4a1"
  1421.  
  1422. 		elseif weapon == 172 then
  1423. 			return "weapon_famas"
  1424.  
  1425. 		-- Machine guns
  1426. 		elseif weapon == 177 then
  1427. 			return "weapon_m249"
  1428.  
  1429. 		-- C4
  1430. 		elseif weapon == 23 then
  1431. 			return "weapon_c4"
  1432. 		end
  1433.  
  1434. 		-- Unknown	
  1435. 		return "weapon_unknown";
  1436. 	end
  1437.  
  1438. 	local function GetEnts(self)
  1439. 		local players = {}
  1440.  
  1441. 		for i = 1, 64 do
  1442. 			if isPlayer(i) and i ~= self:LocalPlayer().Index then
  1443. 				players[i] = SetMeta(i)
  1444. 			end
  1445. 		end
  1446.  
  1447. 		return players
  1448. 	end
  1449.  
  1450. 	local function LocalPlayer(self)
  1451. 		return self.LP
  1452. 	end
  1453.  
  1454. 	SB.LP = SetMeta(getMyIndex())
  1455. 	SB.LocalPlayer = LocalPlayer
  1456. 	SB.GetEnts = GetEnts
  1457.  
  1458. 	SB:AddLoop("LocalPlayer Update", function()
  1459. 		if SB.LP.Index ~= getMyIndex() then
  1460. 			SB.LP.Index = getMyIndex()
  1461. 		end
  1462. 	end)
  1463.  
  1464. 	local STATE_INGAME = 1
  1465. 	local STATE_INMENU = 2
  1466. 	local INGAME_STATE = inGame() and STATE_INGAME or STATE_INMENU
  1467.  
  1468. 	SB:AddLoop("Material Check", function()
  1469. 		if INGAME_STATE == STATE_INMENU and inGame() then
  1470. 			INGAME_STATE = STATE_INGAME
  1471.  
  1472. 			local sv_pure = GetPure()
  1473.  
  1474. 			if sv_pure == "0" then
  1475. 				if SB:Setting("no_hands") then SB:NoHands("on", false) end
  1476. 				if SB:Setting("player_chams") then SB:PlayerChams("on", false) end
  1477. 				if SB:Setting("anti_flash") then SB:AntiFlash("on", false) end
  1478. 			else
  1479. 				print("sv_pure is set to " .. pure .. ", can't use materials!\n")
  1480. 			end
  1481. 		elseif INGAME_STATE == STATE_INGAME and not inGame() then
  1482. 			INGAME_STATE = STATE_INMENU
  1483. 		end
  1484. 	end)
  1485. end
  1486.  
  1487. -- 	###################################
  1488. -- 	#######        Others       #######
  1489. -- 	###################################
  1490. function GetPure()
  1491. 	--[[if lfs.attributes("cstrike\\condump000.txt", "mode") == "file" then
  1492. 		os.remove("cstrike\\condump000.txt")
  1493. 	end
  1494.  
  1495. 	rawcmd("sv_pure\n")
  1496.  
  1497. 	wait(50)
  1498.  
  1499. 	rawcmd("condump\n")
  1500.  
  1501. 	wait(50)
  1502.  
  1503. 	for line in io.lines("cstrike\\condump000.txt") do
  1504. 		if line:find("sv_pure = 1") then
  1505. 			return "1"
  1506. 		elseif line:find("sv_pure = 2") then
  1507. 			return "2"
  1508. 		elseif line:find("sv_pure = 0") then
  1509. 			return "0"
  1510. 		end
  1511. 	end]]
  1512.  
  1513. 	return "0"
  1514. end
  1515.  
  1516. SB:HideCmd("mp_playerid", "playerid", "0")
  1517. SB:HideCmd("sv_cheats", "cheats", "1")
  1518. SB:HideCmd("sv_consistency", "consistency", "0")
  1519. SB:HideCmd("cl_pitchup", "pitchup", (SB:Setting("anti_aim") and "-180" or "89"))
  1520. SB:HideCmd("cl_pitchspeed", "pitchspeed", "0")
  1521.  
  1522. -- 	###################################
  1523. -- 	#######	TARGETING - Targets #######
  1524. -- 	###################################
  1525. SB.AimbotTarget = nil
  1526.  
  1527. function SB:SetAimbotTarget(target)
  1528. 	if type(target) == "table" then -- It's a table (metatable), set the target to it's metatable!
  1529. 		SB.AimbotTarget = target
  1530. 	elseif type(target) == "number" then -- It's just a player ID, convert the ID to an metatable and set the target to it's metatable!
  1531. 		SB.AimbotTarget = SetMeta(target)
  1532. 	end
  1533.  
  1534. 	SB.AimbotTarget = nil
  1535. end
  1536.  
  1537. function SB:GetAimbotTarget()
  1538. 	if not self.AimbotTarget then return nil end
  1539.  
  1540. 	if type(self.AimbotTarget) == "table" then -- It's a table (metatable), return the metatable!
  1541. 		if self.AimbotTarget:IsPlayer() then
  1542. 			return self.AimbotTarget
  1543. 		end
  1544. 	elseif type(self.AimbotTarget) == "number" then -- It's just a player ID, convert the ID to an metatable and return it!
  1545. 		if isPlayer(self.AimbotTarget) then
  1546. 			return SetMeta(self.AimbotTarget)
  1547. 		end
  1548. 	end
  1549.  
  1550. 	return nil
  1551. end
  1552.  
  1553. function SB:GetFov()
  1554. 	local dist, fovX, fovY, fovT
  1555. 	local target, me = {}, {}
  1556.  
  1557. 	target.currentfov = 9999
  1558. 	target.id = SetMeta(0)
  1559.  
  1560. 	me.index = self:LocalPlayer()
  1561.  
  1562. 	me.pos = { me.index:GetPos() }
  1563. 	me.ang = { me.index:GetAng() }
  1564.  
  1565. 	me.x = me.pos[1]
  1566. 	me.y = me.pos[2]
  1567. 	me.z = me.pos[3]
  1568.  
  1569. 	me.yaw = me.ang[2]
  1570. 	me.pitch = me.ang[1]
  1571.  
  1572. 	for _, e in pairs(self:GetEnts()) do
  1573. 		if e:IsPlayer() then
  1574. 			if e:Alive() and e:Visible() and (not self:Setting("aimbot_friendlyfire") and e:Enemy() or true) then
  1575. 				target.pos = { e:GetPos() }
  1576. 				target.x = target.pos[1]
  1577. 				target.y = target.pos[2]
  1578. 				target.z = target.pos[3] - (e:Crouched() and 18 or 0) + (me.index:Crouched() and 18 or 0) - 20
  1579.  
  1580. 				dist = math.sqrt(((target.x - me.x) ^ 2) + ((target.y - me.y) ^ 2) + ((target.z - me.z) ^ 2))
  1581. 				pitch = math.deg(math.acos((me.z - target.z) / dist)) - 90
  1582.  
  1583. 				yaw = math.deg(math.atan(math.abs(target.y - me.y) / math.abs(target.x - me.x)))
  1584.  
  1585. 				if target.x < me.x then yaw = yaw + 180 end
  1586. 				if (target.x > me.x and me.y > target.y) or (target.x < me.x and me.y < target.y) then yaw = 360 - yaw end
  1587.  
  1588. 				angX = math.abs(yaw - me.yaw)
  1589. 				angX = angX > 180 and 360 - angX or angX
  1590. 				angX = math.abs(angX)
  1591.  
  1592. 				angY = math.abs(pitch + me.pitch)
  1593.  
  1594. 				fovX = math.tan(math.rad(angX)) * dist
  1595. 				fovY = math.tan(math.rad(angY)) * dist
  1596.  
  1597. 				fovT = math.abs(fovX + fovY)
  1598.  
  1599. 				if fovT < target.currentfov then
  1600. 					target.id = e
  1601. 					target.currentfov = fovT
  1602. 					target.fovX = fovX
  1603. 					target.fovY = fovY
  1604. 				end
  1605. 			end
  1606. 		end
  1607. 	end
  1608.  
  1609. 	return (target.fovX or 9999), (target.fovY or 9999), target.id
  1610. end
  1611.  
  1612. do
  1613. 	local M_PI = 180 / math.pi
  1614.  
  1615. 	local function CalculateAngle(self, Src, Dest)
  1616. 		local Delta = { (Src[1] - Dest[1]), (Src[2] - Dest[2]), (Src[3] - Dest[3]) }
  1617. 		local Dist = math.sqrt(Delta[1] ^ 2 + Delta[2] ^ 2)
  1618. 		local Angle = { (math.atan(Delta[3] / Dist) * M_PI), (math.atan(Delta[2] / Delta[1]) * M_PI), 0 }
  1619.  
  1620. 		Angle[2] = (Delta[1] >= 0) and Angle[2] - 180 or Angle[2]
  1621. 		return Angle
  1622. 	end
  1623.  
  1624. 	SB.CalculateAngle = CalculateAngle
  1625. end
  1626.  
  1627. function CopyPaste(file1, file2)
  1628. 	--[[if not io.open(file1) then
  1629. 		io.output(file1)
  1630. 		io.write("")
  1631. 		io.close()
  1632. 	end]]
  1633.  
  1634. 	io.output(file2)
  1635. 	io.write("")
  1636. 	io.close()
  1637.  
  1638. 	local input = io.open(file1, "rb")
  1639.  
  1640. 	if input == nil then error("File " .. file1 .. " doesnt exist") end
  1641.  
  1642. 	local output = io.open(file2, "wb")
  1643. 	local str = input:read("*all")
  1644. 	output:write(str)
  1645. 	output:close()
  1646. 	input:close()
  1647. end
  1648.  
  1649. -- 	###################################
  1650. -- 	#######	   Player-Chams	    #######
  1651. -- 	###################################
  1652. function OnPlayerChamsChange()
  1653. 	SB:PlayerChams(not SB:Setting("player_chams") and "off" or "on", true)
  1654. end
  1655.  
  1656. SB:CreateSetting("player_chams", "Player chams on/off", SB:GetSetting("PlayerChams"), { ["Func"] = OnPlayerChamsChange })
  1657.  
  1658. function SB:PlayerChams(str, con)
  1659. 	str = string.lower(str)
  1660.  
  1661. 	local Config = {
  1662.  
  1663. 		-- T-Arctic
  1664. 		DefaultTArticVmt = "materials\\models\\player\\t_arctic\\t_artic.vmt",
  1665. 		DefaultTArticVtf = "materials\\models\\player\\t_arctic\\t_artic.vtf",
  1666.  
  1667. 		ModifiedTArticVmt = "lua\\SBot\\materials\\models\\player\\t_arctic\\t_arctic.vmt",
  1668. 		ModifiedTArticVtf = "lua\\SBot\\materials\\models\\player\\t_arctic\\t_arctic.vtf",
  1669.  
  1670. 		-- T-Guerilla
  1671. 		DefaultTGuerillaVmt = "materials\\models\\player\\t_guerilla\\t_guerilla.vmt",
  1672. 		DefaultTGuerillaVtf = "materials\\models\\player\\t_guerilla\\t_guerilla.vtf",
  1673.  
  1674. 		ModifiedTGuerillaVmt = "lua\\SBot\\materials\\models\\player\\t_guerilla\\t_guerilla.vmt",
  1675. 		ModifiedTGuerillaVtf = "lua\\SBot\\materials\\models\\player\\t_guerilla\\t_guerilla.vtf",
  1676.  
  1677. 		-- T-Leet
  1678. 		DefaultTLeetVmt = "materials\\models\\player\\t_leet\\t_leet.vmt",
  1679. 		DefaultTLeetVtf = "materials\\models\\player\\t_leet\\t_leet.vtf",
  1680.  
  1681. 		ModifiedTLeetVmt = "lua\\SBot\\materials\\models\\player\\t_leet\\t_leet.vmt",
  1682. 		ModifiedTLeetVtf = "lua\\SBot\\materials\\models\\player\\t_leet\\t_leet.vtf",
  1683.  
  1684. 		-- T-Phoenix
  1685. 		DefaultTPhoenixVmt = "materials\\models\\player\\t_phoenix\\t_phoenix.vmt",
  1686. 		DefaultTPhoenixVtf = "materials\\models\\player\\t_phoenix\\t_phoenix.vtf",
  1687.  
  1688. 		ModifiedTPhoenixVmt = "lua\\SBot\\materials\\models\\player\\t_phoenix\\t_phoenix.vmt",
  1689. 		ModifiedTPhoenixVtf = "lua\\SBot\\materials\\models\\player\\t_phoenix\\t_phoenix.vtf",
  1690.  
  1691. 		-- CT-Gign
  1692. 		DefaultCTGignVmt = "materials\\models\\player\\ct_gign\\ct_gign.vmt",
  1693. 		DefaultCTGignVtf = "materials\\models\\player\\ct_gign\\ct_gign.vtf",
  1694.  
  1695. 		ModifiedCTGignVmt = "lua\\SBot\\materials\\models\\player\\ct_gign\\ct_gign.vmt",
  1696. 		ModifiedCTGignVtf = "lua\\SBot\\materials\\models\\player\\ct_gign\\ct_gign.vtf",
  1697.  
  1698. 		-- CT-GSG9
  1699. 		DefaultCTGSG9Vmt = "materials\\models\\player\\ct_gsg9\\ct_gsg9.vmt",
  1700. 		DefaultCTGSG9Vtf = "materials\\models\\player\\ct_gsg9\\ct_gsg9.vtf",
  1701.  
  1702. 		ModifiedCTGSG9Vmt = "lua\\SBot\\materials\\models\\player\\ct_gsg9\\ct_gsg9.vmt",
  1703. 		ModifiedCTGSG9Vtf = "lua\\SBot\\materials\\models\\player\\ct_gsg9\\ct_gsg9.vtf",
  1704.  
  1705. 		-- CT-Sas
  1706. 		DefaultCTSasVmt = "materials\\models\\player\\ct_sas\\ct_sas.vmt",
  1707. 		DefaultCTSasVtf = "materials\\models\\player\\ct_sas\\ct_sas.vtf",
  1708.  
  1709. 		ModifiedCTSasVmt = "lua\\SBot\\materials\\models\\player\\ct_sas\\ct_sas.vmt",
  1710. 		ModifiedCTSasVtf = "lua\\SBot\\materials\\models\\player\\ct_sas\\ct_sas.vtf",
  1711.  
  1712. 		-- CT-Urban
  1713. 		DefaultCTUrbanVmt = "materials\\models\\player\\ct_urban\\ct_urban.vmt",
  1714. 		DefaultCTUrbanVtf = "materials\\models\\player\\ct_urban\\ct_urban.vtf",
  1715.  
  1716. 		ModifiedCTUrbanVmt = "lua\\SBot\\materials\\models\\player\\ct_urban\\ct_urban.vmt",
  1717. 		ModifiedCTUrbanVtf = "lua\\SBot\\materials\\models\\player\\ct_urban\\ct_urban.vtf"
  1718.  
  1719. 	}
  1720.  
  1721. 	if lfs.attributes("cstrike\\materials\\models", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models") end
  1722. 	if lfs.attributes("cstrike\\materials\\models\\player", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player") end
  1723.  
  1724. 	--[[ Terrorists ]]
  1725. 	--[[ T-Arctic ]]   	if lfs.attributes("cstrike\\materials\\models\\player\\t_arctic", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player\\t_arctic") end
  1726. 	--[[ T-Guerilla ]] 	if lfs.attributes("cstrike\\materials\\models\\player\\t_guerilla", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player\\t_guerilla") end
  1727. 	--[[ T-Leet ]]		if lfs.attributes("cstrike\\materials\\models\\player\\t_leet", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player\\t_leet") end
  1728. 	--[[ T-Phoenix ]]	if lfs.attributes("cstrike\\materials\\models\\player\\t_phoenix", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player\\t_phoenix") end
  1729.  
  1730. 	--[[ Counter-Terrorists ]]
  1731. 	--[[ CT-Gign ]]		if lfs.attributes("cstrike\\materials\\models\\player\\ct_gign", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player\\ct_gign") end
  1732. 	--[[ CT-GSG9 ]]		if lfs.attributes("cstrike\\materials\\models\\player\\ct_gsg9", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player\\ct_gsg9") end
  1733. 	--[[ CT-Sas ]]		if lfs.attributes("cstrike\\materials\\models\\player\\ct_sas", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player\\ct_sas") end
  1734. 	--[[ CT-Urban ]]	if lfs.attributes("cstrike\\materials\\models\\player\\ct_urban", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\player\\ct_urban") end
  1735.  
  1736. 	local LocalPlayer = self:LocalPlayer()
  1737.  
  1738. 	if self:Setting("player_chams") or con then
  1739. 		if str == "on" then
  1740. 			-- T-Artic
  1741. 			CopyPaste("cstrike\\" .. Config.ModifiedTArticVmt, "cstrike\\" .. Config.DefaultTArticVmt)
  1742. 			CopyPaste("cstrike\\" .. Config.ModifiedTArticVtf, "cstrike\\" .. Config.DefaultTArticVtf)
  1743.  
  1744. 			-- T-Guerilla
  1745. 			CopyPaste("cstrike\\" .. Config.ModifiedTGuerillaVmt, "cstrike\\" .. Config.DefaultTGuerillaVmt)
  1746. 			CopyPaste("cstrike\\" .. Config.ModifiedTGuerillaVtf, "cstrike\\" .. Config.DefaultTGuerillaVtf)
  1747.  
  1748. 			-- T-Leet
  1749. 			CopyPaste("cstrike\\" .. Config.ModifiedTLeetVmt, "cstrike\\" .. Config.DefaultTLeetVmt)
  1750. 			CopyPaste("cstrike\\" .. Config.ModifiedTLeetVtf, "cstrike\\" .. Config.DefaultTLeetVtf)
  1751.  
  1752. 			-- T-Phoenix
  1753. 			CopyPaste("cstrike\\" .. Config.ModifiedTPhoenixVmt, "cstrike\\" .. Config.DefaultTPhoenixVmt)
  1754. 			CopyPaste("cstrike\\" .. Config.ModifiedTPhoenixVtf, "cstrike\\" .. Config.DefaultTPhoenixVtf)
  1755.  
  1756. 			-- CT-Gign
  1757. 			CopyPaste("cstrike\\" .. Config.ModifiedCTGignVmt, "cstrike\\" .. Config.DefaultCTGignVmt)
  1758. 			CopyPaste("cstrike\\" .. Config.ModifiedCTGignVtf, "cstrike\\" .. Config.DefaultCTGignVtf)
  1759.  
  1760. 			-- CT-GSG9
  1761. 			CopyPaste("cstrike\\" .. Config.ModifiedCTGSG9Vmt, "cstrike\\" .. Config.DefaultCTGSG9Vmt)
  1762. 			CopyPaste("cstrike\\" .. Config.ModifiedCTGSG9Vtf, "cstrike\\" .. Config.DefaultCTGSG9Vtf)
  1763.  
  1764. 			-- CT-Sas
  1765. 			CopyPaste("cstrike\\" .. Config.ModifiedCTSasVmt, "cstrike\\" .. Config.DefaultCTSasVmt)
  1766. 			CopyPaste("cstrike\\" .. Config.ModifiedCTSasVtf, "cstrike\\" .. Config.DefaultCTSasVtf)
  1767.  
  1768. 			-- CT-Urban
  1769. 			CopyPaste("cstrike\\" .. Config.ModifiedCTUrbanVmt, "cstrike\\" .. Config.DefaultCTUrbanVmt)
  1770. 			CopyPaste("cstrike\\" .. Config.ModifiedCTUrbanVtf, "cstrike\\" .. Config.DefaultCTUrbanVtf)		
  1771. 		end
  1772.  
  1773. 		-- T-Arctic
  1774. 		rawcmd("mat_reloadmaterial models/player/t_arctic/t_artic\n")
  1775.  
  1776. 		-- T-Leet
  1777. 		rawcmd("mat_reloadmaterial models/player/t_leet/t_leet\n")
  1778.  
  1779. 		-- T-Phoenix
  1780. 		rawcmd("mat_reloadmaterial models/player/t_phoenix/t_phoenix\n")
  1781.  
  1782. 		-- T-Guerilla
  1783. 		rawcmd("mat_reloadmaterial models/player/t_guerilla/t_guerilla\n")
  1784.  
  1785. 		-- CT-Gign
  1786. 		rawcmd("mat_reloadmaterial models/player/ct_gign/ct_gign\n")
  1787.  
  1788. 		-- CT-GSG9
  1789. 		rawcmd("mat_reloadmaterial models/player/ct_gsg9/ct_gsg9\n")
  1790.  
  1791. 		-- CT-Sas
  1792. 		rawcmd("mat_reloadmaterial models/player/ct_sas/ct_sas\n")
  1793.  
  1794. 		-- CT-Urban
  1795. 		rawcmd("mat_reloadmaterial models/player/ct_urban/ct_urban\n")
  1796.  
  1797. 		if str == "on" then
  1798. 			wait(100)
  1799.  
  1800. 			-- T-Artic
  1801. 			os.remove("cstrike\\" .. Config.DefaultTArticVmt)
  1802. 			os.remove("cstrike\\" .. Config.DefaultTArticVtf)
  1803.  
  1804. 			-- T-Guerilla
  1805. 			os.remove("cstrike\\" .. Config.DefaultTGuerillaVmt)
  1806. 			os.remove("cstrike\\" .. Config.DefaultTGuerillaVtf)
  1807.  
  1808. 			-- T-Leet
  1809. 			os.remove("cstrike\\" .. Config.DefaultTLeetVmt)
  1810. 			os.remove("cstrike\\" .. Config.DefaultTLeetVtf)
  1811.  
  1812. 			-- T-Phoenix
  1813. 			os.remove("cstrike\\" .. Config.DefaultTPhoenixVmt)
  1814. 			os.remove("cstrike\\" .. Config.DefaultTPhoenixVtf)
  1815.  
  1816. 			-- CT-Gign
  1817. 			os.remove("cstrike\\" .. Config.DefaultCTGignVmt)
  1818. 			os.remove("cstrike\\" .. Config.DefaultCTGignVtf)
  1819.  
  1820. 			-- CT-GSG9
  1821. 			os.remove("cstrike\\" .. Config.DefaultCTGSG9Vmt)
  1822. 			os.remove("cstrike\\" .. Config.DefaultCTGSG9Vtf)
  1823.  
  1824. 			-- CT-Sas
  1825. 			os.remove("cstrike\\" .. Config.DefaultCTSasVmt)
  1826. 			os.remove("cstrike\\" .. Config.DefaultCTSasVtf)
  1827.  
  1828. 			-- CT-Urban
  1829. 			os.remove("cstrike\\" .. Config.DefaultCTUrbanVmt)
  1830. 			os.remove("cstrike\\" .. Config.DefaultCTUrbanVtf)	
  1831. 		end
  1832. 	end
  1833. end
  1834.  
  1835. -- 	###################################
  1836. -- 	#######		 No-Hands	    #######
  1837. -- 	###################################
  1838. function OnNoHandsChange()
  1839. 	SB:NoHands(not SB:Setting("no_hands") and "off" or "on", true)
  1840. end
  1841.  
  1842. SB:CreateSetting("no_hands", "No hands on/off", SB:GetSetting("NoHands"), { ["Func"] = OnNoHandsChange })
  1843.  
  1844. function SB:NoHands(str, con, var)
  1845. 	str = string.lower(str)
  1846.  
  1847. 	local Config = {
  1848.  
  1849. 		NoHandsModifiedVmt = "lua\\SBot\\materials\\models\\weapons\\v_models\\hands\\v_hands.vmt",
  1850. 		NoHandsModifiedVtf = "lua\\SBot\\materials\\models\\weapons\\v_models\\hands\\v_hands.vtf",
  1851.  
  1852. 		NoHandsDefaultVmt = "materials\\models\\weapons\\v_models\\hands\\v_hands.vmt",
  1853. 		NoHandsDefaultVtf = "materials\\models\\weapons\\v_models\\hands\\v_hands.vtf"
  1854.  
  1855. 	}
  1856.  
  1857. 	if lfs.attributes("cstrike\\materials\\models", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models") end
  1858. 	if lfs.attributes("cstrike\\materials\\models\\weapons", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\weapons") end
  1859. 	if lfs.attributes("cstrike\\materials\\models\\weapons\\v_models", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\weapons\\v_models") end
  1860. 	if lfs.attributes("cstrike\\materials\\models\\weapons\\v_models\\hands", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\models\\weapons\\v_models\\hands") end
  1861.  
  1862. 	local LocalPlayer = self:LocalPlayer()
  1863.  
  1864. 	if self:Setting("no_hands") or con then
  1865. 		if str == "on" then
  1866. 			CopyPaste("cstrike\\" .. Config.NoHandsModifiedVmt, "cstrike\\" .. Config.NoHandsDefaultVmt)
  1867. 			CopyPaste("cstrike\\" .. Config.NoHandsModifiedVtf, "cstrike\\" .. Config.NoHandsDefaultVtf)
  1868. 		end
  1869.  
  1870. 		rawcmd("mat_reloadmaterial models/weapons/v_models/hands/v_hands\n")
  1871.  
  1872. 		if str == "on" then
  1873. 			wait(100)
  1874.  
  1875. 			os.remove("cstrike\\" .. Config.NoHandsDefaultVmt)
  1876. 			os.remove("cstrike\\" .. Config.NoHandsDefaultVtf)
  1877. 		end
  1878. 	end
  1879. end
  1880.  
  1881. -- 	###################################
  1882. -- 	#######		 Anti-Flash	    #######
  1883. -- 	###################################
  1884. function OnAntiFlashChange()
  1885. 	SB:AntiFlash(not SB:Setting("anti_flash") and "off" or "on", true)
  1886. end
  1887.  
  1888. SB:CreateSetting("anti_flash", "Anti flash on/off", SB:GetSetting("AntiFlash"), { ["Func"] = OnAntiFlashChange })
  1889.  
  1890. function SB:AntiFlash(str, con)
  1891. 	str = string.lower(str)
  1892.  
  1893. 	local Config = {
  1894.  
  1895. 		NoFlashMofifiedVmt = "lua\\SBot\\materials\\effects\\flashbang.vmt",
  1896. 		NoFlashModifiedOtherVmt = "lua\\SBot\\materials\\effects\\flashbang_white.vmt",
  1897.  
  1898. 		NoFlashDefaultVmt = "materials\\effects\\flashbang.vmt",
  1899. 		NoFlashDefaultOtherVmt = "materials\\effects\\flashbang_white.vmt",
  1900.  
  1901. 	}
  1902.  
  1903. 	if lfs.attributes("cstrike\\materials\\effects", "mode") ~= "directory" then lfs.mkdir("cstrike\\materials\\effects") end
  1904.  
  1905. 	local LocalPlayer = self:LocalPlayer()
  1906.  
  1907. 	if self:Setting("anti_flash") or con then
  1908. 		if str == "on" then
  1909. 			CopyPaste("cstrike\\" .. Config.NoFlashMofifiedVmt, "cstrike\\" .. Config.NoFlashDefaultVmt)
  1910. 			CopyPaste("cstrike\\" .. Config.NoFlashModifiedOtherVmt, "cstrike\\" .. Config.NoFlashDefaultOtherVmt)
  1911. 		end
  1912.  
  1913. 		rawcmd("mat_reloadmaterial effects/flashbang;mat_reloadmaterial effects/flashbang_white\n")
  1914.  
  1915. 		if str == "on" then
  1916. 			wait(100)
  1917.  
  1918. 			os.remove("cstrike\\" .. Config.NoFlashDefaultVmt)
  1919. 			os.remove("cstrike\\" .. Config.NoFlashDefaultOtherVmt)
  1920. 		end
  1921. 	end
  1922. end
  1923.  
  1924. -- 	###################################
  1925. -- 	#######		 Anti-Smoke	    #######
  1926. -- 	###################################
  1927. function OnAntiSmokeChange()
  1928. 	SB:AntiSmoke(not SB:Setting("anti_smoke") and "off" or "on", true)
  1929. end
  1930.  
  1931. SB:CreateSetting("anti_smoke", "Anti smoke on/off", SB:GetSetting("AntiSmoke"), { ["Func"] = OnAntiSmokeChange })
  1932. SB:HideCmd("r_drawparticles", "drawparticles", (SB:Setting("anti_smoke") and "0" or "1"))
  1933.  
  1934. function SB:AntiSmoke(str, con)
  1935. 	str = string.lower(str)
  1936.  
  1937. 	local LocalPlayer = self:LocalPlayer()
  1938.  
  1939. 	if self:Setting("anti_smoke") or con then
  1940. 		if str == "on" then
  1941. 			if getCVar(self:Prefix() .. "drawparticles") ~= "0" then
  1942. 				rawcmd(self:Prefix() .. "drawparticles 0\n")
  1943. 			end
  1944. 		else
  1945. 			if getCVar(self:Prefix() .. "drawparticles") ~= "1" then
  1946. 				rawcmd(self:Prefix() .. "drawparticles 1\n")
  1947. 			end
  1948. 		end
  1949. 	end
  1950. end
  1951.  
  1952. -- 	###################################
  1953. -- 	#######		  Anti-Aim	    #######
  1954. -- 	###################################
  1955. function OnAntiAimChange()
  1956. 	SB:AntiAim(not SB:Setting("anti_aim") and "off" or "on", true)
  1957. end
  1958.  
  1959. SB:CreateSetting("anti_aim", "Anti aim on/off", SB:GetSetting("AntiAim"), { ["Func"] = OnAntiAimChange })
  1960. SB:CreateSetting("anti_aim_delay", "Delay of the anti-aim", SB:GetSetting("AntiAimDelay"))
  1961.  
  1962. function SB:AntiAim(str, con)
  1963. 	str = string.lower(str)
  1964.  
  1965. 	local LocalPlayer = self:LocalPlayer()
  1966.  
  1967. 	if self:Setting("anti_aim") or con then
  1968. 		if getCVar("sensitivity") ~= "0.000100" then
  1969. 			rawcmd("sensitivity 0.000100;cl_yawspeed 0\n")
  1970. 		end
  1971.  
  1972. 		if str == "on" then
  1973. 			if getCVar(self.SettingsPrefix .. "pitchup") == "89" then
  1974. 				LocalPlayer.Ang = { self:LocalPlayer():GetAng() }
  1975.  
  1976. 				wait(self:Setting("anti_aim_delay") / 2)
  1977.  
  1978. 				rawcmd(self.SettingsPrefix .. "pitchup -180\n")
  1979.  
  1980. 				wait(self:Setting("anti_aim_delay") / 2)
  1981.  
  1982. 				local NewAngle = { self:LocalPlayer():GetAng() }
  1983.  
  1984. 				self:SetAngle(LocalPlayer.Ang[1], (LocalPlayer.Ang[2] == NewAngle and LocalPlayer.Ang[2] - 180 or LocalPlayer.Ang[2]), 0)
  1985. 			end
  1986. 		else
  1987. 			if getCVar(self.SettingsPrefix .. "pitchup") == "-180" then
  1988. 				LocalPlayer.Ang = { self:LocalPlayer():GetAng() }
  1989.  
  1990. 				wait(self:Setting("anti_aim_delay") / 2)
  1991.  
  1992. 				rawcmd(self.SettingsPrefix .. "pitchup 89\n")
  1993.  
  1994. 				wait(self:Setting("anti_aim_delay") / 2)
  1995.  
  1996. 				local NewAngle = { self:LocalPlayer():GetAng() }
  1997.  
  1998. 				self:SetAngle(LocalPlayer.Ang[1], (LocalPlayer.Ang[2] == NewAngle and LocalPlayer.Ang[2] - 180 or LocalPlayer.Ang[2]), 0)
  1999. 			end
  2000. 		end
  2001.  
  2002. 		if getCVar("sensitivity") ~= self.Mouse[1] then
  2003. 			wait(self:Setting("aimbot_mousefix_sleep"))
  2004.  
  2005. 			rawcmd("sensitivity " .. self.Mouse[1] .. ";cl_yawspeed " .. self.Mouse[2] .. "\n")
  2006. 		end	
  2007. 	end
  2008. end
  2009.  
  2010. -- 	###################################
  2011. -- 	#######		  Aimbot	    #######
  2012. -- 	###################################
  2013. SB:CreateSetting("aimbot_enabled", "If set to 1, the Aimbot is enabled.", SB:GetSetting("Aimbot"))
  2014. SB:CreateSetting("aimbot_hold", "Defines the aimbot hold.", SB:GetSetting("AimbotDelay"))
  2015. SB:CreateSetting("aimbot_mode", "Sets the aimbot mode, 0 = Aim Target, 1 = FOV, 2 = FOV and Aim Target.", SB:GetSetting("AimbotMode"))
  2016. SB:CreateSetting("aimbot_fovX", "Defines the X - Field Of View of the aimbot.", SB:GetSetting("AimbotFovX"))
  2017. SB:CreateSetting("aimbot_fovY", "Defines the Y - Field Of View of the aimbot.", SB:GetSetting("AimbotFovY"))
  2018. SB:CreateSetting("aimbot_aimonce", "If set to 1, the Aimbot will only shoot once if you hold down the Aimbot-Key.", SB:GetSetting("AimbotAimOnce"))
  2019. SB:CreateSetting("aimbot_delay", "Defines the delay-time in miliseconds of the Aimbot.", SB:GetSetting("AimbotDelay"))
  2020. SB:CreateSetting("aimbot_friendlyfire", "If set to 1, the Aimbot will shoot at friends.", SB:GetSetting("AimbotFriendlyFire"))
  2021. SB:CreateSetting("aimbot_key", "Defines the Aimbot key.", SB:GetSetting("AimbotKey"))
  2022. SB:CreateSetting("aimbot_autoshoot", "Defines if the aimbot auto-shoots.", SB:GetSetting("AimbotAutoShoot"))
  2023. SB:CreateSetting("aimbot_autoshoot_delay", "Defines the delay of the auto-shoot.", SB:GetSetting("AimbotAutoShootDelay"))
  2024. SB:CreateSetting("aimbot_mousefix", "Defines if the Aimbot-Mousefix is enabled or not.", SB:GetSetting("AimbotMousefix"))
  2025. SB:CreateSetting("aimbot_mousefix_sleep", "Defines the sleep time of the mousefix.", SB:GetSetting("AimbotMousefixSleep"))
  2026. SB:CreateSetting("aimbot_hitbox_pos", "Defines at what hitbox the aimbot should aim at.", SB:GetSetting("AimbotHitboxPos"))
  2027.  
  2028. SB:CreateSetting("enemy_down", "If set to 1, there will be a \"Enemy Down\" radio message every time you kill someone.", SB:GetSetting("EnemyDown"))
  2029. SB:CreateSetting("enemy_down_delay", "Sets the \"Enemy Down\"-Delay.", SB:GetSetting("EnemyDownDelay"))
  2030.  
  2031. --[[SB.HitboxInfo = {
  2032.  
  2033. 	["Pelvis"] = 0,
  2034. 	["Left Thigh"] = 1,
  2035. 	["Left Calf"] = 2,
  2036. 	["Left Foot"] = 3,
  2037. 	["Left Toe"] = 4,
  2038. 	["Right Thigh"] = 5,
  2039. 	["Right Calf"] = 6,
  2040. 	["Right Foot"] = 7,
  2041. 	["Right Toe"] = 8,
  2042. 	["Body"] = 9,
  2043. 	["Torax"] = 10,
  2044. 	["Neck"] = 11,
  2045. 	["Head"] = 12,
  2046. 	["Left Upper Arm"] = 13,
  2047. 	["Left Forearm"] = 14,
  2048. 	["Left Hand"] = 15,
  2049. 	["Right Upper Arm"] = 16,
  2050. 	["Right Forearm"] = 17,
  2051. 	["Right Hand"] = 18
  2052.  
  2053. }]]
  2054.  
  2055. --[[SB.HitboxInfo = {
  2056.  
  2057. 	["Pelvis"],
  2058. 	["Left Thigh"],
  2059. 	["Left Calf"],
  2060. 	["Left Foot"],
  2061. 	["Left Toe"],
  2062. 	["Right Thigh"],
  2063. 	["Right Calf"],
  2064. 	["Right Foot"],
  2065. 	["Right Toe"],
  2066. 	["Body"],
  2067. 	["Torax"],
  2068. 	["Neck"],
  2069. 	["Head"],
  2070. 	["Left Upper Arm"],
  2071. 	["Left Forearm"],
  2072. 	["Left Hand"],
  2073. 	["Right Upper Arm"],
  2074. 	["Right Forearm"],
  2075. 	["Right Hand"]
  2076.  
  2077. }]]
  2078.  
  2079. SB.HitboxInfo = { "Pelvis", "Left Thigh", "Left Calf", "Left Foot", "Left Toe", "Right Thigh", "Right Calf", "Right Foot", "Right Toe", "Body", "Torax", "Neck", "Head", "Left Upper Arm", "Left Forearm", "Left Hand", "Right Upper Arm", "Right Forearm", "Right Hand" }
  2080.  
  2081. SB.Aimed = false
  2082. SB.Mouse = { getCVar("sensitivity"), getCVar("cl_yawspeed") }
  2083.  
  2084. function SB:FindAimbotTarget()
  2085. 	local Target = nil
  2086.  
  2087. 	if self:LocalPlayer():Alive() and SB:Setting("aimbot_enabled") and self:InGame() and not isConVis() then
  2088. 		if not self:HasBannedWeapon() then
  2089. 			if keyDown(self:Setting("aimbot_key")) ~= 0 or self:Setting("aimbot_autoshoot") then
  2090. 				local AimbotMode = self:Setting("aimbot_mode")
  2091.  
  2092. 				if AimbotMode == 0 then
  2093. 					local AT = self:LocalPlayer():AimTarget()
  2094.  
  2095. 					if AT.Index >= 1 and AT.Index <= 64 then
  2096. 						if not self:Setting("aimbot_friendlyfire") then
  2097. 							if AT:Enemy() then
  2098. 								Target = AT
  2099. 							end
  2100. 						else
  2101. 							Target = AT
  2102. 						end
  2103. 					else
  2104. 						Target = nil
  2105. 					end
  2106. 				elseif AimbotMode == 1 then
  2107. 					local X, Y, FT = self:GetFov()
  2108. 					local SX, SY = self:Setting("aimbot_fovX"), self:Setting("aimbot_fovY")
  2109.  
  2110. 					if X < SX and Y < SY and X > -SX and Y > -SY and FT.Index > 0 and FT:Visible() then
  2111. 						if not self:Setting("aimbot_friendlyfire") then
  2112. 							if FT:Enemy() then
  2113. 								Target = FT
  2114. 							end
  2115. 						else
  2116. 							Target = FT
  2117. 						end
  2118. 					else	
  2119. 						Target = nil
  2120. 					end
  2121. 				elseif AimbotMode == 2 then
  2122. 					local X, Y, FT = self:GetFov()
  2123. 					local SX, SY = self:Setting("aimbot_fovX"), self:Setting("aimbot_fovY")
  2124. 					local AT = self:LocalPlayer():AimTarget()
  2125.  
  2126. 					if X < SX and Y < SY and X > -SX and Y > -SY and AT.Index >= 1 and AT.Index <= 64 and FT.Index == AT.Index then
  2127. 						if not self:Setting("aimbot_friendlyfire") then
  2128. 							if AT:Enemy() then
  2129. 								Target = AT
  2130. 							end
  2131. 						else
  2132. 							Target = AT
  2133. 						end
  2134. 					else
  2135. 						Target = nil
  2136. 					end
  2137. 				end
  2138.  
  2139. 				if self:Setting("aimbot_aimonce") and not self:Setting("aimbot_autoshoot") then
  2140. 					if not self.Aimed then
  2141. 						self.AimbotTarget = Target
  2142.  
  2143. 						self.Aimed = true
  2144. 					else
  2145. 						Target = nil
  2146. 					end
  2147. 				else
  2148. 					if Target ~= nil then
  2149. 						self.AimbotTarget = Target
  2150. 					end
  2151. 				end
  2152. 			else
  2153. 				if self:Setting("aimbot_aimonce") then
  2154. 					if self.Aimed then
  2155. 						self.Aimed = false
  2156. 					end
  2157. 				end
  2158. 			end
  2159.  
  2160. 			if not Target then self.AimbotTarget = nil end
  2161.  
  2162. 			if self:Setting("anti_aim") then
  2163. 				if getCVar(self.SettingsPrefix .. "pitchup") == "89" then
  2164. 					local Ang = { self:LocalPlayer():GetAng() }
  2165.  
  2166. 					wait(self:Setting("anti_aim_delay"))
  2167.  
  2168. 					rawcmd(self.SettingsPrefix .. "pitchup -180\n")
  2169. 					self:SetAngle(Ang[1], Ang[2] - 180, 0)
  2170. 				end
  2171. 			end
  2172. 		else
  2173. 			self.AimbotTarget = nil
  2174.  
  2175. 			if self:Setting("anti_aim") then
  2176. 				if getCVar(self.SettingsPrefix .. "pitchup") == "-180" then
  2177. 					local Ang = { self:LocalPlayer():GetAng() }
  2178.  
  2179. 					wait(self:Setting("anti_aim_delay"))
  2180.  
  2181. 					rawcmd(self.SettingsPrefix .. "pitchup 89\n")
  2182.  
  2183. 					self:SetAngle(0, Ang[2] - 180, 0)
  2184. 				end
  2185. 			end
  2186. 		end
  2187. 	else
  2188. 		self.AimbotTarget = nil
  2189. 	end
  2190. end
  2191.  
  2192. function SB:CheckAngle(ang)
  2193. 	if self:Setting("aimbot_mode") == 0 then return true end
  2194.  
  2195. 	if not self:Setting("anti_aim") then
  2196. 		if self:Setting("aimbot_fovX") < 360 and self:Setting("aimbot_fovY") < 360 then
  2197. 			if ang < 90 and ang > -90 then
  2198. 				return true
  2199. 			end
  2200. 		else
  2201. 			return true
  2202. 		end
  2203. 	else
  2204. 		if not (ang > -90 and ang < 90) then
  2205. 			return true
  2206. 		end
  2207. 	end
  2208.  
  2209. 	return false
  2210. end
  2211.  
  2212. function SB:AimbotMain()
  2213. 	local Target = self.AimbotTarget
  2214. 	local LocalPlayer = self:LocalPlayer()
  2215.  
  2216. 	if Target then
  2217. 		LocalPlayer.Pos = { LocalPlayer:GetEyePos() }
  2218. 		LocalPlayer.Ang = { LocalPlayer:GetAng() }
  2219.  
  2220. 		Target.EyePos = { Target:GetHitboxPos(SB:Setting("aimbot_hitbox_pos")) }
  2221. 		Target.Ang = self:CalculateAngle(LocalPlayer.Pos, Target.EyePos)
  2222. 		Target.Delta = { Target.Ang[1] - LocalPlayer.Ang[1], Target.Ang[2] - LocalPlayer.Ang[2] }
  2223. 		Target.Delta[2] = Target.Delta[2] < -180 and 360 + Target.Delta[2] or Target.Delta[2] > 180 and -360 + Target.Delta[2] or Target.Delta[2]
  2224.  
  2225. 		local Angle = { LocalPlayer.Ang[1] + Target.Delta[1], LocalPlayer.Ang[2] +  Target.Delta[2] }
  2226.  
  2227. 		Angle[3] = Angle[2] - LocalPlayer.Ang[2]
  2228.  
  2229. 		if self:CheckAngle(Angle[3]) then
  2230. 			if self:Setting("aimbot_autoshoot") then
  2231. 				rawcmd("+attack\n")
  2232. 			end
  2233.  
  2234. 			if self:Setting("anti_aim") then
  2235. 				rawcmd(self.SettingsPrefix .. "pitchup 89\n")
  2236. 			end
  2237.  
  2238. 			if self:Setting("afk_bot") and self.Spinning then
  2239. 				rawcmd("-lookdown;-lookup;-left;-right\n")
  2240. 			end
  2241.  
  2242. 			if self:Setting("aimbot_mousefix") then
  2243. 				if getCVar("sensitivity") ~= "0.000100" then
  2244. 					rawcmd("sensitivity 0.000100;cl_yawspeed 0\n")
  2245. 				end
  2246. 			end
  2247.  
  2248. 			wait(self:Setting("aimbot_delay") >= 0 and self:Setting("aimbot_delay") or 0)
  2249.  
  2250. 			self:SetAngle(Angle[1], Angle[2])
  2251.  
  2252. 			if self:Setting("aimbot_autoshoot") then
  2253. 				wait(self:Setting("aimbot_autoshoot_delay"))
  2254.  
  2255. 				rawcmd("-attack\n")
  2256. 			end
  2257.  
  2258. 			if self:Setting("aimbot_mousefix") then
  2259. 				if getCVar("sensitivity") ~= self.Mouse[1] then
  2260. 					wait(self:Setting("aimbot_mousefix_sleep"))
  2261.  
  2262. 					rawcmd("sensitivity " .. self.Mouse[1] .. ";cl_yawspeed " .. self.Mouse[2] .. "\n")
  2263. 				end
  2264. 			end
  2265.  
  2266. 			if self:Setting("anti_aim") and LocalPlayer:AimTarget().Index < 1 then
  2267. 				SB:AntiAim("on")
  2268. 			end
  2269.  
  2270. 			if self:Setting("afk_bot") and self.Spinning then
  2271. 				wait(self:Setting("afk_bot_delay"))
  2272.  
  2273. 				local A = { self:LocalPlayer():GetAng() }
  2274.  
  2275. 				self:SetAngle(5, A[2])
  2276. 			end
  2277.  
  2278. 			if self:Setting("enemy_down") then
  2279. 				wait(self:Setting("enemy_down_delay"))
  2280.  
  2281. 				if not Target:Alive() then
  2282. 					rawcmd("radio3;slot9\n")
  2283. 				end
  2284. 			end
  2285. 		end
  2286. 	end
  2287.  
  2288. 	if self:Setting("aimbot_mousefix") then
  2289. 		if getCVar("sensitivity") ~= SB.Mouse[1] then
  2290. 			wait(self:Setting("aimbot_mousefix_sleep"))
  2291.  
  2292. 			rawcmd("sensitivity " .. SB.Mouse[1] .. ";cl_yawspeed " .. SB.Mouse[2] .. "\n")
  2293. 		end
  2294. 	end
  2295. end
  2296.  
  2297. SB:AddLoop("Find Aimbot Target", function() SB:FindAimbotTarget() end)
  2298. SB:AddLoop("Aimbot - Main", function() SB:AimbotMain() end)
  2299.  
  2300. -- 	###################################
  2301. -- 	########	  AFK-Bot       #######
  2302. -- 	###################################
  2303. function OnAfkBotChange()
  2304. 	SB:AFKBot(not SB:Setting("afk_bot") and "off" or "on", true)
  2305. end
  2306.  
  2307. SB:CreateSetting("afk_bot", "If set to 1, AFK-Bot is enabled.", false, { ["Func"] = OnAfkBotChange })
  2308. SB:CreateSetting("afk_bot_yawspeed", "Defines the yawspeed.", 1000)
  2309. SB:CreateSetting("afk_bot_advanced", "If set to 1, it will aim up and down too, to get more targets.", false)
  2310. SB:CreateSetting("afk_bot_delay", "Defines the afk-bot delay.", 20)
  2311.  
  2312. SB.PitchDelay = 0.500
  2313.  
  2314. SB.Spinning = false
  2315.  
  2316. SB.UpDownMode = "up"
  2317.  
  2318. SB.LastUpdated = os.clock()
  2319.  
  2320. function SB:UpdateAFKAngles()
  2321. 	if self.Spinning then rawcmd("+right\n") end
  2322.  
  2323. 	if self.Spinning and (os.clock() + self.PitchDelay) > self.LastUpdated and self:Setting("afk_bot_advanced") then
  2324. 		local A = { self:LocalPlayer():GetAng() }
  2325.  
  2326. 		self:SetAngle(5, A[2])
  2327.  
  2328. 		if self.UpDownMode == "up" then
  2329. 			rawcmd("+lookup;-lookdown\n")
  2330.  
  2331. 			self.UpDownMode = "down"
  2332. 		else
  2333. 			rawcmd("-lookup;+lookdown\n")
  2334.  
  2335. 			self.UpDownMode = "up"
  2336. 		end
  2337.  
  2338. 		--[[math.randomseed(tonumber(tostring(os.clock()):sub(1, 4):reverse()))
  2339.  
  2340. 		self:SetAngle(math.random(-89, 89), A[2])]]
  2341.  
  2342. 		self.LastUpdated = os.clock()
  2343. 	end
  2344. end		
  2345.  
  2346. do
  2347. 	local CVar = function(cvar)
  2348. 		return getCVar(SB.SettingsPrefix .. cvar)
  2349. 	end
  2350.  
  2351. 	SB.AimbotSettings = { 
  2352.  
  2353. 		["Aimbot"] = CVar("aimbot_enabled"),
  2354. 		["AimbotDelay"] = CVar("aimbot_delay"),
  2355. 		["AimbotMode"] = CVar("aimbot_mode"),
  2356. 		["AimbotAutoShoot"] = CVar("aimbot_autoshoot"),
  2357. 		["AimbotMousefix"] = CVar("aimbot_mousefix")
  2358.  
  2359. 	}
  2360.  
  2361. 	SB.OldMouse = { SB.Mouse[1], SB.Mouse[2] }
  2362. end
  2363.  
  2364. function SB:AFKBot(str, con)
  2365. 	if self:Setting("afk_bot") or con then
  2366. 		rawcmd("-lookup;-lookdown\n")
  2367.  
  2368. 		local CVar = function(cvar)
  2369. 			return getCVar(self.SettingsPrefix .. cvar)
  2370. 		end
  2371.  
  2372. 		local Set = function(cvar, var)
  2373. 			setCVar(self.SettingsPrefix .. cvar, tostring(var or 1))
  2374. 		end
  2375.  
  2376. 		if str == "on" and not self.Spinning then
  2377. 			local A = { self:LocalPlayer():GetAng() }
  2378.  
  2379. 			self:SetAngle(5, A[2])
  2380.  
  2381. 			if self:Setting("afk_bot_advanced") then rawcmd(self:Prefix() .. "pitchspeed " .. self:Setting("afk_bot_yawspeed") .. "\n") end
  2382. 			rawcmd("+right\n")
  2383. 			rawcmd("sensitivity 0\n")
  2384. 			rawcmd("cl_yawspeed " .. self:Setting("afk_bot_yawspeed") * 2 .. "\n")
  2385.  
  2386. 			self.Mouse[2] = self:Setting("afk_bot_yawspeed") * 2
  2387. 			self.Mouse[1] = 0
  2388.  
  2389. 			self.Spinning = true
  2390.  
  2391. 			Set("aimbot_enabled", 1)
  2392. 			Set("aimbot_delay", 15)
  2393. 			Set("aimbot_mode", 0)
  2394. 			Set("aimbot_autoshoot", 1)
  2395. 			Set("aimbot_mousefix", 1)
  2396. 		elseif str == "off" and self.Spinning then
  2397. 			self.Mouse[2] = self.OldMouse[2]
  2398. 			self.Mouse[1] = self.OldMouse[1]
  2399.  
  2400. 			rawcmd("-right\n")
  2401. 			rawcmd("sensitivity " .. self.Mouse[1] .. "\n")
  2402. 			rawcmd("cl_yawspeed " .. self.Mouse[2] .. "\n")
  2403.  
  2404. 			self.Spinning = false
  2405.  
  2406. 			Set("aimbot_enabled", self.AimbotSettings["Aimbot"])
  2407. 			Set("aimbot_delay", self.AimbotSettings["AimbotDelay"])
  2408. 			Set("aimbot_mode", self.AimbotSettings["AimbotMode"])
  2409. 			Set("aimbot_autoshoot", self.AimbotSettings["AimbotAuoShoot"])
  2410. 			Set("aimbot_mousefix", self.AimbotSettings["AimbotMousefix"])
  2411. 		end
  2412. 	end
  2413. end
  2414.  
  2415. SB:AddLoop("AFK-Bot", function() SB:UpdateAFKAngles() end)	
  2416.  
  2417. -- 	###################################
  2418. -- 	#######	    Triggerbot      #######
  2419. -- 	###################################
  2420. SB:CreateSetting("triggerbot_enabled", "If set to 1, the Triggerbot is enabled.", SB:GetSetting("Triggerbot"))
  2421. SB:CreateSetting("triggerbot_aim", "If set to 1, Triggerbot-Aim is enabled.", SB:GetSetting("TriggerbotAim"))
  2422. SB:CreateSetting("triggerbot_mousefix", "If set to 1, Triggerbot-Mousefix is enabled.", SB:GetSetting("TriggerbotMousefix"))
  2423. SB:CreateSetting("triggerbot_mousefix_sleep", "Defines the sleep time of the mousefix.", SB:GetSetting("TriggerbotMousefixSleep"))
  2424. SB:CreateSetting("triggerbot_hold", "Defines the Triggerbot-Hold in miliseconds.", SB:GetSetting("TriggerbotHold"))
  2425. SB:CreateSetting("triggerbot_delay", "Defines the Triggerbot-Delay in miliseconds before shooting.", SB:GetSetting("TriggerbotDelay"))
  2426. SB:CreateSetting("triggerbot_key", "Defines the Triggerbot-Key.", SB:GetSetting("TriggerbotKey"))
  2427. SB:CreateSetting("triggerbot_friendlyfire", "If set to 1, the Triggerbot will attack friends.", SB:GetSetting("TriggerbotFriendlyFire"))
  2428. SB:CreateSetting("triggerbot_mode", "Defines the Triggerbot Mode. 0 = Aim Target, 1 = FOV, 2 = Aim Target and FOV.", SB:GetSetting("TriggerbotMode"))
  2429. SB:CreateSetting("triggerbot_fovX", "Defines the Triggerbot Field Of View-X position.", SB:GetSetting("TriggerbotFovX"))
  2430. SB:CreateSetting("triggerbot_fovY", "Defines the Triggerbot Field Of View-Y position.", SB:GetSetting("TriggerbotFovY"))
  2431. SB:CreateSetting("triggerbot_hitbox_pos", "Sets the hitbox position for the triggerbot-aim.", SB:GetSetting("TriggerbotHitboxPos"))
  2432.  
  2433. function SB:FindTriggerbotTarget()
  2434. 	local Target = nil
  2435.  
  2436. 	if self:Setting("triggerbot_enabled") and self:LocalPlayer():Alive() and self:InGame() and keyDown(self:Setting("triggerbot_key")) ~= 0 and not isConVis() and not self:HasBannedWeapon() then
  2437. 		local TriggerbotMode = self:Setting("triggerbot_mode")
  2438.  
  2439. 		if TriggerbotMode == 0 then
  2440. 			local AT = self:LocalPlayer():AimTarget()
  2441.  
  2442. 			if AT.Index >= 1 and AT.Index <= 64 then
  2443. 				if self:Setting("triggerbot_friendlyfire") then
  2444. 					Target = AT
  2445. 				else
  2446. 					if AT:Enemy() then
  2447. 						Target = AT
  2448. 					end
  2449. 				end
  2450. 			end
  2451. 		elseif TriggerbotMode == 1 then
  2452. 			local X, Y, FT = self:GetFov()
  2453. 			local SX, SY = self:Setting("triggerbot_fovX"), self:Setting("triggerbot_fovY")
  2454.  
  2455. 			if X < SX and Y < SY and X > -SX and Y > -SY and FT.Index > 0 and FT:Visible() then
  2456. 				if self:Setting("triggerbot_friendlyfire") then
  2457. 					Target = FT
  2458. 				else
  2459. 					if FT:Enemy() then
  2460. 						Target = FT
  2461. 					end
  2462. 				end
  2463. 			end
  2464. 		elseif TriggerbotMode == 2 then
  2465. 			local X, Y, FT = self:GetFov()
  2466. 			local SX, SY = self:Setting("triggerbot_fovX"), self:Setting("triggerbot_fovY")
  2467. 			local AT = self:LocalPlayer():AimTarget()
  2468.  
  2469. 			if X < SX and Y < SY and X > -SX and Y > -SY and FT.Index == AT.Index then
  2470. 				if self:Setting("triggerbot_friendlyfire") then
  2471. 					Target = AT
  2472. 				else
  2473. 					if AT:Enemy() then
  2474. 						Target = AT
  2475. 					end
  2476. 				end
  2477. 			end
  2478. 		end
  2479. 	end
  2480.  
  2481. 	self.TriggerbotTarget = Target
  2482. end
  2483.  
  2484. function SB:TriggerbotMain()
  2485. 	local Target = self.TriggerbotTarget
  2486. 	local LocalPlayer = self:LocalPlayer()
  2487.  
  2488. 	if Target then
  2489. 		LocalPlayer.Pos = { LocalPlayer:GetEyePos() }
  2490. 		LocalPlayer.Ang = { LocalPlayer:GetAng() }
  2491.  
  2492. 		Target.EyePos = { Target:GetHitboxPos(self:Setting("triggerbot_hitbox_pos")) }
  2493. 		Target.Ang = self:CalculateAngle(LocalPlayer.Pos, Target.EyePos)
  2494. 		Target.Delta = { Target.Ang[1] - LocalPlayer.Ang[1], Target.Ang[2] - LocalPlayer.Ang[2] }
  2495. 		Target.Delta[2] = Target.Delta[2] < -180 and 360 + Target.Delta[2] or Target.Delta[2] > 180 and -360 + Target.Delta[2] or Target.Delta[2]
  2496.  
  2497. 		local Angle = { LocalPlayer.Ang[1] + Target.Delta[1], LocalPlayer.Ang[2] +  Target.Delta[2] }
  2498.  
  2499. 		Angle[3] = Angle[2] - LocalPlayer.Ang[2]
  2500.  
  2501. 		if Angle[3] < 90 and Angle[3] > -90 then
  2502. 			if self:Setting("triggerbot_mousefix") and self:Setting("triggerbot_aim") then
  2503. 				if getCVar("sensitivity") ~= "0.000100" then
  2504. 					rawcmd("sensitivity 0.000100;cl_yawspeed 0\n")
  2505. 				end
  2506. 			end
  2507.  
  2508. 			wait(self:Setting("triggerbot_delay") >= 0 and self:Setting("triggerbot_delay") or 0)
  2509.  
  2510. 			if self:Setting("triggerbot_aim") then
  2511. 				self:SetAngle(Angle[1], Angle[2])
  2512. 			end
  2513.  
  2514. 			rawcmd("+attack\n")
  2515.  
  2516. 			if self:Setting("triggerbot_mousefix") and self:Setting("triggerbot_aim") then
  2517. 				if getCVar("sensitivity") ~= SB.Mouse[1] then
  2518. 					wait(self:Setting("triggerbot_mousefix_sleep"))
  2519.  
  2520. 					rawcmd("sensitivity " .. SB.Mouse[1] .. ";cl_yawspeed " .. SB.Mouse[2] .. "\n")
  2521. 				end
  2522. 			end
  2523.  
  2524. 			wait(self:Setting("triggerbot_hold"))
  2525.  
  2526. 			rawcmd("-attack\n")
  2527.  
  2528. 			wait(self:Setting("triggerbot_hold"))
  2529. 		end
  2530. 	end
  2531.  
  2532. 	if self:Setting("triggerbot_mousefix") then
  2533. 		if getCVar("sensitivity") ~= SB.Mouse[1] then
  2534. 			wait(self:Setting("triggerbot_mousefix_sleep"))
  2535.  
  2536. 			rawcmd("sensitivity " .. SB.Mouse[1] .. ";cl_yawspeed " .. SB.Mouse[2] .. "\n")
  2537. 		end
  2538. 	end
  2539. end
  2540.  
  2541. SB:AddLoop("Find Triggerbot Target", function() SB:FindTriggerbotTarget() end)
  2542. SB:AddLoop("Triggerbot - Main", function() SB:TriggerbotMain() end)
  2543.  
  2544. -- 	###################################
  2545. -- 	#######		 Bunnyhop       #######
  2546. -- 	###################################
  2547. SB:CreateSetting("bunnyhop_enabled", "If set to 1, Bunnyhop is enabled.", SB:GetSetting("Bunnyhop"))
  2548. SB:CreateSetting("bunnyhop_key", "Sets the Bunnyhop-Key to it's value.", SB:GetSetting("BunnyhopKey"))
  2549.  
  2550. SB.BunnyhopTick = 0
  2551. SB.Jumped = false
  2552.  
  2553. function SB:Bunnyhop()
  2554. 	if self:Setting("bunnyhop_enabled") and self:InGame() and self:LocalPlayer():Alive() then
  2555. 		if keyDown(self:Setting("bunnyhop_key")) ~= 0 then
  2556. 			if self.BunnyhopTick >= 10 then
  2557. 				if not self.Jumped then self.Jumped = true end
  2558.  
  2559. 				rawcmd(((self:LocalPlayer():OnGround() or self:LocalPlayer():InWater()) and "+" or "-") .. "jump\n")
  2560.  
  2561. 				self.BunnyhopTick = 0
  2562. 			else
  2563. 				self.BunnyhopTick = self.BunnyhopTick + 1
  2564. 			end
  2565. 		else
  2566. 			if self.Jumped then
  2567. 				rawcmd("-jump\n")
  2568.  
  2569. 				self.Jumped = false
  2570. 				self.BunnyhopTick = 0
  2571. 			end
  2572. 		end
  2573. 	else
  2574. 		if self.Jumped then
  2575. 			rawcmd("-jump\n")
  2576.  
  2577. 			self.Jumped = false
  2578. 			self.BunnyhopTick = 0
  2579. 		end
  2580. 	end
  2581. end
  2582.  
  2583. SB:AddLoop("Bunnyhop", function() SB:Bunnyhop() end)
  2584.  
  2585. -- 	###################################
  2586. -- 	#######		Anti-Recoil     #######
  2587. -- 	###################################
  2588. SB:CreateSetting("antirecoil_enabled", "Anti-Recoil enabled.", SB:GetSetting("AntiRecoil"))
  2589. SB:CreateSetting("antirecoil_key", "Anti-Recoil key.", SB:GetSetting("AntiRecoilKey"))
  2590. SB:CreateSetting("antirecoil_add", "Extra Anti-Recoil Aim-Down", SB:GetSetting("AntiRecoilExtraAimDown"))
  2591.  
  2592. SB.AntiRecoilPerformed = false
  2593.  
  2594. function SB:GetAntiRecoilPitch(weaponID)
  2595. 	local ExtraSpeed = self:Setting("antirecoil_add")
  2596.  
  2597. 	if weaponID == 1 then
  2598. 		return 4.5 + ExtraSpeed
  2599. 	elseif weaponID == 181 or weaponID == 187 or weaponID == 188 then
  2600. 		return 1.2 + ExtraSpeed
  2601. 	elseif weaponID == 183 or weaponID == 179 then
  2602. 		return 2.5 + ExtraSpeed
  2603. 	elseif weaponID == 171 then
  2604. 		return 4.0 + ExtraSpeed
  2605. 	elseif weaponID == 177 then
  2606. 		return 1.0 + ExtraSpeed
  2607. 	elseif weaponID == 189 then
  2608. 		return 3.0 + ExtraSpeed
  2609. 	elseif weaponID == 185 or weaponID == 174 then
  2610. 		return 0.1 + ExtraSpeed
  2611. 	else
  2612. 		return 0.0
  2613. 	end
  2614. end
  2615.  
  2616. if SB:Setting("antirecoil_enabled") then
  2617. 	if getCVar("cl_mouselook") == "0" then
  2618. 		setCVar("cl_mouselook", "1")
  2619. 	end
  2620.  
  2621. 	if not existsCVar(SB:Prefix() .. "mouselook") then
  2622. 		hideCVar("cl_mouselook", SB:Prefix() .. "mouselook")
  2623. 	end
  2624.  
  2625. 	setCVar(SB:Prefix() .. "mouselook", "0")
  2626. end
  2627.  
  2628. function SB:AntiRecoil()
  2629. 	if self:Setting("antirecoil_enabled") and self:LocalPlayer():Alive() and self:InGame() and not isConVis() then
  2630. 		if (keyDown(self:Setting("antirecoil_key")) ~= 0 or (self:Setting("triggerbot_enabled") and keyDown(self:Setting("triggerbot_key")) ~= 0 and self.TriggerbotTarget)) and not self.AntiRecoilPerformed and not self:HasBannedWeapon() then
  2631. 			self.AntiRecoilPerformed = true
  2632.  
  2633. 			local PitchSpeed = self:GetAntiRecoilPitch(self:GetWeaponID())
  2634.  
  2635. 			if getCVar(self:Prefix() .. "pitchspeed") ~= PitchSpeed then
  2636. 				setCVar(self:Prefix() .. "pitchspeed", PitchSpeed)
  2637. 			end
  2638.  
  2639. 			rawcmd("+lookdown\n")
  2640. 		elseif keyDown(self:Setting("antirecoil_key")) == 0 and (self:Setting("triggerbot_enabled") and keyDown(self:Setting("triggerbot_key") == 0 and not self.TriggerbotTarget)) then
  2641. 			if self.AntiRecoilPerformed then 
  2642. 				rawcmd("-lookdown\n")
  2643.  
  2644. 				self.AntiRecoilPerformed = false
  2645. 			end
  2646. 		end
  2647. 	else
  2648. 		if self.AntiRecoilPerformed then 
  2649. 			rawcmd("-lookdown\n")
  2650.  
  2651. 			self.AntiRecoilPerformed = false
  2652. 		end
  2653. 	end
  2654. end
  2655.  
  2656. SB:AddLoop("Anti-Recoil Update", function() SB:AntiRecoil() end)
  2657.  
  2658. -- 	###################################
  2659. -- 	#######		Autopistol      #######
  2660. -- 	###################################
  2661. --[[SB:CreateSetting("autopistol_enabled", "If set to 1, Autopistol is enabled.", true)
  2662. SB:CreateSetting("autopistol_key", "The key you want to use to enable Autopistol.", 1)
  2663. SB:CreateSetting("autopistol_hold", "Defines the hold time of the autopistol-cheat.", 25)
  2664.  
  2665. function SB:Autopistol()
  2666. 	if self:Setting("autopistol_enabled") and self:InGame() and self:LocalPlayer():Alive() and not isConVis() then
  2667. 		if self:GetWeaponSlot() == 2 and keyDown(self:Setting("autopistol_key")) ~= 0 then
  2668. 			rawcmd("+attack\n")
  2669. 			wait(25)
  2670. 			rawcmd("-attack\n")
  2671. 			wait(25)
  2672. 		end
  2673. 	end
  2674. end
  2675.  
  2676. SB:AddLoop("Autopistol", function() SB:Autopistol() end)]]
  2677.  
  2678. -- 	###################################
  2679. -- 	########	Knifebot        #######
  2680. -- 	###################################
  2681. SB:CreateSetting("knifebot_enabled", "If set to 1, the Knifebot is enabled.", SB:GetSetting("Knifebot"))
  2682. SB:CreateSetting("knifebot_key", "Knifebot-Key, set to nil to set it always on.", SB:GetSetting("KnifebotKey"))
  2683.  
  2684. function SB:Knifebot()
  2685. 	if self:Setting("knifebot_enabled") and self:InGame() and self:LocalPlayer():Alive() and not isConVis() then
  2686. 		local Target = self:LocalPlayer():AimTarget()
  2687.  
  2688. 		if Target.Index > 0 and Target.Index <= 64 and Target:Enemy() and keyDown(self:Setting("knifebot_key")) ~= 0 then
  2689. 			if Target:Distance() <= 60 and self:GetWeaponID() == 73 then
  2690. 				rawcmd("+attack2\n")
  2691.  
  2692. 				wait(25)
  2693.  
  2694. 				rawcmd("-attack2\n")
  2695.  
  2696. 				wait(25)
  2697. 			end
  2698. 		end
  2699. 	end
  2700. end
  2701.  
  2702. SB:AddLoop("Knifebot", function() SB:Knifebot() end)
  2703.  
  2704. -- 	###################################
  2705. -- 	########	 Speedhack      #######
  2706. -- 	###################################
  2707. SB:CreateSetting("speedhack_enabled", "If set to 1, Speedhack will enable if you press the Speedhack-Key.", SB:GetSetting("Speedhack"))
  2708. SB:CreateSetting("speedhack_key", "Defines the Speedhack-Key.", SB:GetSetting("SpeedhackKey"))
  2709. SB:CreateSetting("speedhack_speed", "Defines the Speedhack-Key.", SB:GetSetting("SpeedhackSpeed"))
  2710.  
  2711. SB:HideCmd("host_framerate", "framerate", "0")
  2712.  
  2713. function SB:Speedhack()
  2714. 	if self:Setting("speedhack_enabled") and self:LocalPlayer():Alive() and self:InGame() and not isConVis() then
  2715. 		if keyDown(self:Setting("speedhack_key")) ~= 0 then
  2716. 			if tonumber(getCVar(self:Prefix() .. "framerate")) ~= tonumber(self:Setting("speedhack_speed")) then
  2717. 				setCVar(self:Prefix() .. "framerate", self:Setting("speedhack_speed"))
  2718. 			end
  2719. 		else
  2720. 			if tonumber(getCVar(self:Prefix() .. "framerate")) ~= 0 then
  2721. 				setCVar(self:Prefix() .. "framerate", 0)
  2722. 			end
  2723. 		end
  2724. 	else
  2725. 		if tonumber(getCVar(self:Prefix() .. "framerate")) ~= 0 then
  2726. 			setCVar(self:Prefix() .. "framerate", 0)
  2727. 		end
  2728. 	end
  2729. end
  2730.  
  2731. SB:AddLoop("Speedhack", function() SB:Speedhack() end)
  2732.  
  2733. -- 	###################################
  2734. -- 	#######	   Menu Items       #######
  2735. -- 	###################################
  2736. do
  2737. 	local function GetMenuVar(var)
  2738. 		local re = getCVar((SB.SettingsPrefix or "") .. var)
  2739.  
  2740. 		if type(tonumber(re)) == "number" then return tonumber(re) end
  2741.  
  2742. 		return re
  2743. 	end
  2744.  
  2745. 	local function SetMenuVar(var, set)
  2746. 		setCVar((SB.SettingsPrefix or "") .. var, set)
  2747. 	end
  2748.  
  2749. 	local function GetStringForKey(key)
  2750. 		if key == 1 then return "mouse1"
  2751. 		elseif key == 2 then return "mouse2"
  2752. 		elseif key == 3 then return "mouse3"
  2753. 		elseif key == 5 then return "mouse4"
  2754. 		elseif key == 6 then return "mouse5"
  2755. 		elseif key == 32 then return "space"
  2756. 		elseif key == 70 then return "F"
  2757. 		elseif key == 69 then return "E" end
  2758. 	end
  2759.  
  2760. 	local function GetKeyForString(key)
  2761. 		if key == "mouse1" then return 1
  2762. 		elseif key == "mouse2" then return 2
  2763. 		elseif key == "mouse3" then return 3
  2764. 		elseif key == "mouse4" then return 5
  2765. 		elseif key == "mouse5" then return 6
  2766. 		elseif key == "space" then return 32
  2767. 		elseif key == "F" then return 70 
  2768. 		elseif key == "E" then return 69 end
  2769. 	end
  2770.  
  2771. 	-- [[Aimbot]]
  2772. 	Aimbot = Menu:new("Aimbot")
  2773.  
  2774. 	AimbotEnabled = Aimbot:new("Enabled [" .. GetMenuVar("aimbot_enabled") .. "]", function()
  2775. 		if tostring(GetMenuVar("aimbot_enabled")) == "1" then
  2776. 			SetMenuVar("aimbot_enabled", "0")
  2777. 		else
  2778. 			SetMenuVar("aimbot_enabled", "1")
  2779. 		end
  2780.  
  2781. 		AimbotEnabled.label = "Enabled [" .. GetMenuVar("aimbot_enabled") .. "]"
  2782. 	end)
  2783.  
  2784. 	AimbotAimOnce = Aimbot:new("Aim Once [" .. GetMenuVar("aimbot_aimonce") .. "]", function()
  2785. 		if tonumber(GetMenuVar("aimbot_aimonce")) == 1 then
  2786. 			SetMenuVar("aimbot_aimonce", "0")
  2787. 		else
  2788. 			SetMenuVar("aimbot_aimonce", "1")
  2789. 		end
  2790.  
  2791. 		AimbotAimOnce.label = "Aim Once [" .. GetMenuVar("aimbot_aimonce") .. "]"
  2792. 	end)
  2793.  
  2794. 	AimbotFriendlyFire = Aimbot:new("Friendly Fire [" .. GetMenuVar("aimbot_friendlyfire") .. "]", function()
  2795. 		if tonumber(GetMenuVar("aimbot_friendlyfire")) == 0 then
  2796. 			SetMenuVar("aimbot_friendlyfire", "1")
  2797. 		else
  2798. 			SetMenuVar("aimbot_friendlyfire", "0")
  2799. 		end
  2800. 	end)
  2801.  
  2802. 	AimbotDelay = Aimbot:new("Delay [" .. GetMenuVar("aimbot_delay") .. "]")
  2803.  
  2804. 	AimbotDelay:new("+1", function()
  2805. 		SetMenuVar("aimbot_delay", GetMenuVar("aimbot_delay") + 1)
  2806.  
  2807. 		AimbotDelay.label = "Delay [" .. GetMenuVar("aimbot_delay") .. "]"
  2808. 	end)
  2809.  
  2810. 	AimbotDelay:new("+10", function()
  2811. 		SetMenuVar("aimbot_delay", GetMenuVar("aimbot_delay") + 10)
  2812.  
  2813. 		AimbotDelay.label = "Delay [" .. GetMenuVar("aimbot_delay") .. "]"
  2814. 	end)
  2815.  
  2816. 	AimbotDelay:new("-1", function()
  2817. 		if GetMenuVar("aimbot_delay") - 1 >= 1 then
  2818. 			SetMenuVar("aimbot_delay", GetMenuVar("aimbot_delay") - 1)
  2819.  
  2820. 			AimbotDelay.label = "Delay [" .. GetMenuVar("aimbot_delay") .. "]"
  2821. 		end
  2822. 	end)
  2823.  
  2824. 	AimbotDelay:new("-10", function()
  2825. 		if GetMenuVar("aimbot_delay") - 10 >= 1 then
  2826. 			SetMenuVar("aimbot_delay", GetMenuVar("aimbot_delay") - 10)
  2827.  
  2828. 			AimbotDelay.label = "Delay [" .. GetMenuVar("aimbot_delay") .. "]"
  2829. 		end
  2830. 	end)
  2831.  
  2832. 	AimbotKey = Aimbot:new("Key [" .. GetStringForKey(GetMenuVar("aimbot_key")) .. "]")
  2833.  
  2834. 	AimbotKey:new("Mouse1", function()
  2835. 		SetMenuVar("aimbot_key", GetKeyForString("mouse1"))
  2836.  
  2837. 		AimbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("aimbot_key")) .. "]"
  2838. 	end)
  2839.  
  2840. 	AimbotKey:new("Mouse2", function()
  2841. 		SetMenuVar("aimbot_key", GetKeyForString("mouse2"))
  2842.  
  2843. 		AimbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("aimbot_key")) .. "]"
  2844. 	end)
  2845.  
  2846. 	AimbotKey:new("Mouse3", function()
  2847. 		SetMenuVar("aimbot_key", GetKeyForString("mouse3"))
  2848.  
  2849. 		AimbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("aimbot_key")) .. "]"
  2850. 	end)
  2851.  
  2852. 	AimbotKey:new("Mouse4", function()
  2853. 		SetMenuVar("aimbot_key", GetKeyForString("mouse4"))
  2854.  
  2855. 		AimbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("aimbot_key")) .. "]"
  2856. 	end)
  2857.  
  2858. 	AimbotKey:new("Mouse5", function()
  2859. 		SetMenuVar("aimbot_key", GetKeyForString("mouse5"))
  2860.  
  2861. 		AimbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("aimbot_key")) .. "]"
  2862. 	end)
  2863.  
  2864. 	AimbotMouseFix = Aimbot:new("Mouse Fix")
  2865.  
  2866. 	AimbotMouseFixEnabled = AimbotMouseFix:new("Enabled [" .. GetMenuVar("aimbot_mousefix") .. "]", function()
  2867. 		if tonumber(GetMenuVar("aimbot_mousefix")) == 1 then
  2868. 			SetMenuVar("aimbot_mousefix", "0")
  2869. 		else
  2870. 			SetMenuVar("aimbot_mousefix", "1")
  2871. 		end
  2872.  
  2873. 		AimbotMouseFixEnabled.label = "Enabled [" .. GetMenuVar("aimbot_mousefix") .. "]"
  2874. 	end)
  2875.  
  2876. 	AimbotMouseFixSleep = AimbotMouseFix:new("Sleep [" .. GetMenuVar("aimbot_mousefix_sleep") .. "]")
  2877.  
  2878. 	AimbotMouseFixSleep_Plus1 = AimbotMouseFixSleep:new("+1", function()
  2879. 		SetMenuVar("aimbot_mousefix_sleep", GetMenuVar("aimbot_mousefix_sleep") + 1)
  2880.  
  2881. 		AimbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("aimbot_mousefix_sleep") .. "]"
  2882. 	end)
  2883.  
  2884. 	AimbotMouseFixSleep_Plus10 = AimbotMouseFixSleep:new("+10", function()
  2885. 		SetMenuVar("aimbot_mousefix_sleep", GetMenuVar("aimbot_mousefix_sleep") + 10)
  2886.  
  2887. 		AimbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("aimbot_mousefix_sleep") .. "]"
  2888. 	end)
  2889.  
  2890. 	AimbotMouseFixSleep_Minus1 = AimbotMouseFixSleep:new("-1", function()
  2891. 		if GetMenuVar("aimbot_mousefix_sleep") - 1 >= 1 then
  2892. 			SetMenuVar("aimbot_mousefix_sleep", GetMenuVar("aimbot_mousefix_sleep") - 1)
  2893.  
  2894. 			AimbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("aimbot_mousefix_sleep") .. "]"
  2895. 		end
  2896. 	end)
  2897.  
  2898. 	AimbotMouseFixSleep_Minus10 = AimbotMouseFixSleep:new("-10", function()
  2899. 		if GetMenuVar("aimbot_mousefix_sleep") - 10 >= 1 then
  2900. 			SetMenuVar("aimbot_mousefix_sleep", GetMenuVar("aimbot_mousefix_sleep") - 10)
  2901.  
  2902. 			AimbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("aimbot_mousefix_sleep") .. "]"
  2903. 		end
  2904. 	end)
  2905.  
  2906. 	AimbotMode = Aimbot:new("Mode [" .. GetMenuVar("aimbot_mode") .. "]")
  2907.  
  2908. 	AimbotMode0 = AimbotMode:new("0", function()
  2909. 		SetMenuVar("aimbot_mode", "0")
  2910.  
  2911. 		AimbotMode.label = "Mode [" .. GetMenuVar("aimbot_mode") .. "]"
  2912. 	end)
  2913.  
  2914. 	AimbotMode1 = AimbotMode:new("1", function()
  2915. 		SetMenuVar("aimbot_mode", "1")
  2916.  
  2917. 		AimbotMode.label = "Mode [" .. GetMenuVar("aimbot_mode") .. "]"
  2918. 	end)
  2919.  
  2920. 	AimbotMode2 = AimbotMode:new("2", function()
  2921. 		SetMenuVar("aimbot_mode", "2")
  2922.  
  2923. 		AimbotMode.label = "Mode [" .. GetMenuVar("aimbot_mode") .. "]"
  2924. 	end)
  2925.  
  2926. 	AimbotMode3 = AimbotMode:new("3", function()
  2927. 		SetMenuVar("aimbot_mode", "3")
  2928.  
  2929. 		AimbotMode.label = "Mode [" .. GetMenuVar("aimbot_mode") .. "]"
  2930. 	end)
  2931.  
  2932. 	AimbotMode4 = AimbotMode:new("4", function()
  2933. 		SetMenuVar("aimbot_mode", "4")
  2934.  
  2935. 		AimbotMode.label = "Mode [" .. GetMenuVar("aimbot_mode") .. "]"
  2936. 	end)
  2937.  
  2938. 	AimbotHold = Aimbot:new("Hold [" .. GetMenuVar("aimbot_hold") .. "]")
  2939.  
  2940. 	AimbotHold_Plus1 = AimbotHold:new("+1", function()
  2941. 		SetMenuVar("aimbot_hold", GetMenuVar("aimbot_hold") + 1)
  2942.  
  2943. 		AimbotHold.label = "Hold [" .. GetMenuVar("aimbot_hold") .. "]"
  2944. 	end)
  2945.  
  2946. 	AimbotHold_Plus10 = AimbotHold:new("+10", function()
  2947. 		SetMenuVar("aimbot_hold", GetMenuVar("aimbot_hold") + 10)
  2948.  
  2949. 		AimbotHold.label = "Hold [" .. GetMenuVar("aimbot_hold") .. "]"
  2950. 	end)
  2951.  
  2952. 	AimbotHold_Minus1 = AimbotHold:new("-1", function()
  2953. 		if GetMenuVar("aimbot_hold") - 1 >= 1 then
  2954. 			SetMenuVar("aimbot_hold", GetMenuVar("aimbot_hold") - 1)
  2955.  
  2956. 			AimbotHold.label = "Hold [" .. GetMenuVar("aimbot_hold") .. "]"
  2957. 		end
  2958. 	end)
  2959.  
  2960. 	AimbotHold_Minus10 = AimbotHold:new("-10", function()
  2961. 		if GetMenuVar("aimbot_hold") - 10 >= 1 then
  2962. 			SetMenuVar("aimbot_hold", GetMenuVar("aimbot_hold") - 10)
  2963.  
  2964. 			AimbotHold.label = "Hold [" .. GetMenuVar("aimbot_hold") .. "]"
  2965. 		end
  2966. 	end)
  2967.  
  2968. 	AimbotAutoShoot = Aimbot:new("Auto-Shoot")
  2969.  
  2970. 	AimbotAutoShootEnabled = AimbotAutoShoot:new("Enabled [" .. GetMenuVar("aimbot_autoshoot") .. "]", function()
  2971. 		if tostring(GetMenuVar("aimbot_autoshoot")) == "0" then
  2972. 			SetMenuVar("aimbot_autoshoot", "1")
  2973. 		else
  2974. 			SetMenuVar("aimbot_autoshoot", "0")
  2975. 		end
  2976.  
  2977. 		AimbotAutoShootEnabled.label = "Enabled [" .. GetMenuVar("aimbot_autoshoot") .. "]"
  2978. 	end)
  2979.  
  2980. 	AimbotAutoShootDelay = AimbotAutoShoot:new("Delay [" .. GetMenuVar("aimbot_autoshoot_delay") .. "ms]")
  2981.  
  2982. 	AimbotAutoShootDelay_Plus1 = AimbotAutoShootDelay:new("+1", function()
  2983. 		SetMenuVar("aimbot_autoshoot_delay", GetMenuVar("aimbot_autoshoot_delay") + 1)
  2984.  
  2985. 		AimbotAutoShootDelay.label = "Delay [" .. GetMenuVar("aimbot_autoshoot_delay") .. "ms]"
  2986. 	end)
  2987.  
  2988. 	AimbotAutoShootDelay_Plus10 = AimbotAutoShootDelay:new("+10", function()
  2989. 		SetMenuVar("aimbot_autoshoot_delay", GetMenuVar("aimbot_autoshoot_delay") + 10)
  2990.  
  2991. 		AimbotAutoShootDelay.label = "Delay [" .. GetMenuVar("aimbot_autoshoot_delay") .. "ms]"
  2992. 	end)
  2993.  
  2994. 	AimbotAutoShootDelay_Minus1 = AimbotAutoShootDelay:new("-1", function()
  2995. 		if GetMenuVar("aimbot_autoshoot_delay") - 1 >= 1 then
  2996. 			SetMenuVar("aimbot_autoshoot_delay", GetMenuVar("aimbot_autoshoot_delay") - 1)
  2997.  
  2998. 			AimbotAutoShootDelay.label = "Delay [" .. GetMenuVar("aimbot_autoshoot_delay") .. "ms]"
  2999. 		end
  3000. 	end)
  3001.  
  3002. 	AimbotAutoShootDelay_Minus10 = AimbotAutoShootDelay:new("-10", function()
  3003. 		if GetMenuVar("aimbot_autoshoot_delay") - 10 >= 1 then
  3004. 			SetMenuVar("aimbot_autoshoot_delay", GetMenuVar("aimbot_autoshoot_delay") - 10)
  3005.  
  3006. 			AimbotAutoShootDelay.label = "Delay [" .. GetMenuVar("aimbot_autoshoot_delay") .. "ms]"
  3007. 		end
  3008. 	end)
  3009.  
  3010. 	AimbotFov = Aimbot:new("Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]")
  3011. 	AimbotFovX = AimbotFov:new("X")
  3012.  
  3013. 	AimbotFovX_Plus1 = AimbotFovX:new("+1", function()
  3014. 		SetMenuVar("aimbot_fovX", GetMenuVar("aimbot_fovX") + 1)
  3015.  
  3016. 		AimbotFov.label = "Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]"
  3017. 	end)
  3018.  
  3019. 	AimbotFovX_Plus10 = AimbotFovX:new("+10", function()
  3020. 		SetMenuVar("aimbot_fovX", GetMenuVar("aimbot_fovX") + 10)
  3021.  
  3022. 		AimbotFov.label = "Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]"
  3023. 	end)
  3024.  
  3025. 	AimbotFovX_Minus1 = AimbotFovX:new("-1", function()
  3026. 		SetMenuVar("aimbot_fovX", GetMenuVar("aimbot_fovX") - 1)
  3027.  
  3028. 		AimbotFov.label = "Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]"
  3029. 	end)
  3030.  
  3031. 	AimbotFovX_Minus10 = AimbotFovX:new("-10", function()
  3032. 		SetMenuVar("aimbot_fovX", GetMenuVar("aimbot_fovX") - 10)
  3033.  
  3034. 		AimbotFov.label = "Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]"
  3035. 	end)
  3036.  
  3037. 	AimbotFovY = AimbotFov:new("Y")
  3038.  
  3039. 	AimbotFovY_Plus1 = AimbotFovY:new("+1", function()
  3040. 		SetMenuVar("aimbot_fovY", GetMenuVar("aimbot_fovY") + 1)
  3041.  
  3042. 		AimbotFov.label = "Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]"
  3043. 	end)
  3044.  
  3045. 	AimbotFovY_Plus10 = AimbotFovY:new("+10", function()
  3046. 		SetMenuVar("aimbot_fovY", GetMenuVar("aimbot_fovY") + 10)
  3047.  
  3048. 		AimbotFov.label = "Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]"
  3049. 	end)
  3050.  
  3051. 	AimbotFovY_Minus1 = AimbotFovY:new("-1", function()
  3052. 		SetMenuVar("aimbot_fovY", GetMenuVar("aimbot_fovY") - 1)
  3053.  
  3054. 		AimbotFov.label = "Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]"
  3055. 	end)
  3056.  
  3057. 	AimbotFovY_Minus10 = AimbotFovY:new("-10", function()
  3058. 		SetMenuVar("aimbot_fovY", GetMenuVar("aimbot_fovY") - 10)
  3059.  
  3060. 		AimbotFov.label = "Aimbot Fov [" .. GetMenuVar("aimbot_fovX") .. ", " .. GetMenuVar("aimbot_fovY") .. "]"
  3061. 	end)
  3062.  
  3063. 	-- Aimbot Hitbox Pos
  3064. 	AimbotHitboxPos = Aimbot:new("Hitbox Position [" .. SB.HitboxInfo[SB:Setting("aimbot_hitbox_pos")] .. "]")
  3065.  
  3066. 	SB.MenuHitboxTable = {}
  3067.  
  3068. 	for k, v in pairs(SB.HitboxInfo) do
  3069. 		SB.MenuHitboxTable[k] = AimbotHitboxPos:new(v, function()
  3070. 			SetMenuVar("aimbot_hitbox_pos", k)
  3071.  
  3072. 			AimbotHitboxPos.label = "Hitbox Position [" .. SB.HitboxInfo[k] .. "]"
  3073. 		end)
  3074. 	end
  3075.  
  3076. 	-- [[Triggerbot]]
  3077. 	Triggerbot = Menu:new("Triggerbot")
  3078.  
  3079. 	TriggerbotEnabled = Triggerbot:new("Enabled [" .. GetMenuVar("triggerbot_enabled") .. "]", function()
  3080. 		if tonumber(GetMenuVar("triggerbot_enabled")) == 1 then	
  3081. 			SetMenuVar("triggerbot_enabled", "0")
  3082. 		else
  3083. 			SetMenuVar("triggerbot_enabled", "1")
  3084. 		end
  3085.  
  3086. 		TriggerbotEnabled.label = "Enabled [" .. GetMenuVar("triggerbot_enabled") .. "]"
  3087. 	end)
  3088.  
  3089. 	TriggerbotFriendlyFire = Triggerbot:new("Friendly Fire [" .. GetMenuVar("triggerbot_friendlyfire") .. "]", function()
  3090. 		if tonumber(GetMenuVar("triggerbot_friendlyfire")) == 1 then
  3091. 			SetMenuVar("triggerbot_friendlyfire", "0")
  3092. 		else
  3093. 			SetMenuVar("triggerbot_friendlyfire", "1")
  3094. 		end
  3095.  
  3096. 		TriggerbotFriendlyFire.label = "Friendly Fire [" .. GetMenuVar("triggerbot_friendlyfire") .. "]"
  3097. 	end)
  3098.  
  3099. 	TriggerbotAim = Triggerbot:new("Aim [" .. GetMenuVar("triggerbot_aim") .. "]", function()
  3100. 		if tonumber(GetMenuVar("triggerbot_aim")) == 1 then
  3101. 			SetMenuVar("triggerbot_aim", "0")
  3102. 		else
  3103. 			SetMenuVar("triggerbot_aim", "1")
  3104. 		end
  3105.  
  3106. 		TriggerbotAim.label = "Aim [" .. GetMenuVar("triggerbot_aim") .. "]"
  3107. 	end)
  3108.  
  3109. 	TriggerbotMouseFix = Triggerbot:new("Mouse Fix")
  3110.  
  3111. 	TriggerbotMouseFixEnabled = TriggerbotMouseFix:new("Enabled [" .. GetMenuVar("triggerbot_enabled") .. "]", function()
  3112. 		if tonumber(GetMenuVar("triggerbot_mousefix")) == 1 then
  3113. 			SetMenuVar("triggerbot_mousefix", "0")
  3114. 		else
  3115. 			SetMenuVar("triggerbot_mousefix", "1")
  3116. 		end
  3117.  
  3118. 		TriggerbotMouseFixEnabled.label = "Enabled [" .. GetMenuVar("triggerbot_enabled") .. "]"
  3119. 	end)
  3120.  
  3121. 	TriggerbotMouseFixSleep = TriggerbotMouseFix:new("Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]")
  3122.  
  3123. 	TriggerbotMouseFixSleep_Plus1 = TriggerbotMouseFixSleep:new("+1", function()
  3124. 		SetMenuVar("triggerbot_mousefix_sleep", GetMenuVar("triggerbot_mousefix_sleep") + 1)
  3125.  
  3126. 		TriggerbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]"
  3127. 	end)
  3128.  
  3129. 	TriggerbotMouseFixSleep_Plus10 = TriggerbotMouseFixSleep:new("+10", function()
  3130. 		SetMenuVar("triggerbot_mousefix_sleep", GetMenuVar("triggerbot_mousefix_sleep") + 10)
  3131.  
  3132. 		TriggerbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]"
  3133. 	end)
  3134.  
  3135. 	TriggerbotMouseFixSleep_Minus1 = TriggerbotMouseFixSleep:new("-1", function()
  3136. 		if GetMenuVar("triggerbot_mousefix_sleep") - 1 >= 1 then
  3137. 			SetMenuVar("triggerbot_mousefix_sleep", GetMenuVar("triggerbot_mousefix_sleep") - 1)
  3138.  
  3139. 			TriggerbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]"
  3140. 		end
  3141. 	end)
  3142.  
  3143. 	TriggerbotMouseFixSleep_Minus10 = TriggerbotMouseFixSleep:new("-10", function()
  3144. 		if GetMenuVar("triggerbot_mousefix_sleep") - 10 >= 1 then
  3145. 			SetMenuVar("triggerbot_mousefix_sleep", GetMenuVar("triggerbot_mousefix_sleep") - 10)
  3146.  
  3147. 			TriggerbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]"
  3148. 		end
  3149. 	end)
  3150.  
  3151. 	TriggerbotHold = Triggerbot:new("Hold [" .. GetMenuVar("triggerbot_hold") .. "]")
  3152.  
  3153. 	TriggerHold_Plus1 = TriggerbotHold:new("+1", function()
  3154. 		SetMenuVar("triggerbot_hold", GetMenuVar("triggerbot_hold") + 1)
  3155.  
  3156. 		TriggerbotHold.label = "Hold [" .. GetMenuVar("triggerbot_hold") .. "]"
  3157. 	end)
  3158.  
  3159. 	TriggerbotHold_Plus10 = TriggerbotHold:new("+10", function()
  3160. 		SetMenuVar("triggerbot_hold", GetMenuVar("triggerbot_hold") + 10)
  3161.  
  3162. 		TriggerbotHold.label = "Hold [" .. GetMenuVar("triggerbot_hold") .. "]"
  3163. 	end)
  3164.  
  3165. 	TriggerbotHold_Minus1 = TriggerbotHold:new("-1", function()
  3166. 		if GetMenuVar("triggerbot_hold") - 1 >= 1 then
  3167. 			SetMenuVar("triggerbot_hold", GetMenuVar("triggerbot_hold") - 1)
  3168.  
  3169. 			TriggerbotHold.label = "Hold [" .. GetMenuVar("triggerbot_hold") .. "]"
  3170. 		end
  3171. 	end)
  3172.  
  3173. 	TriggerbotHold_Minus10 = TriggerbotHold:new("-10", function()
  3174. 		if GetMenuVar("triggerbot_hold") - 10 >= 1 then
  3175. 			SetMenuVar("triggerbot_hold", GetMenuVar("triggerbot_hold") - 10)
  3176.  
  3177. 			TriggerbotHold.label = "Hold [" .. GetMenuVar("triggerbot_hold") .. "]"
  3178. 		end
  3179. 	end)
  3180.  
  3181. 	TriggerbotDelay = Triggerbot:new("Delay [" .. GetMenuVar("triggerbot_delay") .. "]")
  3182.  
  3183. 	TriggerbotDelay_Plus1 = TriggerbotDelay:new("+1", function()
  3184. 		SetMenuVar("triggerbot_delay", GetMenuVar("triggerbot_hold") + 1)
  3185.  
  3186. 		TriggerbotDelay.label = "Delay [" .. GetMenuVar("triggerbot_delay") .. "]"
  3187. 	end)
  3188.  
  3189. 	TriggerbotDelay_Plus10 = TriggerbotDelay:new("+10", function()
  3190. 		SetMenuVar("triggerbot_delay", GetMenuVar("triggerbot_delay") + 10)
  3191.  
  3192. 		TriggerbotDelay.label = "Delay [" .. GetMenuVar("triggerbot_delay") .. "]"
  3193. 	end)
  3194.  
  3195. 	TriggerbotDelay_Minus1 = TriggerbotDelay:new("-1", function()
  3196. 		if GetMenuVar("triggerbot_delay") - 1 >= 1 then
  3197. 			SetMenuVar("triggerbot_delay", GetMenuVar("triggerbot_delay") - 1)
  3198.  
  3199. 			TriggerbotDelay.label = "Delay [" .. GetMenuVar("triggerbot_delay") .. "]"
  3200. 		end
  3201. 	end)
  3202.  
  3203. 	TriggerbotDelay_Minus10 = TriggerbotDelay:new("-10", function()
  3204. 		if GetMenuVar("triggerbot_delay") - 10 >= 1 then
  3205. 			SetMenuVar("triggerbot_delay", GetMenuVar("triggerbot_delay") - 10)
  3206.  
  3207. 			TriggerbotDelay.label = "Delay [" .. GetMenuVar("triggerbot_delay") .. "]"
  3208. 		end
  3209. 	end)
  3210.  
  3211. 	TriggerbotMode = Triggerbot:new("Mode [" .. GetMenuVar("triggerbot_mode") .. "]")
  3212.  
  3213. 	TriggerbotMode0 = TriggerbotMode:new("0", function()
  3214. 		SetMenuVar("triggerbot_mode", "0")
  3215.  
  3216. 		TriggerbotMode.label = "Mode [" .. GetMenuVar("triggerbot_mode") .. "]"
  3217. 	end)
  3218.  
  3219. 	TriggerbotMode1 = TriggerbotMode:new("1", function()
  3220. 		SetMenuVar("triggerbot_mode", "1")
  3221.  
  3222. 		TriggerbotMode.label = "Mode [" .. GetMenuVar("triggerbot_mode") .. "]"
  3223. 	end)
  3224.  
  3225. 	TriggerbotMode2 = TriggerbotMode:new("2", function()
  3226. 		SetMenuVar("triggerbot_mode", "2")
  3227.  
  3228. 		TriggerbotMode.label = "Mode [" .. GetMenuVar("triggerbot_mode") .. "]"
  3229. 	end)
  3230.  
  3231. 	TriggerbotMode3 = TriggerbotMode:new("3", function()
  3232. 		SetMenuVar("triggerbot_mode", "3")
  3233.  
  3234. 		TriggerbotMode.label = "Mode [" .. GetMenuVar("triggerbot_mode") .. "]"
  3235. 	end)
  3236.  
  3237. 	TriggerbotMode4 = TriggerbotMode:new("4", function()
  3238. 		SetMenuVar("triggerbot_mode", "4")
  3239.  
  3240. 		TriggerbotMode.label = "Mode [" .. GetMenuVar("triggerbot_mode") .. "]"
  3241. 	end)
  3242.  
  3243. 	TriggerbotMouseFix = Triggerbot:new("Mouse Fix")
  3244.  
  3245. 	TriggerbotMouseFixEnabled = TriggerbotMouseFix:new("Enabled [" .. GetMenuVar("triggerbot_mousefix") .. "]", function()
  3246. 		if tonumber(GetMenuVar("triggerbot_mousefix")) == 1 then
  3247. 			SetMenuVar("triggerbot_mousefix", "0")
  3248. 		else
  3249. 			SetMenuVar("triggerbot_mousefix", "1")
  3250. 		end
  3251.  
  3252. 		TriggerbotMouseFixEnabled.label = "Enabled [" .. GetMenuVar("triggerbot_mousefix") .. "]"
  3253. 	end)
  3254.  
  3255. 	TriggerbotMouseFixSleep = TriggerbotMouseFix:new("Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]")
  3256.  
  3257. 	TriggerbotMouseFixSleep_Plus1 = TriggerbotMouseFixSleep:new("+1", function()
  3258. 		SetMenuVar("triggerbot_mousefix_sleep", GetMenuVar("triggerbot_mousefix_sleep") + 1)
  3259.  
  3260. 		TriggerbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]"
  3261. 	end)
  3262.  
  3263. 	TriggerbotMouseFixSleep_Plus10 = TriggerbotMouseFixSleep:new("+10", function()
  3264. 		SetMenuVar("triggerbot_mousefix_sleep", GetMenuVar("triggerbot_mousefix_sleep") + 10)
  3265.  
  3266. 		TriggerbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]"
  3267. 	end)
  3268.  
  3269. 	TriggerbotMouseFixSleep_Minus1 = TriggerbotMouseFixSleep:new("-1", function()
  3270. 		if GetMenuVar("triggerbot_mousefix_sleep") - 1 >= 1 then
  3271. 			SetMenuVar("triggerbot_mousefix_sleep", GetMenuVar("triggerbot_mousefix_sleep") - 1)
  3272.  
  3273. 			TriggerbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]"
  3274. 		end
  3275. 	end)
  3276.  
  3277. 	TriggerbotMouseFixSleep_Minus10 = TriggerbotMouseFixSleep:new("-10", function()
  3278. 		if GetMenuVar("triggerbot_mousefix_sleep") - 10 >= 1 then
  3279. 			SetMenuVar("triggerbot_mousefix_sleep", GetMenuVar("triggerbot_mousefix_sleep") - 10)
  3280.  
  3281. 			TriggerbotMouseFixSleep.label = "Sleep [" .. GetMenuVar("triggerbot_mousefix_sleep") .. "]"
  3282. 		end
  3283. 	end)
  3284.  
  3285. 	TriggerbotFov = Triggerbot:new("Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]")
  3286.  
  3287. 	TriggerbotFovX = TriggerbotFov:new("X")
  3288.  
  3289. 	TriggerbotFovX_Plus1 = TriggerbotFovX:new("+1", function()
  3290. 		SetMenuVar("triggerbot_fovX", GetMenuVar("triggerbot_fovX") + 1)
  3291.  
  3292. 		TriggerbotFov.label = "Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]"
  3293. 	end)
  3294.  
  3295. 	TriggerbotFovX_Plus10 = TriggerbotFovX:new("+10", function()
  3296. 		SetMenuVar("triggerbot_fovX", GetMenuVar("triggerbot_fovX") + 10)
  3297.  
  3298. 		TriggerbotFov.label = "Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]"
  3299. 	end)
  3300.  
  3301. 	TriggerbotFovX_Minus1 = TriggerbotFovX:new("-1", function()
  3302. 		if GetMenuVar("triggerbot_fovX") - 1 >= 1 then
  3303. 			SetMenuVar("triggerbot_fovX", GetMenuVar("triggerbot_fovX") - 1)
  3304.  
  3305. 			TriggerbotFov.label = "Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]"
  3306. 		end
  3307. 	end)
  3308.  
  3309. 	TriggerbotFovX_Minus10 = TriggerbotFovX:new("-10", function()
  3310. 		if GetMenuVar("triggerbot_fovX") - 10 >= 1 then
  3311. 			SetMenuVar("triggerboT_fovX", GetMenuVar("triggerbot_fovX") - 1)
  3312.  
  3313. 			TriggerbotFov.label = "Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]"
  3314. 		end
  3315. 	end)
  3316.  
  3317. 	TriggerbotFovY = TriggerbotFov:new("Y")
  3318.  
  3319. 	TriggerbotFovY_Plus1 = TriggerbotFovY:new("+1", function()
  3320. 		SetMenuVar("triggerbot_fovY", GetMenuVar("triggerbot_fovY") + 1)
  3321.  
  3322. 		TriggerbotFov.label = "Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]"
  3323. 	end)
  3324.  
  3325. 	TriggerbotFovY_Plus10 = TriggerbotFovY:new("+10", function()
  3326. 		SetMenuVar("triggerbot_fovY", GetMenuVar("triggerbot_fovY") + 10)
  3327.  
  3328. 		TriggerbotFov.label = "Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]"
  3329. 	end)
  3330.  
  3331. 	TriggerbotFovY_Minus1 = TriggerbotFovY:new("-1", function()
  3332. 		if GetMenuVar("triggerbot_fovY") - 1 >= 1 then
  3333. 			SetMenuVar("triggerbot_fovY", GetMenuVar("triggerbot_fovY") - 1)
  3334.  
  3335. 			TriggerbotFov.label = "Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]"
  3336. 		end
  3337. 	end)
  3338.  
  3339. 	TriggerbotFovY_Minus10 = TriggerbotFovY:new("-10", function()
  3340. 		if GetMenuVar("triggerbot_fovY") - 10 >= 1 then
  3341. 			SetMenuVar("triggerboT_fovY", GetMenuVar("triggerbot_fovY") - 1)
  3342.  
  3343. 			TriggerbotFov.label = "Triggerbot Fov [" .. GetMenuVar("triggerbot_fovX") .. ", " .. GetMenuVar("triggerbot_fovY") .. "]"
  3344. 		end
  3345. 	end)
  3346.  
  3347. 	TriggerbotKey = Triggerbot:new("Key [" .. GetStringForKey(GetMenuVar("triggerbot_key")) .. "]")
  3348.  
  3349. 	TriggerbotKey:new("Mouse1", function()
  3350. 		SetMenuVar("triggerbot_key", GetKeyForString("mouse1"))
  3351.  
  3352. 		TriggerbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("triggerbot_key")) .. "]"
  3353. 	end)
  3354.  
  3355. 	TriggerbotKey:new("Mouse2", function()
  3356. 		SetMenuVar("triggerbot_key", GetKeyForString("mouse2"))
  3357.  
  3358. 		AimbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("triggerbot_key")) .. "]"
  3359. 	end)
  3360.  
  3361. 	TriggerbotKey:new("Mouse3", function()
  3362. 		SetMenuVar("triggerbot_key", GetKeyForString("mouse3"))
  3363.  
  3364. 		TriggerbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("triggerbot_key")) .. "]"
  3365. 	end)
  3366.  
  3367. 	TriggerbotKey:new("Mouse4", function()
  3368. 		SetMenuVar("triggerbot_key", GetKeyForString("mouse4"))
  3369.  
  3370. 		TriggerbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("triggerbot_key")) .. "]"
  3371. 	end)
  3372.  
  3373. 	TriggerbotKey:new("Mouse5", function()
  3374. 		SetMenuVar("triggerbot_key", GetKeyForString("mouse5"))
  3375.  
  3376. 		TriggerbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("triggerbot_key")) .. "]"
  3377. 	end)
  3378.  
  3379. 	TriggerbotKey:new("F", function()
  3380. 		SetMenuVar("triggerbot_key", GetKeyForString("F"))
  3381.  
  3382. 		TriggerbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("triggerbot_key")) .. "]"
  3383. 	end)
  3384.  
  3385. 	TriggerbotKey:new("E", function()
  3386. 		SetMenuVar("triggerbot_key", GetKeyForString("E"))
  3387.  
  3388. 		TriggerbotKey.label = "Key [" .. GetStringForKey(GetMenuVar("triggerbot_key")) .. "]"
  3389. 	end)
  3390.  
  3391. 	-- Triggerbot Hitbox Pos
  3392. 	TriggerbotHitboxPos = Triggerbot:new("Hitbox Position [" .. SB.HitboxInfo[SB:Setting("triggerbot_hitbox_pos")] .. "]")
  3393.  
  3394. 	SB.MenuHitboxTable2 = {}
  3395.  
  3396. 	for k, v in pairs(SB.HitboxInfo) do
  3397. 		SB.MenuHitboxTable2[k] = TriggerbotHitboxPos:new(v, function()
  3398. 			SetMenuVar("triggerbot_hitbox_pos", k)
  3399.  
  3400. 			TriggerbotHitboxPos.label = "Hitbox Position [" .. SB.HitboxInfo[k] .. "]"
  3401. 		end)
  3402. 	end
  3403.  
  3404. 	-- [[Anti-Recoil]
  3405. 	AntiRecoil = Menu:new("Anti-Recoil")
  3406.  
  3407. 	AntiRecoilEnabled = AntiRecoil:new("Enabled [" .. GetMenuVar("antirecoil_enabled") .. "]", function()
  3408. 		if tonumber(GetMenuVar("antirecoil_enabled")) == 1 then
  3409. 			SetMenuVar("antirecoil_enabled", "0")
  3410. 		else
  3411. 			SetMenuVar("antirecoil_enabled", "1")
  3412. 		end
  3413.  
  3414. 		AntiRecoilEnabled.label = "Enabled [" .. GetMenuVar("antirecoil_enabled") .. "]"
  3415. 	end)
  3416.  
  3417. 	AntiRecoilAdd = AntiRecoil:new("Extra Add [" .. GetMenuVar("antirecoil_add") .. "]")
  3418.  
  3419. 	AntiRecoilAdd:new("+1", function()
  3420. 		SetMenuVar("antirecoil_add", GetMenuVar("antirecoil_add") + 1)
  3421.  
  3422. 		AntiRecoilAdd.label = "Extra Add [" .. GetMenuVar("antirecoil_add") .. "]"
  3423. 	end)
  3424.  
  3425. 	AntiRecoilAdd:new("+10", function()
  3426. 		SetMenuVar("antirecoil_add", GetMenuVar("antirecoil_add") + 10)
  3427.  
  3428. 		AntiRecoilAdd.label = "Extra Add [" .. GetMenuVar("antirecoil_add") .. "]"
  3429. 	end)
  3430.  
  3431. 	AntiRecoilAdd:new("-1", function()
  3432. 		if GetMenuVar("antirecoil_add") - 1 >= 0 then
  3433. 			SetMenuVar("antirecoil_add", GetMenuVar("antirecoil_add") - 1)
  3434.  
  3435. 			AntiRecoilAdd.label = "Extra Add [" .. GetMenuVar("antirecoil_add") .. "]"
  3436. 		end
  3437. 	end)
  3438.  
  3439. 	AntiRecoilAdd:new("-10", function()
  3440. 		if GetMenuVar("antirecoil_add") - 10 >= 0 then
  3441. 			SetMenuVar("antirecoil_add", GetMenuVar("antirecoil_add") - 10)
  3442.  
  3443. 			AntiRecoilAdd.label = "Extra Add [" .. GetMenuVar("antirecoil_add") .. "]"
  3444. 		end
  3445. 	end)
  3446.  
  3447. 	AntiRecoilKey = AntiRecoil:new("Key [" .. GetStringForKey(GetMenuVar("antirecoil_key")) .. "]")
  3448.  
  3449. 	AntiRecoilKey:new("Mouse1", function()
  3450. 		SetMenuVar("antirecoil_key", GetKeyForString("mouse1"))
  3451.  
  3452. 		AntiRecoilKey.label = "Key [" .. GetStringForKey(GetMenuVar("antirecoil_key")) .. "]"
  3453. 	end)
  3454.  
  3455. 	AntiRecoilKey:new("Mouse2", function()
  3456. 		SetMenuVar("antirecoil_key", GetKeyForString("mouse2"))
  3457.  
  3458. 		AntiRecoilKey.label = "Key [" .. GetStringForKey(GetMenuVar("antirecoil_key")) .. "]"
  3459. 	end)
  3460.  
  3461. 	AntiRecoilKey:new("Mouse3", function()
  3462. 		SetMenuVar("antirecoil_key", GetKeyForString("mouse3"))
  3463.  
  3464. 		AntiRecoilKey.label = "Key [" .. GetStringForKey(GetMenuVar("antirecoil_key")) .. "]"
  3465. 	end)
  3466.  
  3467. 	AntiRecoilKey:new("Mouse4", function()
  3468. 		SetMenuVar("antirecoil_key", GetKeyForString("mouse4"))
  3469.  
  3470. 		AntiRecoilKey.label = "Key [" .. GetStringForKey(GetMenuVar("antirecoil_key")) .. "]"
  3471. 	end)
  3472.  
  3473. 	AntiRecoilKey:new("Mouse5", function()
  3474. 		SetMenuVar("antirecoil_key", GetKeyForString("mouse5"))
  3475.  
  3476. 		AntiRecoilKey.label = "Key [" .. GetStringForKey(GetMenuVar("antirecoil_key")) .. "]"
  3477. 	end)
  3478.  
  3479. 	AntiRecoilKey:new("F", function()
  3480. 		SetMenuVar("antirecoil_key", GetKeyForString("F"))
  3481.  
  3482. 		AntiRecoilKey.label = "Key [" .. GetStringForKey(GetMenuVar("antirecoil_key")) .. "]"
  3483. 	end)
  3484.  
  3485. 	AntiRecoilKey:new("E", function()
  3486. 		SetMenuVar("antirecoil_key", GetKeyForString("E"))
  3487.  
  3488. 		AntiRecoilKey.label = "Key [" .. GetStringForKey(GetMenuVar("antirecoil_key")) .. "]"
  3489. 	end)
  3490.  
  3491. 	-- [Bunnyhop]
  3492. 	Bunnyhop = Menu:new("Bunnyhop")
  3493.  
  3494. 	BunnyhopEnabled = Bunnyhop:new("Enabled [" .. GetMenuVar("bunnyhop_enabled") .. "]", function()
  3495. 		if tonumber(GetMenuVar("bunnyhop_enabled")) == 1 then
  3496. 			SetMenuVar("bunnyhop_enabled", "0")
  3497. 		else
  3498. 			SetMenuVar("bunnyhop_enabled", "1")
  3499. 		end
  3500.  
  3501. 		BunnyhopEnabled.label = "Enabled [" .. GetMenuVar("bunnyhop_enabled") .. "]"
  3502. 	end)
  3503.  
  3504. 	BunnyhopKey = Bunnyhop:new("Key [" .. GetStringForKey(GetMenuVar("bunnyhop_key")) .. "]")
  3505.  
  3506. 	BunnyhopKey:new("Mouse1", function()
  3507. 		SetMenuVar("bunnyhop_key", GetKeyForString("mouse1"))
  3508.  
  3509. 		BunnyhopKey.label = "Key [" .. GetStringForKey(GetMenuVar("bunnyhop_key")) .. "]"
  3510. 	end)
  3511.  
  3512. 	BunnyhopKey:new("Mouse2", function()
  3513. 		SetMenuVar("bunnyhop_key", GetKeyForString("mouse2"))
  3514.  
  3515. 		BunnyhopKey.label = "Key [" .. GetStringForKey(GetMenuVar("bunnyhop_key")) .. "]"
  3516. 	end)
  3517.  
  3518. 	BunnyhopKey:new("Mouse3", function()
  3519. 		SetMenuVar("bunnyhop_key", GetKeyForString("mouse3"))
  3520.  
  3521. 		BunnyhopKey.label = "Key [" .. GetStringForKey(GetMenuVar("bunnyhop_key")) .. "]"
  3522. 	end)
  3523.  
  3524. 	BunnyhopKey:new("Mouse4", function()
  3525. 		SetMenuVar("bunnyhop_key", GetKeyForString("mouse4"))
  3526.  
  3527. 		BunnyhopKey.label = "Key [" .. GetStringForKey(GetMenuVar("bunnyhop_key")) .. "]"
  3528. 	end)
  3529.  
  3530. 	BunnyhopKey:new("Mouse5", function()
  3531. 		SetMenuVar("bunnyhop_key", GetKeyForString("mouse5"))
  3532.  
  3533. 		BunnyhopKey.label = "Key [" .. GetStringForKey(GetMenuVar("bunnyhop_key")) .. "]"
  3534. 	end)
  3535.  
  3536. 	BunnyhopKey:new("F", function()
  3537. 		SetMenuVar("bunnyhop_key", GetKeyForString("F"))
  3538.  
  3539. 		BunnyhopKey.label = "Key [" .. GetStringForKey(GetMenuVar("bunnyhop_key")) .. "]"
  3540. 	end)
  3541.  
  3542. 	BunnyhopKey:new("E", function()
  3543. 		SetMenuVar("bunnyhop_key", GetKeyForString("E"))
  3544.  
  3545. 		BunnyhopKey.label = "Key [" .. GetStringForKey(GetMenuVar("bunnyhop_key")) .. "]"
  3546. 	end)
  3547.  
  3548. 	-- [Speedhack]
  3549. 	Speedhack = Menu:new("Speedhack")
  3550.  
  3551. 	SpeedhackEnabled = Speedhack:new("Enabled [" .. GetMenuVar("speedhack_enabled") .. "]", function()
  3552. 		if tonumber(GetMenuVar("speedhack_enabled")) == 1 then
  3553. 			SetMenuVar("speedhack_enabled", "0")
  3554. 		else
  3555. 			SetMenuVar("speedhack_enabled", "1")
  3556. 		end
  3557.  
  3558. 		SpeedhackEnabled.label = "Enabled [" .. GetMenuVar("speedhack_enabled") .. "]"
  3559. 	end)
  3560.  
  3561. 	SpeedhackSpeed = Speedhack:new("Speed [" .. GetMenuVar("speedhack_speed") .. "]")
  3562.  
  3563. 	SpeedhackSpeed_Plus1 = SpeedhackSpeed:new("+1", function()
  3564. 		SetMenuVar("speedhack_speed", GetMenuVar("speedhack_speed") + 1)
  3565.  
  3566. 		SpeedhackSpeed.label = "Speed [" .. GetMenuVar("speedhack_speed") .. "]"
  3567. 	end)
  3568.  
  3569. 	SpeedhackSpeed_Plus10 = SpeedhackSpeed:new("+10", function()
  3570. 		SetMenuVar("speedhack_speed", GetMenuVar("speedhack_speed") + 10)
  3571.  
  3572. 		SpeedhackSpeed.label = "Speed [" .. GetMenuVar("speedhack_speed") .. "]"
  3573. 	end)
  3574.  
  3575. 	SpeedhackSpeed_Minus1 = SpeedhackSpeed:new("-1", function()
  3576. 		if GetMenuVar("speedhack_speed") - 1 >= 1 then
  3577. 			SetMenuVar("speedhack_speed", GetMenuVar("speedhack_speed") - 1)
  3578.  
  3579. 			SpeedhackSpeed.label = "Speed [" .. GetMenuVar("speedhack_speed") .. "]"
  3580. 		end
  3581. 	end)
  3582.  
  3583. 	SpeedhackSpeed_Minus10 = SpeedhackSpeed:new("-10", function()
  3584. 		if GetMenuVar("speedhack_speed") - 10 >= 1 then
  3585. 			SetMenuVar("speedhack_speed", GetMenuVar("speedhack_speed") - 10)
  3586.  
  3587. 			SpeedhackSpeed.label = "Speed [" .. GetMenuVar("speedhack_speed") .. "]"
  3588. 		end
  3589. 	end)
  3590.  
  3591. 	SpeedhackKey = Speedhack:new("Key [" .. GetStringForKey(GetMenuVar("speedhack_key")) .. "]")
  3592.  
  3593. 	SpeedhackKey:new("Mouse1", function()
  3594. 		SetMenuVar("speedhack_key", GetKeyForString("mouse1"))
  3595.  
  3596. 		SpeedhackKey.label = "Key [" .. GetStringForKey(GetMenuVar("speedhack_key")) .. "]"
  3597. 	end)
  3598.  
  3599. 	SpeedhackKey:new("Mouse2", function()
  3600. 		SetMenuVar("speedhack_key", GetKeyForString("mouse2"))
  3601.  
  3602. 		SpeedhackKey.label = "Key [" .. GetStringForKey(GetMenuVar("speedhack_key")) .. "]"
  3603. 	end)
  3604.  
  3605. 	SpeedhackKey:new("Mouse3", function()
  3606. 		SetMenuVar("speedhack_key", GetKeyForString("mouse3"))
  3607.  
  3608. 		SpeedhackKey.label = "Key [" .. GetStringForKey(GetMenuVar("speedhack_key")) .. "]"
  3609. 	end)
  3610.  
  3611. 	SpeedhackKey:new("Mouse4", function()
  3612. 		SetMenuVar("speedhack_key", GetKeyForString("mouse4"))
  3613.  
  3614. 		SpeedhackKey.label = "Key [" .. GetStringForKey(GetMenuVar("speedhack_key")) .. "]"
  3615. 	end)
  3616.  
  3617. 	SpeedhackKey:new("Mouse5", function()
  3618. 		SetMenuVar("speedhack_key", GetKeyForString("mouse5"))
  3619.  
  3620. 		SpeedhackKey.label = "Key [" .. GetStringForKey(GetMenuVar("speedhack_key")) .. "]"
  3621. 	end)
  3622.  
  3623. 	SpeedhackKey:new("F", function()
  3624. 		SetMenuVar("speedhack_key", GetKeyForString("F"))
  3625.  
  3626. 		SpeedhackKey.label = "Key [" .. GetStringForKey(GetMenuVar("speedhack_key")) .. "]"
  3627. 	end)
  3628.  
  3629. 	SpeedhackKey:new("E", function()
  3630. 		SetMenuVar("speedhack_key", GetKeyForString("E"))
  3631.  
  3632. 		SpeedhackKey.label = "Key [" .. GetStringForKey(GetMenuVar("speedhack_key")) .. "]"
  3633. 	end)
  3634.  
  3635. 	-- [Miscellaneous]
  3636. 	Misc = Menu:new("Miscellaneous")
  3637.  
  3638. 	AntiSmoke = Misc:new("Anti-Smoke [" .. GetMenuVar("anti_smoke") .. "]", function()
  3639. 		if tonumber(GetMenuVar("anti_smoke")) == 1 then
  3640. 			SetMenuVar("anti_smoke", "0")
  3641. 		else
  3642. 			SetMenuVar("anti_smoke", "1")
  3643. 		end
  3644.  
  3645. 		AntiSmoke.label = "Anti-Smoke [" .. GetMenuVar("anti_smoke") .. "]"
  3646. 	end)
  3647.  
  3648. 	AntiFlash = Misc:new("Anti-Flash [" .. GetMenuVar("anti_flash") .. "]", function()
  3649. 		if tonumber(GetMenuVar("anti_flash")) == 1 then
  3650. 			SetMenuVar("anti_flash", "0")
  3651. 		else
  3652. 			SetMenuVar("anti_flash", "1")
  3653. 		end
  3654.  
  3655. 		AntiFlash.label = "Anti-Flash [" .. GetMenuVar("anti_flash") .. "]"
  3656. 	end)
  3657.  
  3658. 	NoHands = Misc:new("No-Hands [" .. GetMenuVar("no_hands") .. "]", function()
  3659. 		if tonumber(GetMenuVar("no_hands")) == 1 then
  3660. 			SetMenuVar("no_hands", "0")
  3661. 		else
  3662. 			SetMenuVar("no_hands", "1")
  3663. 		end
  3664.  
  3665. 		NoHands.label = "No-Hands [" .. GetMenuVar("no_hands") .. "]"
  3666. 	end)
  3667.  
  3668. 	Chams = Misc:new("Player-Chams [" .. GetMenuVar("player_chams") .. "]", function()
  3669. 		if tonumber(GetMenuVar("player_chams")) == 1 then
  3670. 			SetMenuVar("player_chams", "0")
  3671. 		else
  3672. 			SetMenuVar("player_chams", "1")
  3673. 		end
  3674.  
  3675. 		Chams.label = "Player-Chams [" .. GetMenuVar("player_chams") .. "]"
  3676. 	end)
  3677.  
  3678. 	EnemyDown = Misc:new("Enemy-Down [" .. GetMenuVar("enemy_down") .. "]", function()
  3679. 		if tonumber(GetMenuVar("enemy_down")) == 1 then
  3680. 			SetMenuVar("enemy_down", "0")
  3681. 		else
  3682. 			SetMenuVar("enemy_down", "1")
  3683. 		end
  3684.  
  3685. 		EnemyDown.label = "Enemy-Down [" .. GetMenuVar("enemy_down") .. "]"
  3686. 	end)
  3687.  
  3688. 	Exit = Menu:new("Exit", function() rawcmd("menu close\n") end)
  3689. end
  3690.  
  3691. -- 	###################################
  3692. -- 	#######		     End        #######
  3693. -- 	###################################
  3694. do
  3695. 	local sv_pure = GetPure()
  3696.  
  3697. 	if sv_pure == "0" then
  3698. 		if SB:Setting("no_hands") then SB:NoHands("on", false) end
  3699. 		if SB:Setting("player_chams") then SB:PlayerChams("on", false) end
  3700. 		if SB:Setting("anti_flash") then SB:AntiFlash("on", false) end
  3701. 	else
  3702. 		print("sv_pure is set to " .. sv_pure .. ", can't use materials!\n")
  3703. 	end
  3704. end
  3705.  
  3706. rawcmd("cl_minmodels 1\n")
  3707. rawcmd("bind downarrow \"menu down\"\n")
  3708. rawcmd("bind uparrow \"menu up\"\n")
  3709. rawcmd("bind enter \"menu select\"\n")
  3710.  
  3711. if getCVar("con_nprint_bgalpha") ~= "0" then setCVar("con_nprint_bgalpha", "0") end
  3712.  
  3713. SB:AddClientConVar("close", function() SB:EndLoop() end)
  3714.  
  3715. SB:Log("")
  3716. SB:Log("")
  3717. SB:Log("%s Version %s loaded @ %s - %s", SB.Information.Name, SB.Information.Version, os.date("%x"), os.date("%X"))
  3718. SB:Log("")
  3719. SB:Log("")
  3720.  
  3721. if not SB.Information.PrintLogInfo then print("Successfully Loaded!\n") end
  3722.  
  3723. SB:Log("Logging: " .. (SB.Information.Log and "Enabled" or "Disabled") .. "\n")
  3724. SB:Log("Print Login Info: " .. (SB.Information.PrintLogInfo and "Yes" or "No") .. "\n")
  3725. SB:Log("")
  3726.  
  3727. SB:StartLoop()
Viewed 486 times, submitted by unknown.