Advertisement
HiDad910

Ab

Feb 16th, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 74.01 KB | None | 0 0
  1. --[[
  2. AimHot v8, Herrtt#3868
  3.  
  4. I decided to make it open source for all the new scripters out there (including me), don't ripoff or claim this as your own.
  5. When I get time I will comment a lot of the stuff here.
  6.  
  7. ]]
  8.  
  9.  
  10.  
  11. -- Extremly bad code starts below here
  12.  
  13. local DEBUG_MODE = false -- warnings, prints and profiles dont change idiot thanks
  14.  
  15. -- Ok I declare some variables here for micro optimization. I might declare again in the blocks because I am lazy to check here
  16. local game, workspace = game, workspace
  17.  
  18. local cf, v3, v2, udim2 = CFrame, Vector3, Vector2, UDim2
  19. local string, math, table, Color3, tonumber, tostring = string, math, table, Color3, tonumber, tostring
  20.  
  21. local cfnew = cf.new
  22. local cf0 = cfnew()
  23.  
  24. local v3new = v3.new
  25. local v30 = v3new()
  26.  
  27. local v2new = v2.new
  28. local v20 = v2new()
  29.  
  30. local setmetatable = setmetatable
  31. local getmetatable = getmetatable
  32.  
  33. local type, typeof = type, typeof
  34.  
  35. local Instance = Instance
  36.  
  37. local drawing = Drawing or drawing
  38.  
  39. local mousemoverel = mousemoverel or (Input and Input.MouseMove)
  40.  
  41. local readfile = readfile
  42. local writefile = writefile
  43. local appendfile = appendfile
  44.  
  45. local warn, print = DEBUG_MODE and warn or function() end, DEBUG_MODE and print or function() end
  46.  
  47.  
  48. local required = {
  49. mousemoverel, drawing, readfile, writefile, appendfile, game.HttpGet, game.GetObjects
  50. }
  51.  
  52. for i,v in pairs(required) do
  53. if v == nil then
  54. warn("Your exploit is not supported (may consider purchasing a better one?)!")
  55. return -- Only pros return in top-level function
  56. end
  57. end
  58.  
  59. local servs
  60. servs = setmetatable(
  61. {
  62. Get = function(self, serv)
  63. if servs[serv] then return servs[serv] end
  64. local s = game:GetService(serv)
  65. if s then servs[serv] = s end
  66. return s
  67. end;
  68. }, {
  69. __index = function(self, index)
  70. local s = game:GetService(index)
  71. if s then servs[index] = s end
  72. return s
  73. end;
  74. })
  75.  
  76. local connections = {}
  77. local function bindEvent(event, callback) -- Let me disconnect in peace
  78. local con = event:Connect(callback)
  79. table.insert(connections, con)
  80. return con
  81. end
  82.  
  83. local players = servs.Players
  84. local runservice = servs.RunService
  85. local http = servs.HttpService
  86. local uis = servs.UserInputService
  87.  
  88. local function jsonEncode(t)
  89. return http:JSONEncode(t)
  90. end
  91. local function jsonDecode(t)
  92. return http:JSONDecode(t)
  93. end
  94.  
  95. local function existsFile(name)
  96. return pcall(function()
  97. return readfile(name)
  98. end)
  99. end
  100.  
  101. local function mergetab(a,b)
  102. local c = a or {}
  103. for i,v in pairs(b or {}) do
  104. c[i] = v
  105. end
  106. return c
  107. end
  108.  
  109. local locpl = players.LocalPlayer
  110. local mouse = locpl:GetMouse()
  111. local camera = workspace.CurrentCamera
  112.  
  113. local findFirstChild = game.FindFirstChild
  114. local findFirstChildOfClass = game.FindFirstChildOfClass
  115. local isDescendantOf = game.IsDescendantOf
  116.  
  117. -- Just to check another aimhot instance is running and close it
  118. local uid = tick() .. math.random(1,100000) .. math.random(1,100000)
  119. if shared.ah8 and shared.ah8.close and shared.ah8.uid~=uid then shared.ah8:close() end
  120.  
  121. -- Main shitty script should start below here
  122.  
  123. warn("AH8_MAIN : Running script...")
  124.  
  125. local event = {}
  126. local utility = {}
  127. local serializer = {}
  128.  
  129. local settings = {}
  130.  
  131. local hud = loadstring(game:HttpGet("https://pastebin.com/raw/3hREvLEU", DEBUG_MODE == false and true or DEBUG_MODE == true and false))() -- Ugly ui do not care
  132.  
  133. local aimbot = {}
  134.  
  135. local visuals = {}
  136.  
  137. local crosshair = {}
  138. local esp = {}
  139. local boxes = {}
  140. local tracers = {}
  141.  
  142. local run = {}
  143. local ah8 = {enabled = true;}
  144.  
  145.  
  146. local visiblekids = {} -- no need to check twice each frame yes? todo :(
  147. -- Some libraries
  148.  
  149. do
  150. --/ Events : custom event system, bindables = gay
  151.  
  152. local type = type;
  153. local coroutine = coroutine;
  154. local create = coroutine.create;
  155. local resume = coroutine.resume;
  156.  
  157. local function spawn(f, ...)
  158. resume(create(f), ...)
  159. end
  160.  
  161. function event.new(t)
  162. local self = t or {}
  163.  
  164. local n = 0
  165. local connections = {}
  166. function self:connect(func)
  167. if type(func) ~= "function" then return end
  168.  
  169. n = n + 1
  170. local my = n
  171. connections[n] = func
  172.  
  173. local connected = true
  174. local function disconnect()
  175. if connected ~= true then return end
  176. connected = false
  177.  
  178. connections[n] = nil
  179. end
  180.  
  181. return disconnect
  182. end
  183.  
  184.  
  185. local function fire(...)
  186. for i,v in pairs(connections) do
  187. v(...)
  188. end
  189. end
  190.  
  191. return fire, self
  192. end
  193. end
  194.  
  195. do
  196. --/ Utility : To make it easier for me to edit
  197.  
  198. local getPlayers = players.GetPlayers
  199. local getPartsObscuringTarget = camera.GetPartsObscuringTarget
  200. local worldToViewportPoint = camera.WorldToViewportPoint
  201. local worldToScreenPoint = camera.WorldToScreenPoint
  202. local raynew = Ray.new
  203. local findPartOnRayWithIgnoreList = workspace.FindPartOnRayWithIgnoreList
  204. local findPartOnRay = workspace.FindPartOnRay
  205. local findFirstChild = game.FindFirstChild
  206.  
  207. local function raycast(ray, ignore, callback)
  208. local ignore = ignore or {}
  209.  
  210. local hit, pos, normal, material = findPartOnRayWithIgnoreList(workspace, ray, ignore)
  211. while hit and callback do
  212. local Continue, _ignore = callback(hit)
  213. if not Continue then
  214. break
  215. end
  216. if _ignore then
  217. table.insert(ignore, _ignore)
  218. else
  219. table.insert(ignore, hit)
  220. end
  221. hit, pos, normal, material = findPartOnRayWithIgnoreList(workspace, ray, ignore)
  222. end
  223. return hit, pos, normal, material
  224. end
  225.  
  226. local function badraycastnotevensure(pos, ignore) -- 1 ray > 1 obscuringthing | 100 rays < 1 obscuring thing
  227. local hitparts = getPartsObscuringTarget(camera, {pos}, ignore or {})
  228. return hitparts
  229. end
  230.  
  231. local charshit = {}
  232. function utility.getcharacter(player) -- Change this or something if you want to add support for other games.
  233. if (player == nil) then return end
  234. if (charshit[player]) then return charshit[player] end
  235.  
  236. local char = player.Character
  237. if (char == nil or isDescendantOf(char, game) == false) then
  238. char = findFirstChild(workspace, player.Name)
  239. end
  240.  
  241. return char
  242. end
  243.  
  244. utility.mychar = nil
  245. utility.myroot = nil
  246.  
  247. local rootshit = {}
  248. function utility.getroot(player)
  249. if (player == nil) then return end
  250. if (rootshit[player]) then return rootshit[player] end
  251.  
  252. local char
  253. if (player:IsA("Player")) then
  254. char = utility.getcharacter(player)
  255. else
  256. char = player
  257. end
  258.  
  259. if (char ~= nil) then
  260. local root = (findFirstChild(char, "HumanoidRootPart") or char.PrimaryPart)
  261. if (root ~= nil) then -- idk
  262. --bindEvent(root.AncestryChanged, function(_, parent)
  263. -- if (parent == nil) then
  264. -- roostshit[player] = nil
  265. -- end
  266. --end)
  267. end
  268.  
  269. --rootshit[player] = root
  270. return root
  271. end
  272.  
  273. return
  274. end
  275.  
  276. spawn(function()
  277. while ah8 and ah8.enabled do -- Some games are gay
  278. utility.mychar = utility.getcharacter(locpl)
  279. if (utility.mychar ~= nil) then
  280. utility.myroot = utility.getroot(locpl)
  281. end
  282. wait(.5)
  283. end
  284. end)
  285. --[[local utility.mychar = locpl.Character
  286. local utility.myroot = utility.mychar and findFirstChild(utility.mychar, "HumanoidRootPart") or utility.mychar and utility.mychar.PrimaryPart
  287. bindEvent(locpl.CharacterAdded, function(char)
  288. utility.mychar = char
  289. wait(.1)
  290. utility.myroot = utility.mychar and findFirstChild(utility.mychar, "HumanoidRootPart") or utility.mychar.PrimaryPart
  291. end)
  292. bindEvent(locpl.CharacterRemoving, function()
  293. utility.mychar = nil
  294. utility.myroot = nil
  295. end)--]]
  296.  
  297.  
  298. function utility.isalive(_1, _2)
  299. if _1 == nil then return end
  300. local Char, RootPart
  301. if _2 ~= nil then
  302. Char, RootPart = _1,_2
  303. else
  304. Char = utility.getcharacter(_1)
  305. RootPart = Char and (Char:FindFirstChild("HumanoidRootPart") or Char.PrimaryPart)
  306. end
  307.  
  308. if Char and RootPart then
  309. local Human = findFirstChildOfClass(Char, "Humanoid")
  310. if RootPart and Human then
  311. if Human.Health > 0 then
  312. return true
  313. end
  314. elseif RootPart and isDescendantOf(Char, game) then
  315. return true
  316. end
  317. end
  318.  
  319. return false
  320. end
  321.  
  322. local shit = false
  323. function utility.isvisible(char, root, max, ...)
  324. local pos = root.Position
  325. if shit or max > 4 then
  326. local parts = badraycastnotevensure(pos, {utility.mychar, ..., camera, char, root})
  327.  
  328. return parts == 0
  329. else
  330. local camp = camera.CFrame.p
  331. local dist = (camp - pos).Magnitude
  332.  
  333. local hitt = 0
  334. local hit = raycast(raynew(camp, (pos - camp).unit * dist), {utility.mychar, ..., camera}, function(hit)
  335.  
  336. if hit.CanCollide ~= false then-- hit.Transparency ~= 1 then¨
  337. hitt = hitt + 1
  338. return hitt < max
  339. end
  340.  
  341. if isDescendantOf(hit, char) then
  342. return
  343. end
  344. return true
  345. end)
  346.  
  347. return hit == nil and true or isDescendantOf(hit, char), hitt
  348. end
  349. end
  350. function utility.sameteam(player, p1)
  351. local p0 = p1 or locpl
  352. return (player.Team~=nil and player.Team==p0.Team) and player.Neutral == false or false
  353. end
  354. function utility.getDistanceFromMouse(position)
  355. local screenpos, vis = worldToViewportPoint(camera, position)
  356. if vis and screenpos.Z > 0 then
  357. return (v2new(mouse.X, mouse.Y) - v2new(screenpos.X, screenpos.Y)).Magnitude
  358. end
  359. return math.huge
  360. end
  361.  
  362.  
  363. local hashes = {}
  364. function utility.getClosestMouseTarget(settings)
  365. local closest, temp = nil, settings.fov or math.huge
  366. local plr
  367.  
  368. for i,v in pairs(getPlayers(players)) do
  369. if (locpl ~= v and (settings.ignoreteam==true and utility.sameteam(v)==false or settings.ignoreteam == false)) then
  370. local character = utility.getcharacter(v)
  371. if character and isDescendantOf(character, game) == true then
  372. local hash = hashes[v]
  373. local part = hash or findFirstChild(character, settings.name or "HumanoidRootPart") or findFirstChild(character, "HumanoidRootPart") or character.PrimaryPart
  374. if hash == nil then hashes[v] = part end
  375. if part and isDescendantOf(part, game) == true then
  376. local legal = true
  377.  
  378. local rp = part:GetRenderCFrame().p
  379. local distance = utility.getDistanceFromMouse(rp)
  380. if temp <= distance then
  381. legal = false
  382. end
  383.  
  384. if legal then
  385. if settings.checkifalive then
  386. local isalive = utility.isalive(character, part)
  387. if not isalive then
  388. legal = false
  389. end
  390. end
  391. end
  392.  
  393. if legal then
  394. local visible = true
  395. if settings.ignorewalls == false then
  396. local vis = utility.isvisible(character, part, (settings.maxobscuringparts or 0))
  397. if not vis then
  398. legal = false
  399. end
  400. end
  401. end
  402.  
  403. if legal then
  404. local dist1
  405. temp = distance
  406. closest = part
  407. plr = v
  408. end
  409. end
  410. end
  411. end
  412. end -- who doesnt love 5 ends in a row?
  413.  
  414. return closest, temp, plr
  415. end
  416. function utility.getClosestTarget(settings)
  417.  
  418. local closest, temp = nil, math.huge
  419. --local utility.myroot = utility.mychar and (findFirstChild(utility.mychar, settings.name or "HumanoidRootPart") or findFirstChild(utility.mychar, "HumanoidRootPart"))
  420.  
  421. if utility.myroot then
  422. for i,v in pairs(getPlayers(players)) do
  423. if (locpl ~= v) and (settings.ignoreteam==true and utility.sameteam(v)==false or settings.ignoreteam == false) then
  424. local character = utility.getcharacter(v)
  425. if character then
  426. local hash = hashes[v]
  427. local part = hash or findFirstChild(character, settings.name or "HumanoidRootPart") or findFirstChild(character, "HumanoidRootPart")
  428. if hash == nil then hashes[v] = part end
  429.  
  430. if part then
  431. local visible = true
  432. if settings.ignorewalls == false then
  433. local vis, p = utility.isvisible(character, part, (settings.maxobscuringparts or 0))
  434. if p <= (settings.maxobscuringparts or 0) then
  435. visible = vis
  436. end
  437. end
  438.  
  439. if visible then
  440. local distance = (utility.myroot.Position - part.Position).Magnitude
  441. if temp > distance then
  442. temp = distance
  443. closest = part
  444. end
  445. end
  446. end
  447. end
  448. end
  449. end
  450. end
  451.  
  452. return closest, temp
  453. end
  454.  
  455. spawn(function()
  456. while ah8 and ah8.enabled do
  457. for i,v in pairs(hashes) do
  458. hashes[i] = nil
  459. wait()
  460. end
  461. wait(4)
  462. --hashes = {}
  463. end
  464. end)
  465. end
  466.  
  467.  
  468. local serialize
  469. local deserialize
  470. do
  471. --/ Serializer : garbage : slow as fuck
  472.  
  473. local function hex_encode(IN, len)
  474. local B,K,OUT,I,D=16,"0123456789ABCDEF","",0,nil
  475. while IN>0 do
  476. I=I+1
  477. IN,D=math.floor(IN/B), IN%B+1
  478. OUT=string.sub(K,D,D)..OUT
  479. end
  480. if len then
  481. OUT = ('0'):rep(len - #OUT) .. OUT
  482. end
  483. return OUT
  484. end
  485. local function hex_decode(IN)
  486. return tonumber(IN, 16)
  487. end
  488.  
  489. local types = {
  490. ["nil"] = "0";
  491. ["boolean"] = "1";
  492. ["number"] = "2";
  493. ["string"] = "3";
  494. ["table"] = "4";
  495.  
  496. ["Vector3"] = "5";
  497. ["CFrame"] = "6";
  498. ["Instance"] = "7";
  499.  
  500. ["Color3"] = "8";
  501. }
  502. local rtypes = (function()
  503. local a = {}
  504. for i,v in pairs(types) do
  505. a[v] = i
  506. end
  507. return a
  508. end)()
  509.  
  510. local typeof = typeof or type
  511. local function encode(t, ...)
  512. local type = typeof(t)
  513. local s = types[type]
  514. local c = ''
  515. if type == "nil" then
  516. c = types[type] .. "0"
  517. elseif type == "boolean" then
  518. local t = t == true and '1' or '0'
  519. c = s .. t
  520. elseif type == "number" then
  521. local new = tostring(t)
  522. local len = #new
  523. c = s .. len .. "." .. new
  524. elseif type == "string" then
  525. local new = t
  526. local len = #new
  527. c = s .. len .. "." .. new
  528. elseif type == "Vector3" then
  529. local x,y,z = tostring(t.X), tostring(t.Y), tostring(t.Z)
  530. local new = hex_encode(#x, 2) .. x .. hex_encode(#y, 2) .. y .. hex_encode(#z, 2) .. z
  531. c = s .. new
  532. elseif type == "CFrame" then
  533. local a = {t:GetComponents()}
  534. local new = ''
  535. for i,v in pairs(a) do
  536. local l = tostring(v)
  537. new = new .. hex_encode(#l, 2) .. l
  538. end
  539. c = s .. new
  540. elseif type == "Color3" then
  541. local a = {t.R, t.G, t.B}
  542. local new = ''
  543. for i,v in pairs(a) do
  544. local l = tostring(v)
  545. new = new .. hex_encode(#l, 2) .. l
  546. end
  547. c = s .. new
  548. elseif type == "table" then
  549. return serialize(t, ...)
  550. end
  551. return c
  552. end
  553. local function decode(t, extra)
  554. local p = 0
  555. local function read(l)
  556. l = l or 1
  557. p = p + l
  558. return t:sub(p-l + 1, p)
  559. end
  560. local function get(a)
  561. local k = ""
  562. while p < #t do
  563. if t:sub(p+1,p+1) == a then
  564. break
  565. else
  566. k = k .. read()
  567. end
  568. end
  569. return k
  570. end
  571. local type = rtypes[read()]
  572. local c
  573.  
  574. if type == "nil" then
  575. read()
  576. elseif type == "boolean" then
  577. local d = read()
  578. c = d == "1" and true or false
  579. elseif type == "number" then
  580. local length = tonumber(get("."))
  581. local d = read(length+1):sub(2,-1)
  582. c = tonumber(d)
  583. elseif type == "string" then
  584. local length = tonumber(get(".")) --read()
  585. local d = read(length+1):sub(2,-1)
  586. c = d
  587. elseif type == "Vector3" then
  588. local function getnext()
  589. local length = hex_decode(read(2))
  590. local a = read(tonumber(length))
  591. return tonumber(a)
  592. end
  593. local x,y,z = getnext(),getnext(),getnext()
  594. c = Vector3.new(x, y, z)
  595. elseif type == "CFrame" then
  596. local a = {}
  597. for i = 1,12 do
  598. local l = hex_decode(read(2))
  599. local b = read(tonumber(l))
  600. a[i] = tonumber(b)
  601. end
  602. c = CFrame.new(unpack(a))
  603. elseif type == "Instance" then
  604. local pos = hex_decode(read(2))
  605. c = extra[tonumber(pos)]
  606. elseif type == "Color3" then
  607. local a = {}
  608. for i = 1,3 do
  609. local l = hex_decode(read(2))
  610. local b = read(tonumber(l))
  611. a[i] = tonumber(b)
  612. end
  613. c = Color3.new(unpack(a))
  614. end
  615. return c
  616. end
  617.  
  618. function serialize(data, p)
  619. if data == nil then return end
  620. local type = typeof(data)
  621. if type == "table" then
  622. local extra = {}
  623. local s = types[type]
  624. local new = ""
  625. local p = p or 0
  626. for i,v in pairs(data) do
  627. local i1,v1
  628. local t0,t1 = typeof(i), typeof(v)
  629.  
  630. local a,b
  631. if t0 == "Instance" then
  632. p = p + 1
  633. extra[p] = i
  634. i1 = types[t0] .. hex_encode(p, 2)
  635. else
  636. i1, a = encode(i, p)
  637. if a then
  638. for i,v in pairs(a) do
  639. extra[i] = v
  640. end
  641. end
  642. end
  643.  
  644. if t1 == "Instance" then
  645. p = p + 1
  646. extra[p] = v
  647. v1 = types[t1] .. hex_encode(p, 2)
  648. else
  649. v1, b = encode(v, p)
  650. if b then
  651. for i,v in pairs(b) do
  652. extra[i] = v
  653. end
  654. end
  655. end
  656. new = new .. i1 .. v1
  657. end
  658. return s .. #new .. "." .. new, extra
  659. elseif type == "Instance" then
  660. return types[type] .. hex_encode(1, 2), {data}
  661. else
  662. return encode(data), {}
  663. end
  664. end
  665.  
  666. function deserialize(data, extra)
  667. if data == nil then return end
  668. extra = extra or {}
  669.  
  670. local type = rtypes[data:sub(1,1)]
  671. if type == "table" then
  672.  
  673. local p = 0
  674. local function read(l)
  675. l = l or 1
  676. p = p + l
  677. return data:sub(p-l + 1, p)
  678. end
  679. local function get(a)
  680. local k = ""
  681. while p < #data do
  682. if data:sub(p+1,p+1) == a then
  683. break
  684. else
  685. k = k .. read()
  686. end
  687. end
  688. return k
  689. end
  690.  
  691. local length = tonumber(get("."):sub(2, -1))
  692. read()
  693.  
  694. local new = {}
  695.  
  696. local l = 0
  697. while p <= length do
  698. l = l + 1
  699.  
  700. local function getnext()
  701. local i
  702. local t = read()
  703. local type = rtypes[t]
  704.  
  705. if type == "nil" then
  706. i = decode(t .. read())
  707. elseif type == "boolean" then
  708. i = decode(t .. read())
  709. elseif type == "number" then
  710. local l = get(".")
  711.  
  712. local dc = t .. l .. read()
  713. local a = read(tonumber(l))
  714. dc = dc .. a
  715.  
  716. i = decode(dc)
  717. elseif type == "string" then
  718. local l = get(".")
  719. local dc = t .. l .. read()
  720. local a = read(tonumber(l))
  721. dc = dc .. a
  722.  
  723. i = decode(dc)
  724. elseif type == "Vector3" then
  725. local function getnext()
  726. local length = hex_decode(read(2))
  727. local a = read(tonumber(length))
  728. return tonumber(a)
  729. end
  730. local x,y,z = getnext(),getnext(),getnext()
  731. i = Vector3.new(x, y, z)
  732. elseif type == "CFrame" then
  733. local a = {}
  734. for i = 1,12 do
  735. local l = hex_decode(read(2))
  736. local b = read(tonumber(l)) -- why did I decide to do this
  737. a[i] = tonumber(b)
  738. end
  739. i = CFrame.new(unpack(a))
  740. elseif type == "Instance" then
  741. local pos = hex_decode(read(2))
  742. i = extra[tonumber(pos)]
  743. elseif type == "Color3" then
  744. local a = {}
  745. for i = 1,3 do
  746. local l = hex_decode(read(2))
  747. local b = read(tonumber(l))
  748. a[i] = tonumber(b)
  749. end
  750. i = Color3.new(unpack(a))
  751. elseif type == "table" then
  752. local l = get(".")
  753. local dc = t .. l .. read() .. read(tonumber(l))
  754. i = deserialize(dc, extra)
  755. end
  756. return i
  757. end
  758. local i = getnext()
  759. local v = getnext()
  760.  
  761. new[(typeof(i) ~= "nil" and i or l)] = v
  762. end
  763.  
  764.  
  765. return new
  766. elseif type == "Instance" then
  767. local pos = tonumber(hex_decode(data:sub(2,3)))
  768. return extra[pos]
  769. else
  770. return decode(data, extra)
  771. end
  772. end
  773. end
  774.  
  775.  
  776. -- great you have come a far way now stop before my horrible scripting will infect you moron
  777.  
  778. do
  779. --/ Settings
  780.  
  781. -- TODO: Other datatypes.
  782. settings.fileName = "AimHot_v8_settings.txt" -- Lovely
  783. settings.saved = {}
  784.  
  785. function settings:Get(name, default)
  786. local self = {}
  787. local value = settings.saved[name]
  788. if value == nil and default ~= nil then
  789. value = default
  790. settings.saved[name] = value
  791. end
  792. self.Value = value
  793. function self:Set(val)
  794. self.Value = val
  795. settings.saved[name] = val
  796. end
  797. return self --value or default
  798. end
  799.  
  800. function settings:Set(name, value)
  801. local r = settings.saved[name]
  802. settings.saved[name] = value
  803. return r
  804. end
  805.  
  806. function settings:Save()
  807. local savesettings = settings:GetAll() or {}
  808. local new = mergetab(savesettings, settings.saved)
  809. local js = serialize(new)
  810.  
  811. writefile(settings.fileName, js)
  812. end
  813.  
  814. function settings:GetAll()
  815. if not existsFile(settings.fileName) then
  816. return
  817. end
  818. local fileContents = readfile(settings.fileName)
  819.  
  820. local data
  821. pcall(function()
  822. data = deserialize(fileContents)
  823. end)
  824. return data
  825. end
  826.  
  827. function settings:Load()
  828. if not existsFile(settings.fileName) then
  829. return
  830. end
  831. local fileContents = readfile(settings.fileName)
  832.  
  833. local data
  834. pcall(function()
  835. data = deserialize(fileContents)
  836. end)
  837.  
  838. if data then
  839. data = mergetab(settings.saved, data)
  840. end
  841. settings.saved = data
  842. return data
  843. end
  844. settings:Load()
  845.  
  846. spawn(function()
  847. while ah8 and ah8.enabled do
  848. settings:Save()
  849. wait(5)
  850. end
  851. end)
  852. end
  853.  
  854. -- Aiming aim bot aim aim stuff bot
  855.  
  856. do
  857. --/ Aimbot
  858.  
  859. -- Do I want to make this decent?
  860. local aimbot_settings = {}
  861. aimbot_settings.ignoreteam = settings:Get("aimbot.ignoreteam", false)
  862. aimbot_settings.sensitivity = settings:Get("aimbot.sensitivity", .5)
  863. aimbot_settings.locktotarget = settings:Get("aimbot.locktotarget", true)
  864. aimbot_settings.checkifalive = settings:Get("aimbot.checkifalive", false)
  865.  
  866. aimbot_settings.ignorewalls = settings:Get("aimbot.ignorewalls", true)
  867. aimbot_settings.maxobscuringparts = settings:Get("aimbot.maxobscuringparts", 0)
  868.  
  869.  
  870. aimbot_settings.enabled = settings:Get("aimbot.enabled", false)
  871. aimbot_settings.keybind = settings:Get("aimbot.keybind", "MouseButton2")
  872. aimbot_settings.presstoenable = settings:Get("aimbot.presstoenable", true)
  873.  
  874. aimbot_settings.fovsize = settings:Get("aimbot.fovsize", 400)
  875. aimbot_settings.fovenabled = settings:Get("aimbot.fovenabled", true)
  876. aimbot_settings.fovsides = settings:Get("aimbot.fovsides", 10)
  877. aimbot_settings.fovthickness = settings:Get("aimbot.fovthickness", 1)
  878.  
  879. aimbot.fovshow = aimbot_settings.fovenabled.Value
  880.  
  881. setmetatable(aimbot, {
  882. __index = function(self, index)
  883. if aimbot_settings[index] ~= nil then
  884. local Value = aimbot_settings[index]
  885. if typeof(Value) == "table" then
  886. return typeof(Value) == "table" and Value.Value
  887. else
  888. return Value
  889. end
  890. end
  891. warn(("AH8_ERROR : AimbotSettings : Tried to index %s"):format(tostring(index)))
  892. end;
  893. __newindex = function(self, index, value)
  894. if typeof(value) ~= "function" then
  895. if aimbot_settings[index] then
  896. local v = aimbot_settings[index]
  897. if typeof(v) ~= "table" then
  898. aimbot_settings[index] = value
  899. return
  900. elseif v.Set then
  901. v:Set(value)
  902. return
  903. end
  904. end
  905. end
  906. rawset(self, index, value)
  907. end; -- ew
  908. })
  909.  
  910.  
  911. local worldToScreenPoint = camera.WorldToScreenPoint -- why did I start this
  912. local target, _, closestplr = nil, nil, nil;
  913. local completeStop = false
  914.  
  915. local enabled = false
  916. bindEvent(uis.InputBegan, function(key,gpe)
  917. if aimbot.enabled == false then return end
  918.  
  919. if aimbot.presstoenable then
  920. aimbot.fovshow = true
  921. else
  922. aimbot.fovshow = enabled == true
  923. end
  924.  
  925. local keyc = key.KeyCode == Enum.KeyCode.Unknown and key.UserInputType or key.KeyCode
  926. if keyc.Name == aimbot.keybind then
  927. if aimbot.presstoenable then
  928. enabled = true
  929. aimbot.fovshow = true
  930. else
  931. enabled = not enabled
  932. aimbot.fovshow = enabled == true
  933. end
  934. end
  935. end)
  936. bindEvent(uis.InputEnded, function(key)
  937. if aimbot.enabled == false then enabled = false aimbot.fovshow = false end
  938. if aimbot.presstoenable then
  939. aimbot.fovshow = true
  940. else
  941. aimbot.fovshow = enabled == true
  942. end
  943.  
  944. local keyc = key.KeyCode == Enum.KeyCode.Unknown and key.UserInputType or key.KeyCode
  945. if keyc.Name == aimbot.keybind then
  946. if aimbot.presstoenable then
  947. enabled = false
  948. end
  949. end
  950. end)
  951.  
  952.  
  953. local function calculateTrajectory()
  954. -- my math is a bit rusty atm
  955. end
  956.  
  957. local function aimAt(vector)
  958. if completeStop then return end
  959. local newpos = worldToScreenPoint(camera, vector)
  960. mousemoverel((newpos.X - mouse.X) * aimbot.sensitivity, (newpos.Y - mouse.Y) * aimbot.sensitivity)
  961. end
  962.  
  963. function aimbot.step()
  964. if completeStop or aimbot.enabled == false or enabled == false or utility.mychar == nil or isDescendantOf(utility.mychar, game) == false then
  965. if target or closestplr then
  966. target, closestplr, _ = nil, nil, _
  967. end
  968. return
  969. end
  970.  
  971. if aimbot.locktotarget == true then
  972. local cchar = utility.getcharacter(closestplr)
  973. if target == nil or isDescendantOf(target, game) == false or closestplr == nil or closestplr.Parent == nil or cchar == nil or isDescendantOf(cchar, game) == false then
  974. target, _, closestplr = utility.getClosestMouseTarget({ -- closest to mouse or camera mode later just wait
  975. ignoreteam = aimbot.ignoreteam;
  976. ignorewalls = aimbot.ignorewalls;
  977. maxobscuringparts = aimbot.maxobscuringparts;
  978. name = 'Head';
  979. fov = aimbot.fovsize;
  980. checkifalive = aimbot.checkifalive;
  981. -- mode = "mouse";
  982. })
  983. else
  984. --target = target
  985. local stop = false
  986. if stop == false and not (aimbot.ignoreteam==true and utility.sameteam(closestplr)==false or aimbot.ignoreteam == false) then
  987. stop = true
  988. end
  989. local visible = true
  990.  
  991. if stop == false and aimbot.ignorewalls == false then
  992. local vis = utility.isvisible(target.Parent, target, (aimbot.maxobscuringparts or 0))
  993. if not vis then
  994. stop = true
  995. end
  996. end
  997.  
  998. if stop == false and aimbot.checkifalive then
  999. local isalive = utility.isalive(character, part)
  1000. if not isalive then
  1001. stop = true
  1002. end
  1003. end
  1004.  
  1005. if stop then
  1006. -- getClosestTarget({mode = "mouse"}) later
  1007. target, _, closestplr = utility.getClosestMouseTarget({
  1008. ignoreteam = aimbot.ignoreteam;
  1009. ignorewalls = aimbot.ignorewalls;
  1010. maxobscuringparts = aimbot.maxobscuringparts;
  1011. name = 'Head';
  1012. fov = aimbot.fovsize;
  1013. checkifalive = aimbot.checkifalive;
  1014. })
  1015. end
  1016. end
  1017. else
  1018. target = utility.getClosestMouseTarget({
  1019. ignoreteam = aimbot.ignoreteam;
  1020. ignorewalls = aimbot.ignorewalls;
  1021. maxobscuringparts = aimbot.maxobscuringparts;
  1022. name = 'Head';
  1023. fov = aimbot.fovsize;
  1024. checkifalive = aimbot.checkifalive;
  1025. })
  1026. end
  1027.  
  1028. if target then
  1029. aimAt(target:GetRenderCFrame().Position)
  1030. -- hot or not?
  1031. end
  1032. end
  1033.  
  1034. function aimbot:End()
  1035. completeStop = true
  1036. target = nil
  1037. end
  1038. end
  1039.  
  1040.  
  1041. -- Mostly visuals below here
  1042. local clearDrawn, newdrawing
  1043. do
  1044. --/ Drawing extra functions
  1045.  
  1046. local insert = table.insert
  1047. local newd = drawing.new
  1048.  
  1049. local drawn = {}
  1050. function clearDrawn() -- who doesnt love drawing library
  1051. for i,v in pairs(drawn) do
  1052. pcall(function() v:Remove() end)
  1053. drawn[i] = nil
  1054. end
  1055. drawn = {}
  1056. end
  1057.  
  1058. function newdrawing(class, props)
  1059. --if visuals.enabled ~= true then
  1060. -- return
  1061. --end
  1062. local new = newd(class)
  1063. for i,v in pairs(props) do
  1064. new[i] = v
  1065. end
  1066. insert(drawn, new)
  1067. return new
  1068. end
  1069. end
  1070.  
  1071.  
  1072. do
  1073. --/ Crosshair
  1074. local crosshair_settings = {}
  1075. crosshair_settings.enabled = settings:Get("crosshair.enabled", false)
  1076. crosshair_settings.size = settings:Get("crosshair.size", 40)
  1077. crosshair_settings.thickness = settings:Get("crosshair.thickness", 1)
  1078. crosshair_settings.color = Color3.fromRGB(255,0,0)
  1079. crosshair_settings.transparency = settings:Get("crosshair.transparency", .1)
  1080.  
  1081. setmetatable(crosshair, { -- yes I know it is easier ways to add this but that requires effort
  1082. __index = function(self, index)
  1083. if crosshair_settings[index] ~= nil then
  1084. local Value = crosshair_settings[index]
  1085. if typeof(Value) == "table" then
  1086. return typeof(Value) == "table" and Value.Value
  1087. else
  1088. return Value
  1089. end
  1090. end
  1091. warn(("AH8_ERROR : CrosshairSettings : Tried to index %s"):format(tostring(index)))
  1092. end;
  1093. __newindex = function(self, index, value)
  1094. if typeof(value) ~= "function" then
  1095. if crosshair_settings[index] then
  1096. local v = crosshair_settings[index]
  1097. if typeof(v) ~= "table" then
  1098. crosshair_settings[index] = value
  1099. return
  1100. elseif v.Set then
  1101. v:Set(value)
  1102. return
  1103. end
  1104. end
  1105. end
  1106. rawset(self, index, value)
  1107. end;
  1108. })
  1109.  
  1110. local crossHor
  1111. local crossVer
  1112.  
  1113. local camera = workspace.CurrentCamera
  1114. local vpSize = camera.ViewportSize
  1115.  
  1116. local completeStop = false
  1117. local function drawCrosshair()
  1118. if completeStop then return crosshair:Remove() end
  1119. if crossHor ~= nil or crossVer ~= nil then
  1120. return
  1121. end
  1122.  
  1123. local self = {
  1124. Visible = true;
  1125. Transparency = (1 - crosshair.transparency);
  1126. Thickness = crosshair.thickness;
  1127. Color = crosshair.color;
  1128. }
  1129.  
  1130. if crosshair.enabled ~= true then
  1131. self.Visible = false
  1132. end
  1133. local h,v = newdrawing("Line", self), newdrawing("Line", self)
  1134.  
  1135. if self.Visible then
  1136. local vpSize = camera.ViewportSize/2
  1137. local size = crosshair.size/2
  1138. local x,y = vpSize.X, vpSize.Y
  1139.  
  1140. h.From = v2new(x - size, y)
  1141. h.To = v2new(x + size, y)
  1142.  
  1143. v.From = v2new(x, y - size)
  1144. v.To = v2new(x, y + size)
  1145. end
  1146.  
  1147. crossHor = h
  1148. crossVer = v
  1149. end
  1150.  
  1151. local function updateCrosshair() -- no reason at all to update this each frame
  1152. -- I will replace with ViewportSize.Changed later
  1153. if completeStop then return end
  1154.  
  1155. if crossHor == nil or crossVer == nil then
  1156. return drawCrosshair()
  1157. end
  1158.  
  1159. local visible = crosshair.enabled
  1160.  
  1161. crossHor.Visible = visible
  1162. crossVer.Visible = visible
  1163.  
  1164. if visible then
  1165. local vpSize = camera.ViewportSize / 2
  1166. local size = crosshair.size/2
  1167. local x,y = vpSize.X, vpSize.Y
  1168.  
  1169. local color = crosshair.color
  1170. crossHor.Color = color
  1171. crossVer.Color = color
  1172.  
  1173. local trans = (1 - crosshair.transparency)
  1174. crossHor.Transparency = trans
  1175. crossVer.Transparency = trans
  1176.  
  1177. local thick = crosshair.thickness
  1178. crossHor.Thickness = thick
  1179. crossVer.Thickness = thick
  1180.  
  1181. crossHor.From = v2new(x - size, y)
  1182. crossHor.To = v2new(x + size, y)
  1183.  
  1184. crossVer.From = v2new(x, y - size)
  1185. crossVer.To = v2new(x, y + size)
  1186. end
  1187. end
  1188.  
  1189. function crosshair:Remove()
  1190. if crossHor ~= nil then
  1191. crossHor:Remove()
  1192. crossHor = nil
  1193. end
  1194. if crossVer ~= nil then
  1195. crossVer:Remove()
  1196. crossVer = nil
  1197. end
  1198. end
  1199.  
  1200. function crosshair:End()
  1201. completeStop = true
  1202. if crossHor ~= nil then
  1203. crossHor:Remove()
  1204. crossHor = nil
  1205. end
  1206. if crossVer ~= nil then
  1207. crossVer:Remove()
  1208. crossVer = nil
  1209. end
  1210. crosshair.enabled = false
  1211. end
  1212.  
  1213. crosshair.step = updateCrosshair
  1214. --function crosshair.step()
  1215. -- updateCrosshair()
  1216. --end
  1217. end
  1218.  
  1219.  
  1220. do
  1221. --/ Tracers
  1222.  
  1223. local tracers_settings = {}
  1224. tracers_settings.enabled = settings:Get("tracers.enabled", true)
  1225. tracers_settings.origin = v2new(camera.ViewportSize.X/2, camera.ViewportSize.Y)
  1226. tracers_settings.frommouse = settings:Get("tracers.frommouse", true)
  1227. tracers_settings.transparency = .6
  1228. tracers_settings.thickness = 1.5
  1229. tracers_settings.showteam = settings:Get("tracers.showteam", true)
  1230.  
  1231. tracers_settings.drawdistance = settings:Get("tracers.drawdistance", 4000)
  1232. tracers_settings.showvisible = settings:Get("tracers.showvisible", true)
  1233.  
  1234. tracers_settings.enemycolor = Color3.fromRGB(255,7,58) -- 238,38,37, 255,0,13, 255,7,58
  1235. tracers_settings.teamcolor = Color3.fromRGB(121,255,97) -- 121,255,97, 57,255,20
  1236. tracers_settings.visiblecolor = Color3.fromRGB(0, 141, 255)
  1237.  
  1238. setmetatable(tracers, {
  1239. __index = function(self, index)
  1240. if tracers_settings[index] ~= nil then
  1241. local Value = tracers_settings[index]
  1242. if typeof(Value) == "table" then
  1243. return typeof(Value) == "table" and Value.Value
  1244. else
  1245. return Value
  1246. end
  1247. end
  1248. warn(("AH8_ERROR : TracersSettings : Tried to index %s"):format(tostring(index)))
  1249. end;
  1250. __newindex = function(self, index, value)
  1251. if typeof(value) ~= "function" then
  1252. if tracers_settings[index] then
  1253. local v = tracers_settings[index]
  1254. if typeof(v) ~= "table" then
  1255. tracers_settings[index] = value
  1256. return
  1257. elseif v.Set then
  1258. v:Set(value)
  1259. return
  1260. end
  1261. end
  1262. end
  1263. rawset(self, index, value)
  1264. end;
  1265. })
  1266.  
  1267. local worldToViewportPoint = camera.WorldToViewportPoint
  1268.  
  1269. local completeStop = false
  1270. local drawn = {}
  1271.  
  1272. local function drawTemplate(player)
  1273. if completeStop then return end
  1274.  
  1275. if drawn[player] then
  1276. return drawn[player]
  1277. --tracers:Remove(player)
  1278. end
  1279.  
  1280.  
  1281. local a = newdrawing("Line", {
  1282. Color = tracers.enemycolor;
  1283. Thickness = tracers.thickness;
  1284. Transparency = 1 - tracers.transparency;
  1285. Visible = false;
  1286. })
  1287. drawn[player] = a
  1288. return a
  1289. end
  1290.  
  1291. function tracers:Draw(player, character, root, humanoid, onscreen, isteam, dist, screenpos)
  1292. if completeStop then return end
  1293.  
  1294. if tracers.enabled ~= true then return tracers:Remove(player) end
  1295. if character == nil then return tracers:Remove(player) end
  1296.  
  1297. if tracers.showteam~=true and isteam then return tracers:Remove(player) end
  1298.  
  1299. if root == nil then return tracers:Remove(player) end
  1300.  
  1301. if dist then
  1302. if dist > tracers.drawdistance then
  1303. return tracers:Remove(player)
  1304. end
  1305. end
  1306.  
  1307. local screenpos = worldToViewportPoint(camera, root.Position)
  1308.  
  1309. local line
  1310. if drawn[player] ~= nil then
  1311. line = drawn[player]
  1312. elseif onscreen then
  1313. line = drawTemplate(player)
  1314. end
  1315. if line then
  1316. if onscreen then
  1317. line.From = tracers.origin
  1318. line.To = v2new(screenpos.X, screenpos.Y)
  1319.  
  1320. local color
  1321. if isteam == false and tracers.showvisible then
  1322. if utility.isvisible(character, root, 0) then
  1323. color = tracers.visiblecolor
  1324. else
  1325. color = isteam and tracers.teamcolor or tracers.enemycolor
  1326. end
  1327. else
  1328. color = isteam and tracers.teamcolor or tracers.enemycolor
  1329. end
  1330.  
  1331. line.Color = color
  1332. end
  1333. line.Visible = onscreen
  1334. end
  1335. --return line
  1336. end
  1337.  
  1338. function tracers:Hide(player)
  1339. if completeStop then return end
  1340.  
  1341. local line = drawn[player]
  1342. if line then
  1343. line.Visible = false
  1344. end
  1345. end
  1346.  
  1347. function tracers:Remove(player)
  1348. if drawn[player] ~= nil then
  1349. drawn[player]:Remove()
  1350. drawn[player] = nil
  1351. end
  1352. end
  1353.  
  1354. function tracers:RemoveAll()
  1355. for i,v in pairs(drawn) do
  1356. pcall(function()
  1357. v:Remove()
  1358. end)
  1359. drawn[i] = nil
  1360. end
  1361. drawn = {}
  1362. end
  1363. function tracers:End()
  1364. completeStop = true
  1365. for i,v in pairs(drawn) do
  1366. pcall(function()
  1367. v:Remove()
  1368. end)
  1369. drawn[i] = nil
  1370. end
  1371. drawn = {}
  1372. end
  1373. end
  1374.  
  1375. do
  1376. --/ ESP
  1377. local esp_settings = {}
  1378.  
  1379. esp_settings.enabled = settings:Get("esp.enabled", true)
  1380. esp_settings.showteam = settings:Get("esp.showteam", true)
  1381.  
  1382. esp_settings.teamcolor = Color3.fromRGB(57,255,20) -- 121,255,97, 57,255,20
  1383. esp_settings.enemycolor = Color3.fromRGB(255,7,58) -- 238,38,37, 255,0,13, 255,7,58
  1384. esp_settings.visiblecolor = Color3.fromRGB(0, 141, 255) -- 0, 141, 255
  1385.  
  1386.  
  1387. esp_settings.size = settings:Get("esp.size", 16)
  1388. esp_settings.centertext = settings:Get("esp.centertext", true)
  1389. esp_settings.outline = settings:Get("esp.outline", true)
  1390. esp_settings.transparency = settings:Get("esp.transparency", 0.1)
  1391.  
  1392. esp_settings.drawdistance = settings:Get("esp.drawdistance", 1500)
  1393.  
  1394.  
  1395. esp_settings.showvisible = settings:Get("esp.showvisible", true)
  1396.  
  1397. esp_settings.yoffset = settings:Get("esp.yoffset", 0)
  1398.  
  1399. esp_settings.showhealth = settings:Get("esp.showhealth", true)
  1400. esp_settings.showdistance = settings:Get("esp.showdistance", true)
  1401.  
  1402.  
  1403. setmetatable(esp, {
  1404. __index = function(self, index)
  1405. if esp_settings[index] ~= nil then
  1406. local Value = esp_settings[index]
  1407. if typeof(Value) == "table" then
  1408. return typeof(Value) == "table" and Value.Value
  1409. else
  1410. return Value
  1411. end
  1412. end
  1413. warn(("AH8_ERROR : EspSettings : Tried to index %s"):format(tostring(index)))
  1414. end;
  1415. __newindex = function(self, index, value)
  1416. if typeof(value) ~= "function" then
  1417. if esp_settings[index] then
  1418. local v = esp_settings[index]
  1419. if typeof(v) ~= "table" then
  1420. esp_settings[index] = value
  1421. return
  1422. elseif v.Set then
  1423. v:Set(value)
  1424. return
  1425. end
  1426. end
  1427. end
  1428. rawset(self, index, value)
  1429. end;
  1430. })
  1431.  
  1432. local unpack = unpack
  1433. local findFirstChild = Instance.new("Part").FindFirstChild
  1434. local worldToViewportPoint = camera.WorldToViewportPoint
  1435. local getBoundingBox = Instance.new("Model").GetBoundingBox
  1436. local getExtentsSize = Instance.new("Model").GetExtentsSize
  1437.  
  1438. local floor = math.floor
  1439. local insert = table.insert
  1440. local concat = table.concat
  1441.  
  1442. local drawn = {}
  1443. local completeStop = false
  1444.  
  1445. local function drawTemplate(player)
  1446. if completeStop then return end
  1447. if drawn[player] then return drawn[player] end
  1448.  
  1449. local obj = newdrawing("Text", {
  1450. Text = "n/a",
  1451. Size = esp.size,
  1452. Color = esp.enemycolor,
  1453. Center = esp.centertext,
  1454. Outline = esp.outline,
  1455. Transparency = (1 - esp.transparency),
  1456. })
  1457. return obj
  1458. end
  1459.  
  1460. function esp:Draw(player, character, root, humanoid, onscreen, isteam, dist)
  1461. if completeStop then return end
  1462. if character == nil then return esp:Remove(player) end
  1463. if root == nil then return esp:Remove(player) end
  1464. if esp.showteam~=true and isteam then return esp:Remove(player) end
  1465.  
  1466. if dist then
  1467. if dist > esp.drawdistance then
  1468. return esp:Remove(player)
  1469. end
  1470. end
  1471.  
  1472. local where, isvis = worldToViewportPoint(camera, (root.CFrame * esp.offset).p);
  1473. --if not isvis then return esp:Remove(player) end
  1474.  
  1475.  
  1476. local oesp = drawn[player]
  1477. if oesp == nil then
  1478. oesp = drawTemplate(player)
  1479. drawn[player] = oesp
  1480. end
  1481.  
  1482. if oesp then
  1483. oesp.Visible = isvis
  1484. if isvis then
  1485. oesp.Position = v2new(where.X, where.Y)
  1486.  
  1487. local color
  1488. if isteam == false and esp.showvisible then
  1489. if utility.isvisible(character, root, 0) then
  1490. color = esp.visiblecolor
  1491. else
  1492. color = isteam and esp.teamcolor or esp.enemycolor
  1493. end
  1494. else
  1495. color = isteam and esp.teamcolor or esp.enemycolor
  1496. end
  1497.  
  1498. oesp.Color = color
  1499.  
  1500. oesp.Center = esp.centertext
  1501. oesp.Size = esp.size
  1502. oesp.Outline = esp.outline
  1503. oesp.Transparency = (1 - esp.transparency)
  1504.  
  1505. local texts = {
  1506. player.Name,
  1507. }
  1508.  
  1509. local b = humanoid and esp.showhealth and ("%s/%s"):format(floor(humanoid.Health + .5), floor(humanoid.MaxHealth + .5))
  1510. if b then
  1511. insert(texts, b)
  1512. end
  1513. local c = dist and esp.showdistance and ("%s"):format(floor(dist + .5))
  1514. if c then
  1515. insert(texts, c)
  1516. end
  1517.  
  1518. local text = "[ " .. concat(texts, " | ") .. " ]"
  1519. oesp.Text = text
  1520. end
  1521. end
  1522. end
  1523.  
  1524. function esp:Remove(player)
  1525. local data = drawn[player]
  1526. if data ~= nil then
  1527. data:Remove()
  1528. drawn[player] = nil
  1529. end
  1530. end
  1531.  
  1532. function esp:RemoveAll()
  1533. for i,v in pairs(drawn) do
  1534. pcall(function() v:Remove() end)
  1535. drawn[i] = nil
  1536. end
  1537. end
  1538.  
  1539. function esp:End()
  1540. completeStop = true
  1541. esp:RemoveAll()
  1542. end
  1543. end
  1544.  
  1545.  
  1546. do
  1547. --/ Boxes
  1548.  
  1549. local boxes_settings = {}
  1550. boxes_settings.enabled = settings:Get("boxes.enabled", true)
  1551. boxes_settings.transparency = settings:Get("boxes.transparency", .2)
  1552. boxes_settings.thickness = settings:Get("boxes.thickness", 1.5)
  1553. boxes_settings.showteam = settings:Get("boxes.showteam", true)
  1554.  
  1555. boxes_settings.teamcolor = Color3.fromRGB(57,255,20) -- 121,255,97, 57,255,20
  1556. boxes_settings.enemycolor = Color3.fromRGB(255,7,58) -- 238,38,37, 255,0,13, 255,7,58
  1557. boxes_settings.visiblecolor = Color3.fromRGB(0, 141, 255)
  1558.  
  1559. boxes_settings.thirddimension = settings:Get("boxes.thirddimension", false)
  1560.  
  1561. boxes_settings.showvisible = settings:Get("boxes.showvisible", true)
  1562.  
  1563. boxes_settings.dist3d = settings:Get("boxes.dist3d", 1000)
  1564. boxes_settings.drawdistance = settings:Get("boxes.drawdistance", 4000)
  1565. boxes_settings.color = Color3.fromRGB(255, 50, 50)
  1566.  
  1567. setmetatable(boxes, {
  1568. __index = function(self, index)
  1569. if boxes_settings[index] ~= nil then
  1570. local Value = boxes_settings[index]
  1571. if typeof(Value) == "table" then
  1572. return typeof(Value) == "table" and Value.Value
  1573. else
  1574. return Value
  1575. end
  1576. end
  1577. warn(("AH8_ERROR : BoxesSettings : Tried to index %s"):format(tostring(index)))
  1578. end;
  1579. __newindex = function(self, index, value)
  1580. if typeof(value) ~= "function" then
  1581. if boxes_settings[index] then
  1582. local v = boxes_settings[index]
  1583. if typeof(v) ~= "table" then
  1584. boxes_settings[index] = value
  1585. return
  1586. elseif v.Set then
  1587. v:Set(value)
  1588. return
  1589. end
  1590. end
  1591. end
  1592. rawset(self, index, value)
  1593. end;
  1594. })
  1595.  
  1596. local unpack = unpack
  1597. local findFirstChild = Instance.new("Part").FindFirstChild
  1598. local worldToViewportPoint = camera.WorldToViewportPoint
  1599. local worldToScreenPoint = camera.WorldToScreenPoint
  1600. local getBoundingBox = Instance.new("Model").GetBoundingBox
  1601. local getExtentsSize = Instance.new("Model").GetExtentsSize
  1602.  
  1603. local completeStop = false
  1604. local drawn = {}
  1605. local function drawTemplate(player, amount)
  1606. if completeStop then return end
  1607.  
  1608. if drawn[player] then
  1609. if #drawn[player] == amount then
  1610. return drawn[player]
  1611. end
  1612. boxes:Remove(player)
  1613. end
  1614.  
  1615. local props = {
  1616. Visible = true;
  1617. Transparency = 1 - boxes.transparency;
  1618. Thickness = boxes.thickness;
  1619. Color = boxes.color;
  1620. }
  1621.  
  1622. local a = {}
  1623. for i = 1,amount or 4 do
  1624. a[i] = newdrawing("Line", props)
  1625. end
  1626.  
  1627. drawn[player] = {unpack(a)}
  1628. return unpack(a)
  1629. end
  1630.  
  1631. local function updateLine(line, from, to, vis, color)
  1632. if line == nil then return end
  1633.  
  1634. line.Visible = vis
  1635. if vis then
  1636. line.From = from
  1637. line.To = to
  1638. line.Color = color
  1639. end
  1640. end
  1641.  
  1642. function boxes:Draw(player, character, root, humanoid, onscreen, isteam, dist) -- No skid plox
  1643. if completeStop then return end
  1644. if character == nil then return boxes:Remove(player) end
  1645. if root == nil then return boxes:Remove(player) end
  1646. if not onscreen then return boxes:Remove(player) end
  1647. if boxes.showteam == false and isteam then return boxes:Remove(player) end
  1648.  
  1649. local _3dimension = boxes.thirddimension
  1650. if dist ~= nil then
  1651. if dist > boxes.drawdistance then
  1652. return boxes:Remove(player)
  1653. elseif _3dimension and dist > boxes.dist3d then
  1654. _3dimension = false
  1655. end
  1656. end
  1657.  
  1658. local color
  1659. if isteam == false and boxes.showvisible then
  1660. if utility.isvisible(character, root, 0) then
  1661. color = boxes.visiblecolor
  1662. else
  1663. color = isteam and boxes.teamcolor or boxes.enemycolor
  1664. end
  1665. else
  1666. color = isteam and boxes.teamcolor or boxes.enemycolor
  1667. end
  1668.  
  1669. --size = ... lastsize--, v3new(5,8,0) --getBoundingBox(character)--]] root.CFrame, getExtentsSize(character)--]] -- Might change this later idk + idc
  1670. if _3dimension then
  1671.  
  1672. local tlb, trb, blb, brb, tlf, trf, blf, brf, tlf0, trf0, blf0, brf0
  1673. if drawn[player] == nil or #drawn[player] ~= 12 then
  1674. tlb, trb, blb, brb, tlf, trf ,blf, brf, tlf0, trf0, blf0, brf0 = drawTemplate(player, 12)
  1675. else
  1676. tlb, trb, blb, brb, tlf, trf ,blf, brf, tlf0, trf0, blf0, brf0 = unpack(drawn[player])
  1677. end
  1678.  
  1679. local pos, size = root.CFrame, root.Size--lastsize--, v3new(5,8,0)
  1680.  
  1681. local topleftback, topleftbackvisible = worldToViewportPoint(camera, (pos * cfnew(-size.X, size.Y, size.Z)).p);
  1682. local toprightback, toprightbackvisible = worldToViewportPoint(camera, (pos * cfnew(size.X, size.Y, size.Z)).p);
  1683. local btmleftback, btmleftbackvisible = worldToViewportPoint(camera, (pos * cfnew(-size.X, -size.Y, size.Z)).p);
  1684. local btmrightback, btmrightbackvisible = worldToViewportPoint(camera, (pos * cfnew(size.X, -size.Y, size.Z)).p);
  1685.  
  1686. local topleftfront, topleftfrontvisible = worldToViewportPoint(camera, (pos * cfnew(-size.X, size.Y, -size.Z)).p);
  1687. local toprightfront, toprightfrontvisible = worldToViewportPoint(camera, (pos * cfnew(size.X, size.Y, -size.Z)).p);
  1688. local btmleftfront, btmleftfrontvisible = worldToViewportPoint(camera, (pos * cfnew(-size.X, -size.Y, -size.Z)).p);
  1689. local btmrightfront, btmrightfrontvisible = worldToViewportPoint(camera, (pos * cfnew(size.X, -size.Y, -size.Z)).p);
  1690.  
  1691. local topleftback = v2new(topleftback.X, topleftback.Y)
  1692. local toprightback = v2new(toprightback.X, toprightback.Y)
  1693. local btmleftback = v2new(btmleftback.X, btmleftback.Y)
  1694. local btmrightback = v2new(btmrightback.X, btmrightback.Y)
  1695.  
  1696. local topleftfront = v2new(topleftfront.X, topleftfront.Y)
  1697. local toprightfront = v2new(toprightfront.X, toprightfront.Y)
  1698. local btmleftfront = v2new(btmleftfront.X, btmleftfront.Y)
  1699. local btmrightfront = v2new(btmrightfront.X, btmrightfront.Y)
  1700.  
  1701. -- pls don't copy this bad code
  1702. updateLine(tlb, topleftback, toprightback, topleftbackvisible, color)
  1703. updateLine(trb, toprightback, btmrightback, toprightbackvisible, color)
  1704. updateLine(blb, btmleftback, topleftback, btmleftbackvisible, color)
  1705. updateLine(brb, btmleftback, btmrightback, btmrightbackvisible, color)
  1706.  
  1707. --
  1708.  
  1709. updateLine(brf, btmrightfront, btmleftfront, btmrightfrontvisible, color)
  1710. updateLine(tlf, topleftfront, toprightfront, topleftfrontvisible, color)
  1711. updateLine(trf, toprightfront, btmrightfront, toprightfrontvisible, color)
  1712. updateLine(blf, btmleftfront, topleftfront, btmleftfrontvisible, color)
  1713.  
  1714. --
  1715.  
  1716. updateLine(brf0, btmrightfront, btmrightback, btmrightfrontvisible, color)
  1717. updateLine(tlf0, topleftfront, topleftback, topleftfrontvisible, color)
  1718. updateLine(trf0, toprightfront, toprightback, toprightfrontvisible, color)
  1719. updateLine(blf0, btmleftfront, btmleftback, btmleftfrontvisible, color)
  1720. return
  1721. else
  1722.  
  1723. local tl, tr, bl, br
  1724. if drawn[player] == nil or #drawn[player] ~= 4 then
  1725. tl, tr, bl, br = drawTemplate(player, 4)
  1726. else
  1727. tl, tr, bl, br = unpack(drawn[player])
  1728. end
  1729.  
  1730. local pos, size = root.CFrame, root.Size
  1731.  
  1732. local topleft, topleftvisible = worldToViewportPoint(camera, (pos * cfnew(-size.X, size.Y, 0)).p);
  1733. local topright, toprightvisible = worldToViewportPoint(camera, (pos * cfnew(size.X, size.Y, 0)).p);
  1734. local btmleft, btmleftvisible = worldToViewportPoint(camera, (pos * cfnew(-size.X, -size.Y, 0)).p);
  1735. local btmright, btmrightvisible = worldToViewportPoint(camera, (pos * cfnew(size.X, -size.Y, 0)).p);
  1736.  
  1737. local topleft = v2new(topleft.X, topleft.Y)
  1738. local topright = v2new(topright.X, topright.Y)
  1739. local btmleft = v2new(btmleft.X, btmleft.Y)
  1740. local btmright = v2new(btmright.X, btmright.Y)
  1741.  
  1742. updateLine(tl, topleft, topright, topleftvisible, color)
  1743. updateLine(tr, topright, btmright, toprightvisible, color)
  1744. updateLine(bl, btmleft, topleft, btmleftvisible, color)
  1745. updateLine(br, btmleft, btmright, btmrightvisible, color)
  1746. return
  1747. end
  1748.  
  1749.  
  1750. -- I have never been more bored when doing 3d boxes.
  1751. end
  1752.  
  1753. function boxes:Remove(player)
  1754. local data = drawn[player]
  1755. if data == nil then return end
  1756.  
  1757. if data then
  1758. for i,v in pairs(data) do
  1759. v:Remove()
  1760. data[i] = nil
  1761. end
  1762. end
  1763. drawn[player] = nil
  1764. end
  1765.  
  1766. function boxes:RemoveAll()
  1767. for i,v in pairs(drawn) do
  1768. pcall(function()
  1769. for i2,v2 in pairs(v) do
  1770. v2:Remove()
  1771. v[i] = nil
  1772. end
  1773. end)
  1774. drawn[i] = nil
  1775. end
  1776. drawn = {}
  1777. end
  1778.  
  1779. function boxes:End()
  1780. completeStop = true
  1781. for i,v in pairs(drawn) do
  1782. for i2,v2 in pairs(v) do
  1783. pcall(function()
  1784. v2:Remove()
  1785. v[i2] = nil
  1786. end)
  1787. end
  1788. drawn[i] = nil
  1789. end
  1790. drawn = {}
  1791. end
  1792. end
  1793.  
  1794.  
  1795. do
  1796. --/ Visuals
  1797.  
  1798. visuals.enabled = settings:Get("visuals.enabled", true)
  1799.  
  1800. local getPlayers = players.GetPlayers
  1801.  
  1802. local credits
  1803. local circle
  1804.  
  1805. local completeStop = false
  1806. bindEvent(players.PlayerRemoving, function(p)
  1807. if completeStop then return end
  1808. tracers:Remove(p)
  1809. boxes:Remove(p)
  1810. esp:Remove(p)
  1811. end)
  1812.  
  1813. local profilebegin = DEBUG_MODE and debug.profilebegin or function() end
  1814. local profileend = DEBUG_MODE and debug.profileend or function() end
  1815.  
  1816.  
  1817. local unpack = unpack
  1818. local findFirstChild = Instance.new("Part").FindFirstChild
  1819. local worldToViewportPoint = camera.WorldToViewportPoint
  1820.  
  1821. local function remove(p)
  1822. esp:Remove(p)
  1823. boxes:Remove(p)
  1824. tracers:Remove(p)
  1825. end
  1826.  
  1827. local hashes = {}
  1828. function visuals.step()
  1829. --if visuals.enabled ~= true then return clearDrawn() end
  1830. if completeStop then return end
  1831.  
  1832.  
  1833. local viewportsize = camera.ViewportSize
  1834. if credits == nil then
  1835. credits = newdrawing("Text", {
  1836. Text = "AimHot v8, Herrtt#3868"; -- yes now be happy this is free
  1837. Color = Color3.new(255,255,255);
  1838. Size = 25.0;
  1839. Transparency = .8;
  1840. Position = v2new(viewportsize.X/8, 6);
  1841. Outline = true;
  1842. Visible = true;
  1843. })
  1844. else
  1845. credits.Position = v2new(viewportsize.X/8, 6);
  1846. end
  1847.  
  1848. if aimbot.enabled and aimbot.fovenabled and visuals.enabled then
  1849. profilebegin("fov.step")
  1850. if circle == nil then
  1851. circle = newdrawing("Circle", {
  1852. Position = v2new(mouse.X, mouse.Y+36),
  1853. Radius = aimbot.fovsize,
  1854. Color = Color3.fromRGB(240,240,240),
  1855. Thickness = aimbot.fovthickness,
  1856. Filled = false,
  1857. Transparency = .8,
  1858. NumSides = aimbot.fovsides,
  1859. Visible = aimbot.fovshow;
  1860. })
  1861. else
  1862. if aimbot.fovshow then
  1863. circle.Position = v2new(mouse.X, mouse.Y+36)
  1864. circle.Radius = aimbot.fovsize
  1865. circle.NumSides = aimbot.fovsides
  1866. circle.Thickness = aimbot.fovthickness
  1867. end
  1868. circle.Visible = aimbot.fovshow
  1869. end
  1870. profileend("fov.step")
  1871. elseif circle ~= nil then
  1872. circle:Remove()
  1873. circle = nil
  1874. end
  1875.  
  1876. if visuals.enabled and crosshair.enabled then
  1877. profilebegin("crosshair.step")
  1878. crosshair.step()
  1879. profileend("crosshair.step")
  1880. else
  1881. crosshair:Remove()
  1882. end
  1883.  
  1884. if visuals.enabled and (esp.enabled or boxes.enabled or tracers.enabled) then
  1885. profilebegin("tracers.origin")
  1886. if tracers.frommouse then
  1887. tracers.origin = v2new(mouse.X, mouse.Y+36) -- thanks roblox
  1888. else
  1889. tracers.origin = v2new(viewportsize.X/2, viewportsize.Y)
  1890. end
  1891. profileend("tracers.origin")
  1892.  
  1893. if esp.enabled then
  1894. esp.offset = cfnew(0, esp.yoffset, 0)
  1895. end
  1896.  
  1897. for i,v in pairs(getPlayers(players)) do
  1898. if (v~=locpl) then
  1899. local character = utility.getcharacter(v)
  1900. if character and isDescendantOf(character, game) == true then
  1901. local root = utility.getroot(character)
  1902. local humanoid = findFirstChildOfClass(character, "Humanoid")
  1903. if root and isDescendantOf(character, game) == true then
  1904. local screenpos, onscreen = worldToViewportPoint(camera, root.Position)
  1905. local dist = utility.myroot and (utility.myroot.Position - root.Position).Magnitude
  1906. local isteam = (v.Team~=nil and v.Team==locpl.Team) and not v.Neutral or false
  1907.  
  1908. if boxes.enabled then -- Profilebegin is life
  1909. profilebegin("boxes.draw")
  1910. boxes:Draw(v, character, root, humanoid, onscreen, isteam, dist)
  1911. profileend("boxes.draw")
  1912. else
  1913. boxes:Remove(v)
  1914. end
  1915. if tracers.enabled then
  1916. profilebegin("tracers.draw")
  1917. tracers:Draw(v, character, root, humanoid, onscreen, isteam, dist, screenpos)
  1918. profileend("tracers.draw")
  1919. else
  1920. tracers:Remove(v)
  1921. end
  1922.  
  1923. if esp.enabled then
  1924. profilebegin("esp.draw")
  1925. esp:Draw(v, character, root, humanoid, onscreen, isteam, dist)
  1926. profileend("esp.draw")
  1927. else
  1928. esp:Remove(v)
  1929. end
  1930. else
  1931. remove(v)
  1932. end
  1933. else
  1934. remove(v)
  1935. end
  1936. end
  1937. end
  1938. else
  1939. -- mhm
  1940. tracers:RemoveAll()
  1941. boxes:RemoveAll()
  1942. esp:RemoveAll()
  1943. crosshair:Remove()
  1944. end
  1945. end
  1946.  
  1947. function visuals:End()
  1948. completeStop = true
  1949. crosshair:End()
  1950. boxes:End()
  1951. tracers:End()
  1952. esp:End()
  1953.  
  1954. clearDrawn()
  1955. end
  1956.  
  1957. spawn(function()
  1958. while ah8 and ah8.enabled do -- I dont know why I am doing this
  1959. for i,v in pairs(hashes) do
  1960. hashes[i] = nil
  1961. wait()
  1962. end
  1963. wait(3)
  1964. end
  1965. end)
  1966. end
  1967.  
  1968.  
  1969.  
  1970. -- Ok yes
  1971. do
  1972. --/ Run
  1973.  
  1974. local pcall = pcall;
  1975. local tostring = tostring;
  1976. local warn = warn;
  1977. local debug = debug;
  1978. local profilebegin = DEBUG_MODE and debug.profilebegin or function() end
  1979. local profileend = DEBUG_MODE and debug.profileend or function() end
  1980.  
  1981. local renderstep = runservice.RenderStepped
  1982. local heartbeat = runservice.Heartbeat
  1983. local stepped = runservice.Stepped
  1984. local wait = renderstep.wait
  1985.  
  1986. local function Warn(a, ...) -- ok frosty get to bed
  1987. warn(tostring(a):format(...))
  1988. end
  1989.  
  1990. run.dt = 0
  1991. run.time = tick()
  1992.  
  1993. local engine = {
  1994. {
  1995. name = 'visuals.step',
  1996. func = visuals.step
  1997. };
  1998. }
  1999. local heartengine = {
  2000. {
  2001. name = 'aimbot.step',
  2002. func = aimbot.step
  2003. };
  2004. }
  2005. local whilerender = {
  2006. }
  2007.  
  2008. run.onstep = {}
  2009. run.onthink = {}
  2010. run.onrender = {}
  2011. function run.wait()
  2012. wait(renderstep)
  2013. end
  2014.  
  2015. local fireonstep = event.new(run.onstep)
  2016. local fireonthink = event.new(run.onthink)
  2017. local fireonrender = event.new(run.onrender)
  2018.  
  2019. local rstname = "AH.Renderstep"
  2020. bindEvent(renderstep, function(delta)
  2021. profilebegin(rstname)
  2022. local ntime = tick()
  2023. run.dt = ntime - run.time
  2024. run.time = ntime
  2025.  
  2026. for i,v in pairs(engine) do
  2027.  
  2028. profilebegin(v.name)
  2029. xpcall(v.func, function(err)
  2030. if (DEBUG_MODE == true) then
  2031. Warn("AH8_ERROR (RENDERSTEPPED) : Failed to run %s! %s | %s", v.name, tostring(err), debug.traceback())
  2032. end
  2033. engine[i] = nil
  2034. end, run.dt)
  2035. profileend(v.name)
  2036.  
  2037. end
  2038.  
  2039. profileend(rstname)
  2040. end)
  2041.  
  2042. local hbtname = "AH.Heartbeat"
  2043. bindEvent(heartbeat, function(delta)
  2044. profilebegin(hbtname)
  2045.  
  2046. for i,v in pairs(heartengine) do
  2047.  
  2048. profilebegin(v.name)
  2049. xpcall(v.func, function(err)
  2050. if (DEBUG_MODE == true) then
  2051. Warn("AH8_ERROR (HEARTBEAT) : Failed to run %s! %s | %s", v.name, tostring(err), debug.traceback())
  2052. end
  2053. heartengine[i] = nil
  2054. end, delta)
  2055. profileend(v.name)
  2056.  
  2057. end
  2058.  
  2059. profileend(hbtname)
  2060. end)
  2061.  
  2062. local stpname = "AH.Stepped"
  2063. bindEvent(stepped, function(delta)
  2064.  
  2065. profilebegin(stpname)
  2066.  
  2067. for i,v in pairs(whilerender) do
  2068.  
  2069. profilebegin(v.name)
  2070. xpcall(v.func, function(err)
  2071. if (DEBUG_MODE == true) then
  2072. Warn("AH8_ERROR (STEPPED) : Failed to run %s! %s | %s", v.name, tostring(err), debug.traceback())
  2073. end
  2074. heartengine[i] = nil
  2075. end, delta)
  2076. profileend(v.name)
  2077.  
  2078. end
  2079.  
  2080. profileend(stpname)
  2081. end)
  2082. end
  2083.  
  2084. do
  2085. --/ Main or something I am not sure what I am writing anymore
  2086. settings:Save()
  2087.  
  2088. ah8.enabled = true
  2089. function ah8:close()
  2090. spawn(function() pcall(visuals.End, visuals) end)
  2091. spawn(function() pcall(aimbot.End, aimbot) end)
  2092. spawn(function() pcall(hud.End, hud) end)
  2093. spawn(function()
  2094. for i,v in pairs(connections) do
  2095. pcall(function() v:Disconnect() end)
  2096. end
  2097. end)
  2098. ah8 = nil
  2099. shared.ah8 = nil -- k
  2100.  
  2101. settings:Save()
  2102. end
  2103.  
  2104. ah8.visible = hud.Visible
  2105. function ah8:show()
  2106. hud:show()
  2107. ah8.visible = hud.Visible
  2108. end
  2109.  
  2110. function ah8:hide()
  2111. hud:hide()
  2112. ah8.visible = hud.Visible
  2113. end
  2114.  
  2115. setmetatable(ah8, { -- ok safazi be happy now
  2116. __newindex = function(self, index, value)
  2117. if (index == "Keybind") then
  2118. settings:Set("hud.keybind", value)
  2119. hud.Keybind = value
  2120. return
  2121. end
  2122. end;
  2123. })
  2124.  
  2125. shared.ah8 = ah8
  2126.  
  2127. local players = game:GetService("Players")
  2128. local loc = players.LocalPlayer
  2129. bindEvent(players.PlayerRemoving, function(p)
  2130. if p == loc then
  2131. settings:Save()
  2132. end
  2133. end)
  2134.  
  2135. end
  2136.  
  2137.  
  2138. -- I didn't think this ui lib through
  2139. local Aiming = hud:AddTab({
  2140. Text = "Aiming",
  2141. })
  2142.  
  2143.  
  2144. local AimbotToggle = Aiming:AddToggleCategory({
  2145. Text = "Aimbot",
  2146. State = aimbot.enabled,
  2147. }, function(state)
  2148. aimbot.enabled = state
  2149. end)
  2150.  
  2151.  
  2152. AimbotToggle:AddKeybind({
  2153. Text = "keybind",
  2154. Current = aimbot.keybind,
  2155. }, function(new)
  2156. aimbot.keybind = new.Name
  2157. end)
  2158.  
  2159.  
  2160. AimbotToggle:AddToggle({
  2161. Text = "Press To Enable",
  2162. State = aimbot.presstoenable,
  2163. }, function(state)
  2164. aimbot.presstoenable = state
  2165. end)
  2166.  
  2167. AimbotToggle:AddToggle({
  2168. Text = "Lock To Target",
  2169. State = aimbot.locktotarget,
  2170. }, function(state)
  2171. aimbot.locktotarget = state
  2172. end)
  2173.  
  2174.  
  2175. AimbotToggle:AddToggle({
  2176. Text = "Check If Alive",
  2177. State = aimbot.checkifalive,
  2178. }, function(state)
  2179. aimbot.checkifalive = state
  2180. end)
  2181.  
  2182. -- settings stuff
  2183. local AimbotSettings = Aiming:AddCategory({
  2184. Text = "Settings",
  2185. })
  2186.  
  2187. AimbotSettings:AddLabel({
  2188. Text = "decrease sens if aimbot is wobbly"
  2189. })
  2190.  
  2191. AimbotSettings:AddSlider({
  2192. Text = "Sensitivity",
  2193. Current = aimbot.sensitivity
  2194. }, {0.01, 10, 0.01}, function(new)
  2195. aimbot.sensitivity = new
  2196. end)
  2197.  
  2198. AimbotSettings:AddToggle({
  2199. Text = "Ignore Team",
  2200. State = aimbot.ignoreteam
  2201. }, function(new)
  2202. aimbot.ignoreteam = new
  2203. end)
  2204.  
  2205.  
  2206. AimbotSettings:AddToggle({
  2207. Text = "Ignore Walls",
  2208. State = aimbot.ignorewalls
  2209. }, function(new)
  2210. aimbot.ignorewalls = new
  2211. end)
  2212.  
  2213. AimbotSettings:AddSlider({
  2214. Text = "Max Obscuring Parts",
  2215. Current = aimbot.maxobscuringparts,
  2216. }, {0, 50, 1}, function(new)
  2217. aimbot.maxobscuringparts = new
  2218. end)
  2219.  
  2220.  
  2221.  
  2222. local FieldOfView = Aiming:AddToggleCategory({
  2223. Text = "fov",
  2224. State = aimbot.fovenabled,
  2225. }, function(state)
  2226. aimbot.fovenabled = state
  2227. end)
  2228.  
  2229. FieldOfView:AddSlider({
  2230. Text = "Radius",
  2231. Current = aimbot.fovsize,
  2232. }, {1, 1000, 1}, function(new)
  2233. aimbot.fovsize = new
  2234. end)
  2235.  
  2236. FieldOfView:AddSlider({
  2237. Text = "Sides",
  2238. Current = aimbot.fovsides,
  2239. }, {6, 40, 1}, function(new)
  2240. aimbot.fovsides = new
  2241. end)
  2242.  
  2243.  
  2244. FieldOfView:AddSlider({
  2245. Text = "Thickness",
  2246. Current = aimbot.fovthickness,
  2247. }, {0.1, 50, 0.1}, function(new)
  2248. aimbot.fovthickness = new
  2249. end)
  2250.  
  2251.  
  2252.  
  2253. local Visuals = hud:AddTab({
  2254. Text = "Visuals"
  2255. })
  2256.  
  2257. Visuals:AddToggle({
  2258. Text = "Enabled",
  2259. State = visuals.enabled,
  2260. }, function(new)
  2261. visuals.enabled = new
  2262. end)
  2263.  
  2264. local Boxes = Visuals:AddToggleCategory({
  2265. Text = "Boxes",
  2266. State = boxes.enabled,
  2267. }, function(new)
  2268. boxes.enabled = new
  2269. end)
  2270.  
  2271. Boxes:AddToggle({
  2272. Text = "Show Team",
  2273. State = boxes.showteam,
  2274. }, function(new)
  2275. boxes.showteam = new
  2276. end)
  2277.  
  2278. Boxes:AddToggle({
  2279. Text = "Visible check",
  2280. State = boxes.showvisible,
  2281. }, function(new)
  2282. boxes.showvisible = new
  2283. end)
  2284.  
  2285. Boxes:AddSlider({
  2286. Text = "Draw Distance",
  2287. Current = boxes.drawdistance,
  2288. }, {100,100000,100}, function(new)
  2289. boxes.drawdistance = new
  2290. end)
  2291.  
  2292. Boxes:AddToggle({
  2293. Text = "3d",
  2294. State = boxes.thirddimension,
  2295. }, function(new)
  2296. boxes.thirddimension = new
  2297. end)
  2298.  
  2299. Boxes:AddSlider({
  2300. Text = "3d distance",
  2301. Current = boxes.dist3d,
  2302. }, {5,10000,5}, function(new)
  2303. boxes.dist3d = new
  2304. end)
  2305.  
  2306.  
  2307. local Esp = Visuals:AddToggleCategory({
  2308. Text = "Esp",
  2309. State = esp.enabled,
  2310. }, function(new)
  2311. esp.enabled = new
  2312. end)
  2313.  
  2314. Esp:AddToggle({
  2315. Text = "Show Team",
  2316. State = esp.showteam
  2317. }, function(new)
  2318. esp.showteam = new
  2319. end)
  2320.  
  2321. Esp:AddToggle({
  2322. Text = "Visible check",
  2323. State = esp.showvisible,
  2324. }, function(new)
  2325. esp.showvisible = new
  2326. end)
  2327.  
  2328. Esp:AddSlider({
  2329. Text = "Offset",
  2330. Current = esp.yoffset,
  2331. }, {-50, 50, 0.01}, function(new)
  2332. esp.yoffset = new
  2333. end)
  2334.  
  2335. Esp:AddSlider({
  2336. Text = "Transparency",
  2337. Current = esp.transparency
  2338. }, {0, 1, 0.01}, function(new)
  2339. esp.transparency = new
  2340. end)
  2341.  
  2342. Esp:AddSlider({
  2343. Text = "Size",
  2344. Current = esp.size,
  2345. }, {1, 100, 1}, function(new)
  2346. esp.size = new
  2347. end)
  2348.  
  2349. Esp:AddToggle({
  2350. Text = "Center Text",
  2351. State = esp.centertext
  2352. }, function(new)
  2353. esp.centertext = new
  2354. end)
  2355.  
  2356. Esp:AddToggle({
  2357. Text = "Outline",
  2358. State = esp.outline,
  2359. }, function(new)
  2360. esp.outline = new
  2361. end)
  2362.  
  2363. Esp:AddSlider({
  2364. Text = "Draw Distance",
  2365. Current = esp.drawdistance
  2366. }, {100,100000,100}, function(new)
  2367. esp.drawdistance = new
  2368. end)
  2369.  
  2370.  
  2371. --
  2372. local Tracers = Visuals:AddToggleCategory({
  2373. Text = "Tracers",
  2374. State = tracers.enabled,
  2375. }, function(new)
  2376. tracers.enabled = new
  2377. end)
  2378.  
  2379. Tracers:AddToggle({
  2380. Text = "Show Team",
  2381. State = tracers.showteam
  2382. }, function(new)
  2383. tracers.showteam = new
  2384. end)
  2385.  
  2386. Tracers:AddToggle({
  2387. Text = "Visible check",
  2388. State = tracers.showvisible,
  2389. }, function(new)
  2390. tracers.showvisible = new
  2391. end)
  2392.  
  2393. Tracers:AddToggle({
  2394. Text = "From Mouse",
  2395. State = tracers.frommouse,
  2396. }, function(new)
  2397. tracers.frommouse = new
  2398. end)
  2399.  
  2400. Tracers:AddSlider({
  2401. Text = "Draw Distance",
  2402. Current = tracers.drawdistance,
  2403. }, {100,100000,100}, function(new)
  2404. tracers.drawdistance = new
  2405. end)
  2406.  
  2407.  
  2408. local Crosshair = Visuals:AddToggleCategory({
  2409. Text = "Crosshair",
  2410. State = crosshair.enabled,
  2411. }, function(new)
  2412. crosshair.enabled = new
  2413. end)
  2414.  
  2415. Crosshair:AddSlider({
  2416. Text = "Transparency",
  2417. Current = crosshair.transparency
  2418. }, {0,1,0.01}, function(new)
  2419. crosshair.transparency = new
  2420. end)
  2421.  
  2422. Crosshair:AddSlider({
  2423. Text = "Size",
  2424. Current = crosshair.size,
  2425. }, {1,2000,1}, function(new)
  2426. crosshair.size = new
  2427. end)
  2428.  
  2429. Crosshair:AddSlider({
  2430. Text = "Thickness",
  2431. Current = crosshair.thickness
  2432. }, {1,50,1}, function(new)
  2433. crosshair.thickness = new
  2434. end)
  2435.  
  2436.  
  2437. local Hud = hud:AddTab({
  2438. Text = "Hud",
  2439. })
  2440.  
  2441. hud.Keybind = settings:Get("hud.keybind", "Insert").Value
  2442. Hud:AddKeybind({
  2443. Text = "Toggle",
  2444. Current = hud.Keybind,
  2445. }, function(new)
  2446. settings:Set("hud.keybind", new.Name)
  2447. hud.Keybind = new.Name
  2448. end)
  2449.  
  2450. Hud:AddButton({
  2451. Text = "Exit"
  2452. }, function()
  2453. ah8:close()
  2454. end)
  2455.  
  2456. warn("AH8_MAIN : Reached end of script")
  2457.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement