Advertisement
WoofieYT

Alpha Infection Aim Bot Script

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