Advertisement
eruaaaaaaa

auto

May 1st, 2022 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.90 KB | None | 0 0
  1. local Aimbot = {}
  2. Aimbot.__index = Aimbot
  3.  
  4. --//Localization
  5. local Instance = Instance
  6. local game = game
  7. local math = math
  8. local setmetatable = setmetatable
  9. local workspace = workspace
  10. local CFrame = CFrame
  11. local Vector3 = Vector3
  12. local Vector2 = Vector2
  13. local Random = Random
  14. local RaycastParams = RaycastParams
  15. local pairs = pairs
  16. local string = string
  17. local table = table
  18. local Enum = Enum
  19. local getrawmetatable = getrawmetatable
  20. local replaceclosure = replaceclosure
  21. local setreadonly = setreadonly
  22. local checkcaller = checkcaller
  23. local getclock = os.clock
  24. local mouse1press = mouse1press
  25. local mouse1release = mouse1release
  26. local mousemoverel = mousemoverel
  27. local hookfunction = hookfunction
  28. local newcclosure = newcclosure
  29.  
  30. --//Instance methods
  31. local Raycast = workspace.Raycast
  32. local GetPropertyChangedSignal = game.GetPropertyChangedSignal
  33. local Connect = game.ChildAdded.Connect
  34. local Destroy = game.Destroy
  35. local GetService = game.GetService
  36. local FindFirstChildOfClass = game.FindFirstChildOfClass
  37. local FindFirstChild = game.FindFirstChild
  38. local GetChildren = game.GetChildren
  39. local IsA = game.IsA
  40. local IsDescendantOf = game.IsDescendantOf
  41.  
  42. --//Services
  43. local Players = GetService(game, "Players")
  44. local UserInputService = GetService(game, "UserInputService")
  45. local RunService = GetService(game, "RunService")
  46. local GuiService = GetService(game, "GuiService")
  47.  
  48. --//Temporary instances
  49. local tempcam = Instance.new("Camera")
  50. local tempconn = Connect(game.AncestryChanged, function() end)
  51.  
  52. --//Other instance methods
  53. local WorldToViewportPoint = tempcam.WorldToViewportPoint
  54. local WorldToScreenPoint = tempcam.WorldToScreenPoint
  55. local GetPlayers = Players.GetPlayers
  56. local GetMouseLocation = UserInputService.GetMouseLocation
  57. local ViewportPointToRay = tempcam.ViewportPointToRay
  58. local Disconnect = tempconn.Disconnect
  59. local Lerp2D = Vector2.new().Lerp
  60.  
  61. --//Cleanup
  62. Destroy(tempcam)
  63. Disconnect(tempconn)
  64.  
  65. --//Local functions and constant variables
  66. Aimbot.DefaultSettings = {
  67. RadiusPercentAt1 = 130, --//Radius percent of screen width at 1 stud for aimbot
  68. XSmoothingPercent = .125,
  69. YSmoothingPercent = .15, --//Slows down mouse movement by a percentage of screen width
  70. DistanceBias = 1, --//Raises sensitivity of distance from camera when choosing target
  71. Offset = Vector2.new(0, 0), --//Mouse offset in pixels
  72. SilentRadiusPercentAt1 = 130, --//Radius percent of screen width at 1 stud for silent aim
  73. IgnoreTransparent = true, --//Whether to ignore transparent parts above the threshold or not in wallcheck
  74. IgnoreWater = false, --//Whether to ignore water in wallcheck
  75. TransparencyThreshold = .5, --//Threshold for what transparency or greater counts as ignorable
  76. DefaultIgnore = {}, --//List for what the aimbot should ignore during wallcheck
  77. IsAliveCheck = true, --//Ignore dead players
  78. TeamCheck = true,
  79. TriggerBot = true,
  80. InvisibleCheck = true,
  81. TriggerBotTime = 160,
  82. TriggerBotSemi = false,
  83. TriggerBotTimeBetweenClick = .3,
  84. HoldControl = false,
  85. Holding = false,
  86. SizeCheck = false
  87. }
  88.  
  89. local LocalPlayer = Players.LocalPlayer
  90. local Mouse = LocalPlayer.GetMouse(LocalPlayer)
  91. local GuiInset = GuiService.GetGuiInset(GuiService)
  92. local GameMeta = getrawmetatable(game)
  93.  
  94. local function OnCameraChange()
  95. local cam = workspace.CurrentCamera
  96.  
  97. Aimbot.Camera = cam
  98. Aimbot.ViewportSize = cam.ViewportSize
  99. Aimbot.WidthFactor = cam.ViewportSize.X / 100
  100. end
  101.  
  102. local function UpdateTable(tab, update)
  103. for name, value in pairs(update) do
  104. if tab[name] == nil then
  105. tab[name] = value
  106. end
  107. end
  108. end
  109.  
  110. local function GetChildrenWhichIsA(part, baseclass)
  111. local parts = GetChildren(part)
  112. local len = #parts
  113.  
  114. local filtered = {}
  115.  
  116. if len > 0 then
  117. for i = 1, len do
  118. local p = parts[i]
  119.  
  120. if IsA(p, baseclass) then
  121. table.insert(filtered, p)
  122. end
  123. end
  124. end
  125.  
  126. return filtered
  127. end
  128.  
  129.  
  130. local function GetChildrenWhichIsNotA(part, baseclass)
  131. local parts = GetChildren(part)
  132. local len = #parts
  133.  
  134. local filtered = {}
  135.  
  136. if len > 0 then
  137. for i = 1, len do
  138. local p = parts[i]
  139.  
  140. if not IsA(p, baseclass) then
  141. table.insert(filtered, p)
  142. end
  143. end
  144. end
  145.  
  146. return filtered
  147. end
  148.  
  149. if workspace.CurrentCamera then
  150. OnCameraChange()
  151. end
  152.  
  153. Connect(GetPropertyChangedSignal(workspace, "CurrentCamera"), OnCameraChange)
  154.  
  155. --//Methods
  156.  
  157. --//Gets bias value at a given distance
  158. function Aimbot:GetBiasAtDistance(distance)
  159. if self.Camera then
  160. return distance * self.DistanceBias * self.WidthFactor
  161. end
  162. end
  163.  
  164. --//Gets circle radius at a given distance
  165. function Aimbot:GetRadiusAtDistance(rpercent, distance)
  166. if self.Camera then
  167. return rpercent / distance * self.WidthFactor
  168. end
  169. end
  170.  
  171. --//Checks for parts obscuring camera, including terrain - unlike Camera:GetPartsObscuringTarget
  172. function Aimbot:GetBlockingPart(origin, position, ignore)
  173. self.WallCheckParams.FilterDescendantsInstances = self.DefaultIgnore --//Incase it got updated
  174.  
  175. local dir = position - origin
  176. local thisignore = self.WallCheckParams.FilterDescendantsInstances --//Copies table for you essentially
  177.  
  178. if ignore then
  179. table.move(ignore, 1, #ignore, #thisignore + 1, thisignore)
  180. end
  181.  
  182. while true do
  183. self.WallCheckParams.FilterDescendantsInstances = thisignore --//Copies
  184. local result = Raycast(workspace, origin, dir, self.WallCheckParams)
  185.  
  186. if result then
  187. if self.IgnoreTransparent and result.Instance.ClassName ~= "Terrain" and result.Instance.Transparency >= self.TransparencyThreshold then
  188. table.insert(thisignore, result.Instance)
  189. continue
  190. end
  191.  
  192. self.WallCheckParams.FilterDescendantsInstances = self.DefaultIgnore
  193. return result.Instance
  194. end
  195.  
  196. self.WallCheckParams.FilterDescendantsInstances = self.DefaultIgnore
  197. return nil
  198. end
  199. end
  200.  
  201. --//Gets target from viewport point
  202. function Aimbot:GetTargetFromViewportPoint(point, distance, ignore)
  203. local camera = self.Camera
  204.  
  205. if camera then
  206. local ray = ViewportPointToRay(camera, point.X, point.Y)
  207. return self:GetBlockingPart(ray.Origin, ray.Origin + ray.Direction * distance, ignore)
  208. end
  209. end
  210.  
  211. --//Gets closest edge on part from viewport point
  212. function Aimbot:GetClosestEdgeFromViewportPoint(point, part)
  213. local camera = self.Camera
  214.  
  215. if camera then
  216. local ray = ViewportPointToRay(camera, point.X, point.Y)
  217. local ppos = part.Position
  218.  
  219. local dist = (ray.Origin - ppos).Magnitude
  220. local dir = (ray.Origin + ray.Direction * dist - ppos).Unit
  221.  
  222. local size = part.Size
  223.  
  224. local half = size / 2
  225. local final = dir * size
  226.  
  227. return ppos + Vector3.new(
  228. final.X < 0 and math.max(final.X, -half.X + size.X / 10) or math.min(final.X, half.X - size.X / 10),
  229. final.Y < 0 and math.max(final.Y, -half.Y + size.Y / 10) or math.min(final.Y, half.Y - size.Y / 10),
  230. final.Z < 0 and math.max(final.Z, -half.Z + size.Z / 10) or math.min(final.Z, half.Z - size.Z / 10)
  231. )
  232. end
  233. end
  234.  
  235. --//Gets mouse location with offset accounted for
  236. function Aimbot:GetMouseViewportPoint()
  237. return GetMouseLocation(UserInputService) + self.Offset
  238. end
  239.  
  240. --//Gets best target from a list of parts and a viewport point, ignoreparent specifies whether to filter the entire parent
  241. function Aimbot:GetBestPartFromViewportPoint(position, parts, ignoreparent, ignore)
  242. local camera = self.Camera
  243.  
  244. if camera then
  245. local len = #parts
  246.  
  247. if len > 0 then
  248. local leastbias, leastwdist, leastpdist, part = math.huge, math.huge, math.huge, nil
  249. local campos = camera.CFrame.Position
  250.  
  251. ignore = ignore or {}
  252. local ipos = #ignore + 1
  253.  
  254. for i = 1, len do
  255. local cpart = parts[i]
  256. local cpos = cpart.Position
  257.  
  258. local point, onscreen = WorldToViewportPoint(camera, cpos)
  259. ignore[ipos] = ignoreparent and cpart.Parent or cpart
  260.  
  261. if onscreen and not self:GetBlockingPart(campos, cpos, ignore) then
  262. local pdist = (position - Vector2.new(point.X, point.Y)).Magnitude --//Pixel Distance
  263. local wdist = (campos - cpos).Magnitude --//World Distance
  264.  
  265. if pdist <= self:GetRadiusAtDistance(self.RadiusPercentAt1, wdist) then
  266. local bias = self:GetBiasAtDistance(wdist) + pdist
  267.  
  268. if bias < leastbias or (bias == leastbias and wdist < leastwdist) then
  269. leastbias = bias
  270. leastwdist = wdist
  271. leastpdist = pdist
  272. part = cpart
  273. end
  274. end
  275. end
  276. end
  277.  
  278. ignore[ipos] = nil
  279. return part, part and leastpdist <= self:GetRadiusAtDistance(self.SilentRadiusPercentAt1, leastwdist)
  280. end
  281. end
  282. end
  283.  
  284. --//Gets best player to target based on a viewport point
  285. function Aimbot:GetBestPlayerTargetFromViewportPoint(pos)
  286. if self.Camera then
  287. local plrs = GetPlayers(Players)
  288. local len = #plrs
  289.  
  290. if len > 0 then
  291. local parts = {}
  292. local lparts = 1
  293.  
  294. for i = 1, len do
  295. local plr = plrs[i]
  296. local charac = plr.Character
  297.  
  298. if plr ~= LocalPlayer and charac then
  299. if self.TeamCheck and not plr.Neutral and plr.Team == LocalPlayer.Team then
  300. continue
  301. end
  302.  
  303. if self.IsAliveCheck then
  304. local hum = FindFirstChildOfClass(charac, "Humanoid")
  305.  
  306. if not hum or hum.Health <= 0 then
  307. continue
  308. end
  309. end
  310.  
  311. if self.InvisibleCheck then
  312. local head = FindFirstChild(charac, "Head")
  313.  
  314. if not head or head.Transparency >= 1 then
  315. continue
  316. end
  317. end
  318.  
  319. if self.SizeCheck then
  320. local hum = FindFirstChild(charac, "HumanoidRootPart")
  321.  
  322. if not hum or hum.Size.X < 2 or hum.Size.Y < 2 or hum.Size.Z < 1 then
  323. continue
  324. end
  325. end
  326.  
  327. local filtered = GetChildrenWhichIsA(charac, "BasePart")
  328. local lfiltered = #filtered
  329.  
  330. table.move(filtered, 1, lfiltered, lparts, parts)
  331. lparts = lparts + lfiltered
  332. end
  333. end
  334. local target, silent = self:GetBestPartFromViewportPoint(pos, parts, true)
  335. local plrz = target and game:GetService("Players"):GetPlayerFromCharacter(target.Parent) or "nil"
  336. for aa, _ in pairs(self.Targets) do
  337. if aa ~= plrz then self.Targets[aa] = false end
  338. end
  339. if target then
  340. return target, silent
  341. end
  342. end
  343. end
  344. end
  345.  
  346. --//Begins aimbot
  347.  
  348. function Aimbot:Start()
  349. self.Enabled = true
  350. self.LastTrigger = 0
  351. self.TriggerPaused = false
  352. self.Targets = {}; setmetatable(self.Targets, {__index = function(s, k)
  353. s[k] = false
  354. return false
  355. end})
  356.  
  357. local relative
  358. local holding = false
  359. local mspoof
  360.  
  361. local lastframe = getclock()
  362.  
  363. if not self.RenderStep then
  364. local totalTime = 0
  365. self.RenderStep = Connect(RunService.RenderStepped, function(delta)
  366. totalTime += delta
  367. if (totalTime < 1 / 144) then return end
  368. totalTime = 0
  369. if self.Enabled and relative then
  370. if self.HoldControl and self.Holding or not self.HoldControl then
  371. mousemoverel(relative.X, relative.Y)
  372. end
  373. end
  374. end)
  375. end
  376.  
  377. if not self.Heartbeat then
  378. local totalTime = 0
  379. self.Heartbeat = Connect(RunService.Heartbeat, function(delta)
  380. totalTime += delta
  381. if (totalTime < 1 / 144) then return end
  382. totalTime = 0
  383. relative = nil
  384.  
  385. if self.Enabled then
  386. local camera = self.Camera
  387.  
  388. if camera then
  389. local mpos = self:GetMouseViewportPoint()
  390. local target, silent = self:GetBestPlayerTargetFromViewportPoint(mpos)
  391.  
  392. if not target then
  393. if holding then
  394. holding = false
  395. mouse1release()
  396. end
  397. end
  398.  
  399. if target then
  400. local charac = target.Parent
  401. local plrz = game:GetService("Players"):GetPlayerFromCharacter(charac)
  402. local lcharac = LocalPlayer.Character
  403. local cignore = GetChildrenWhichIsNotA(charac, "BasePart")
  404.  
  405. --if cignore then
  406. table.insert(cignore, lcharac)
  407. local mtarget = self:GetTargetFromViewportPoint(mpos, 5000, cignore)
  408. local bodyPart = (FindFirstChild(lcharac, "Head") or FindFirstChild(lcharac, "HumanoidRootPart"))
  409. local BlockingParts = self:GetBlockingPart(bodyPart and bodyPart.Position, target.Position, cignore)
  410. if silent and self.TriggerBot and lcharac and BlockingParts and BlockingParts:IsDescendantOf(charac) then
  411. if not holding then
  412. holding = true
  413. mouse1press()
  414. if self.AutoPeak.Enabled then
  415. if self.AutoPeak.PointPosition and lcharac and lcharac:FindFirstChildOfClass("Humanoid") then
  416. local PlayerModule = LocalPlayer.PlayerScripts:FindFirstChild("PlayerModule")
  417. if PlayerModule then
  418. local Controls = require(PlayerModule):GetControls()
  419. Controls:Disable()
  420. if self.AutoPeak.Object then self.AutoPeak.Object.Parent = nil end
  421. local tempCon; tempCon = lcharac:FindFirstChild("Humanoid").MoveToFinished:Connect(function(reached)
  422. if reached then Controls:Enable() tempCon:Disconnect() self.AutoPeak.PointPosition = nil end
  423. if not self.AutoPeak.PointPosition then tempCon:Disconnect() Controls:Enable() end
  424. if not lcharac or not lcharac:FindFirstChildOfClass("Humanoid") or lcharac:FindFirstChildOfClass("Humanoid").Health <= 0 then Controls:Enable() self.AutoPeak.PointPosition = nil tempCon:Disconnect() end
  425. if not reached then
  426. lcharac:FindFirstChildOfClass("Humanoid"):MoveTo(self.AutoPeak.PointPosition)
  427. end
  428. end)
  429. local temp2Con; temp2Con = lcharac:FindFirstChild("Humanoid").Died:Connect(function()
  430. if self.AutoPeak.PointPosition then
  431. Controls:Enable() self.AutoPeak.PointPosition = nil tempCon:Disconnect()
  432. temp2Con:Disconnect()
  433. end
  434. end)
  435. lcharac:FindFirstChildOfClass("Humanoid"):MoveTo(self.AutoPeak.PointPosition)
  436. end
  437. end
  438. end
  439. else
  440. if self.TriggerBotSemi and (tick() - self.LastTrigger) >= self.TriggerBotTimeBetweenClick and not self.TriggerPaused then
  441. self.TriggerPaused = true
  442. task.wait(self.TriggerBotTime / 1000)
  443. mouse1press()
  444. self.LastTrigger = tick()
  445. self.TriggerPaused = false
  446. end
  447. end
  448.  
  449. elseif silent and self.TriggerBot and lcharac and (not BlockingParts or not BlockingParts:IsDescendantOf(charac)) then
  450. if holding then
  451. holding = false
  452. mouse1release()
  453. end
  454. end
  455.  
  456. if mtarget and IsDescendantOf(mtarget, charac) then
  457. mspoof = nil
  458. self.Targets[plrz] = true
  459. if not self.TargetPart then
  460. return
  461. end
  462. elseif silent then
  463. mspoof = self:GetClosestEdgeFromViewportPoint(mpos, target)
  464. else
  465. mspoof = nil
  466. end
  467.  
  468. target = (self.TargetPart and FindFirstChild(charac, self.TargetPart)) or target
  469. --local pos, onscreen = WorldToViewportPoint(camera, target.Position)
  470. local pos, onscreen = WorldToViewportPoint(camera, self:GetClosestEdgeFromViewportPoint(mpos, target))
  471. if onscreen then
  472. if self.Targets[plrz] then
  473. relative = (Vector2.new(pos.X, pos.Y) - mpos) / Vector2.new(self.XSmoothingPercent * self.WidthFactor, self.YSmoothingPercent * self.WidthFactor)
  474. else
  475. relative = (Vector2.new(pos.X, pos.Y) - mpos) / Vector2.new(self.FlickSettings.FlickXSmoothingPercent * self.WidthFactor, self.FlickSettings.FlickYSmoothingPercent * self.WidthFactor)
  476. end
  477. end
  478. else
  479. if holding then
  480. holding = false
  481. mouse1release()
  482. end
  483.  
  484. mspoof = nil
  485. end
  486. else
  487. if holding then
  488. holding = false
  489. mouse1release()
  490. end
  491.  
  492. mspoof = nil
  493. end
  494. else
  495. if holding then
  496. holding = false
  497. mouse1release()
  498. end
  499.  
  500. mspoof = nil
  501. end
  502. end)
  503. end
  504. local Players2 = game.GetService(game, "Players");
  505. local Client2 = Players2.LocalPlayer;
  506. local Mouse2 = Client2.GetMouse(Client2);
  507.  
  508. local old; old = hookmetamethod(game, "__index", newcclosure(function(i,v)
  509. if string.lower(v) == "hit" then
  510. if old(i, "ClassName") == "Mouse" or old(i, "ClassName") == "PlayerMouse" then
  511. if not checkcaller() then
  512. if mspoof then
  513. return CFrame.new(mspoof)
  514. end
  515. end
  516. end
  517. end
  518. return old(i,v)
  519. end))
  520.  
  521. local old2; old2 = hookmetamethod(game, "__namecall", function(self2, ...)
  522. if getnamecallmethod() == "ViewportPointToRay" and not checkcaller() and mspoof then
  523. local args = {...}
  524. local pos = GetMouseLocation(UserInputService)
  525. if math.abs(args[1] - (pos.X + self.Offset.X)) <= 3 and math.abs(args[2] - (pos.Y + self.Offset.Y)) <= 3 then
  526. local newPos = workspace.CurrentCamera.WorldToViewportPoint(workspace.CurrentCamera, mspoof)
  527. args[1] = newPos.X
  528. args[2] = newPos.Y
  529. return old2(self2, table.unpack(args))
  530. else
  531. if math.abs(args[1] - (Mouse2.X + self.Offset.X)) <= 3 and math.abs(args[2] - (Mouse2.Y + self.Offset.Y)) <= 3 then
  532. local newPos = workspace.CurrentCamera.WorldToViewportPoint(workspace.CurrentCamera, mspoof)
  533. args[1] = newPos.X
  534. args[2] = newPos.Y
  535. return old2(self2, table.unpack(args))
  536. end
  537. end
  538. elseif getnamecallmethod() == "ScreenPointToRay" and not checkcaller() and mspoof then
  539. local args = {...}
  540. local pos = GetMouseLocation(UserInputService)
  541. if math.abs(args[1] - (pos.X + self.Offset.X)) <= 3 and math.abs(args[2] - (pos.Y + self.Offset.Y)) <= 3 then
  542. local newPos = workspace.CurrentCamera.WorldToScreenPoint(workspace.CurrentCamera, mspoof)
  543. args[1] = newPos.X
  544. args[2] = newPos.Y
  545. return old2(self2, table.unpack(args))
  546. else
  547. if math.abs(args[1] - (Mouse2.X + self.Offset.X)) <= 3 and math.abs(args[2] - (Mouse2.Y + self.Offset.Y)) <= 3 then
  548. local newPos = workspace.CurrentCamera.WorldToScreenPoint(workspace.CurrentCamera, mspoof)
  549. args[1] = newPos.X
  550. args[2] = newPos.Y
  551. return old2(self2, table.unpack(args))
  552. end
  553. end
  554. end
  555. return old2(self2, ...)
  556. end)
  557.  
  558. game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessedEvent)
  559. if input.KeyCode == Enum.KeyCode.Q and not gameProcessedEvent then
  560. local lcharac = LocalPlayer.Character
  561. if lcharac and lcharac:FindFirstChild("HumanoidRootPart") then
  562. self.AutoPeak.PointPosition = lcharac:FindFirstChild("HumanoidRootPart").Position
  563. if self.AutoPeak.Object then
  564. self.AutoPeak.Object.Parent = workspace
  565. self.AutoPeak.Object.Position = self.AutoPeak.PointPosition
  566. else
  567. local peakPoint = Instance.new("Part")
  568. peakPoint.Shape = Enum.PartType.Ball
  569. peakPoint.Color = Color3.fromRGB(0,255,0)
  570. peakPoint.Anchored = true
  571. peakPoint.CanCollide = false
  572. peakPoint.Size = Vector3.new(0.2,0.2,0.2)
  573. self.AutoPeak.Object = peakPoint
  574. self.AutoPeak.Object.Parent = workspace
  575. self.AutoPeak.Object.Position = self.AutoPeak.PointPosition
  576. end
  577. end
  578. end
  579. end)
  580. --[[
  581. local old2; old2 = hookmetamethod(game, "__namecall", function(self2, ...)
  582. local args = {...}
  583. if getnamecallmethod() == "ScreenPointToRay" or getnamecallmethod() == "ViewportPointToRay" and mspoof then
  584. local SecondPosition = game.GetService(game, "UserInputService").GetMouseLocation(game.GetService(game, "UserInputService"))
  585. if args[1] == Mouse2.X and args[2] == Mouse2.Y or args[1] == SecondPosition.X and args[2] == SecondPosition.Y then
  586. local newPos = workspace.CurrentCamera.WorldToScreenPoint(workspace.CurrentCamera, mspoof)
  587. args[1] = newPos.X
  588. args[2] = newPos.Y
  589. return old2(self2, table.unpack(args))
  590. end
  591. end
  592. return old2(self2, ...)
  593. end)
  594. --]]
  595. end
  596.  
  597. --//Completely kills aimbot, as opposed to enabled = false
  598. function Aimbot:Kill()
  599. self.Enabled = false
  600.  
  601. if self.RenderStep then
  602. Disconnect(self.RenderStep)
  603. self.RenderStep = nil
  604. end
  605.  
  606. if self.Heartbeat then
  607. Disconnect(self.Heartbeat)
  608. self.Heartbeat = nil
  609. end
  610. end
  611.  
  612. --//Constructor
  613. function Aimbot.new(presets)
  614. presets = presets or {}
  615. UpdateTable(presets, Aimbot.DefaultSettings)
  616.  
  617. local WallCheckParams = RaycastParams.new()
  618. WallCheckParams.FilterType = Enum.RaycastFilterType.Blacklist
  619. WallCheckParams.IgnoreWater = presets.IgnoreWater
  620. WallCheckParams.FilterDescendantsInstances = presets.DefaultIgnore
  621.  
  622. presets.WallCheckParams = WallCheckParams
  623. return setmetatable(presets, Aimbot)
  624. end
  625.  
  626. --//Return with default settings
  627. return Aimbot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement