Advertisement
Idkrandomthingyyyy

hoopz

Jul 19th, 2024
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.68 KB | None | 0 0
  1. getgenv().adjustments = {
  2. [59] = {
  3. Power = 75,
  4. Arc = Vector3.new(0, 30, 0)
  5. },
  6.  
  7. [60] = {
  8. Power = 75,
  9. Arc = Vector3.new(0, 32.5, 0)
  10. },
  11.  
  12. [61] = {
  13. Power = 75,
  14. Arc = Vector3.new(0, 35, 0)
  15. },
  16.  
  17. [62] = {
  18. Power = 80,
  19. Arc = Vector3.new(0, 25, 0)
  20. },
  21.  
  22. [63] = {
  23. Power = 80,
  24. Arc = Vector3.new(0, 27, 0)
  25. },
  26.  
  27. [64] = {
  28. Power = 80,
  29. Arc = Vector3.new(0, 30, 0)
  30. },
  31.  
  32. [65] = {
  33. Power = 80,
  34. Arc = Vector3.new(0, 32, 0)
  35. },
  36.  
  37. [66] = {
  38. Power = 80,
  39. Arc = Vector3.new(0, 34, 0)
  40. },
  41.  
  42. [67] = {
  43. Power = 85,
  44. Arc = Vector3.new(0, 25, 0)
  45. },
  46.  
  47. [68] = {
  48. Power = 85,
  49. Arc = Vector3.new(0, 30, 0)
  50. },
  51.  
  52. [69] = {
  53. Power = 85,
  54. Arc = Vector3.new(0, 32, 0)
  55. },
  56.  
  57. [70] = {
  58. Power = 85,
  59. Arc = Vector3.new(0, 32, 0)
  60. },
  61.  
  62. [71] = {
  63. Power = 85,
  64. Arc = Vector3.new(0, 36, 0)
  65. },
  66.  
  67. [72] = {
  68. Power = 85,
  69. Arc = Vector3.new(0, 40, 0)
  70. }
  71. }
  72.  
  73. getgenv().adjustments2 = {
  74. [59] = {
  75. Power = 80,
  76. Arc = Vector3.new(0, 70, 0)
  77. },
  78.  
  79. [60] = {
  80. Power = 80,
  81. Arc = Vector3.new(0, 68, 0)
  82. },
  83.  
  84. [61] = {
  85. Power = 80,
  86. Arc = Vector3.new(0, 66, 0)
  87. },
  88.  
  89. [62] = {
  90. Power = 80,
  91. Arc = Vector3.new(0, 64, 0)
  92. },
  93.  
  94. [63] = {
  95. Power = 80,
  96. Arc = Vector3.new(0, 62, 0)
  97. },
  98.  
  99. [64] = {
  100. Power = 85,
  101. Arc = Vector3.new(0, 80, 0)
  102. },
  103.  
  104. [65] = {
  105. Power = 85,
  106. Arc = Vector3.new(0, 78, 0)
  107. },
  108.  
  109. [66] = {
  110. Power = 85,
  111. Arc = Vector3.new(0, 76, 0)
  112. },
  113.  
  114. [67] = {
  115. Power = 85,
  116. Arc = Vector3.new(0, 74, 0)
  117. },
  118.  
  119. [68] = {
  120. Power = 85,
  121. Arc = Vector3.new(0, 70, 0)
  122. },
  123.  
  124. [69] = {
  125. Power = 85,
  126. Arc = Vector3.new(0, 66, 0)
  127. },
  128.  
  129. [70] = {
  130. Power = 85,
  131. Arc = Vector3.new(0, 62, 0)
  132. },
  133.  
  134. [71] = {
  135. Power = 85,
  136. Arc = Vector3.new(0, 50, 0)
  137. }
  138. }
  139.  
  140. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/violin-suzutsuki/LinoriaLib/main/Library.lua"))()
  141. local Players = game:GetService("Players")
  142. local Client = Players.LocalPlayer
  143.  
  144. local Aimbot = {}
  145. local AutoDribble = {}
  146. local BallReach = {}
  147. local RangeIndicator = {}
  148. local AutoGuard = {}
  149. local BallMags = {}
  150.  
  151.  
  152.  
  153.  
  154. do
  155. RangeIndicator.Enabled = false
  156. RangeIndicator.Active = false
  157. RangeIndicator.CurrentConnection = nil
  158.  
  159. RangeIndicator.Part = Instance.new("Part")
  160. RangeIndicator.Part.Size = Vector3.new(2.3, 2.3, 1.3)
  161. RangeIndicator.Part.Color = Color3.fromRGB(0, 255, 0)
  162. RangeIndicator.Part.Material = Enum.Material.Neon
  163. RangeIndicator.Part.Anchored = true
  164. RangeIndicator.Part.CanCollide = false
  165.  
  166. function RangeIndicator:Tag(boolean)
  167. self.Active = boolean
  168. if self.Active and not self.CurrentConnection then
  169. self.CurrentConnection = game:GetService("RunService").RenderStepped:Connect(function()
  170. if self.Enabled and self.Active then
  171. local Torso = Client.Character and Client.Character:FindFirstChild("Torso")
  172. if Torso then
  173. self.Part.Parent = workspace
  174. self.Part.CFrame = Torso.CFrame
  175. end
  176. else
  177. self.Part.Parent = nil
  178. self.CurrentConnection:Disconnect()
  179. self.CurrentConnection = nil
  180. end
  181. end)
  182. end
  183. end
  184. end
  185.  
  186. local ContextActionService = game:GetService("ContextActionService")
  187. local FREEZE_ACTION = "freezeMovement"
  188. local A = false
  189. local function NoInput()
  190. A = not A
  191. if A then
  192. ContextActionService:BindAction(
  193. FREEZE_ACTION,
  194. function() return Enum.ContextActionResult.Sink end,
  195. false,
  196. unpack(Enum.PlayerActions:GetEnumItems())
  197. )
  198. else
  199. ContextActionService:UnbindAction(FREEZE_ACTION)
  200. end
  201. end
  202.  
  203. do
  204. Aimbot.Enabled = false
  205. Aimbot.CurrentConnection = nil
  206. Aimbot.Requesting = false
  207. Aimbot.FPSConnection = nil
  208. Aimbot.JumpTimer = true
  209. Aimbot.OriginatedPosition = nil
  210. Aimbot.LowArc = true
  211. Aimbot.HighArc = false
  212.  
  213. function Aimbot:GetClosestRim()
  214. local Distance = math.huge
  215. local ClosestRim = nil
  216.  
  217. for _, Court in ipairs(workspace.Courts:GetChildren()) do
  218. for _, Part in ipairs(Court:GetChildren()) do
  219. if Part:IsA("BasePart") and Part.Size == Vector3.new(.25, .25, .25) and Part.BrickColor == BrickColor.new("Really red") then
  220. local RootPart = Client.Character and Client.Character:WaitForChild("HumanoidRootPart")
  221. local Distance2 = RootPart and ((self.OriginatedPosition or RootPart.Position) - Part.Position).Magnitude
  222.  
  223. if Distance2 and Distance2 < Distance then
  224. ClosestRim = Part
  225. Distance = Distance2
  226. end
  227. end
  228. end
  229. end
  230.  
  231. for _, Court in ipairs(workspace.PracticeArea:GetChildren()) do
  232. for _, Part in ipairs(Court:GetChildren()) do
  233. if Part:IsA("BasePart") and Part.Size == Vector3.new(.25, .25, .25) and Part.BrickColor == BrickColor.new("Really red") then
  234. local RootPart = Client.Character and Client.Character:WaitForChild("HumanoidRootPart")
  235. local Distance2 = RootPart and ((self.OriginatedPosition or RootPart.Position) - Part.Position).Magnitude
  236.  
  237. if Distance2 and Distance2 < Distance then
  238. ClosestRim = Part
  239. Distance = Distance2
  240. end
  241. end
  242. end
  243. end
  244.  
  245. return ClosestRim, Distance
  246. end
  247.  
  248. function Aimbot:GetTrajectory()
  249. local Rim, Distance = self:GetClosestRim()
  250.  
  251. if Aimbot.LowArc and adjustments[math.floor(Distance) + 1] or Aimbot.HighArc and adjustments2[math.floor(Distance)] then
  252. RangeIndicator:Tag(true)
  253. else
  254. RangeIndicator:Tag(false)
  255. end
  256.  
  257. if Aimbot.LowArc and adjustments[math.floor(Distance)] or Aimbot.HighArc and adjustments2[math.floor(Distance)] then
  258. return Vector3.new(Rim.Position.X, Rim.Position.Y + (Aimbot.LowArc and adjustments[math.floor(Distance)].Arc.Y or Aimbot.HighArc and adjustments2[math.floor(Distance)].Arc.Y), Rim.Position.Z), (Aimbot.LowArc and adjustments[math.floor(Distance)].Power or Aimbot.HighArc and adjustments2[math.floor(Distance)].Power), Distance
  259. end
  260. end
  261.  
  262. function Aimbot:GetNormal()
  263. local Rim, Distance = self:GetClosestRim()
  264.  
  265. if adjustments[math.floor(Distance)] then
  266. return (Vector3.new(Rim.Position.X, Rim.Position.Y + adjustments[math.floor(Distance)].Arc.Y, Rim.Position.Z)), adjustments[math.floor(Distance)].Power, Distance
  267. end
  268. end
  269.  
  270. function Aimbot:NewValue(boolean)
  271. self.Enabled = boolean
  272. if self.Enabled then
  273. local Humanoid = Client.Character and Client.Character:WaitForChild("Humanoid")
  274. self.CurrentConnection = Humanoid.Jumping:Connect(function()
  275. local Ball = Client.Character and Client.Character:FindFirstChild("Basketball")
  276. if not self.OriginatedPosition then
  277. self.OriginatedPosition = Humanoid.Parent.PrimaryPart.Position
  278. end
  279. if self:GetTrajectory() and Ball then
  280. local g, p = self:GetTrajectory()
  281. Client:WaitForChild("Power").Value = p
  282. self.Requesting = true
  283. local Humanoid = Client.Character and Client.Character:FindFirstChildOfClass("Humanoid")
  284. if Humanoid then
  285. NoInput()
  286. Humanoid.WalkSpeed = 0
  287. end
  288. if self.JumpTimer then
  289. task.spawn(function()
  290. local RaycastParams1 = RaycastParams.new()
  291. RaycastParams1.FilterType = Enum.RaycastFilterType.Blacklist
  292. RaycastParams1.FilterDescendantsInstances = {Humanoid.Parent}
  293.  
  294. local Raycast = workspace:Raycast(Humanoid.Parent:FindFirstChild("Torso").Position, Vector3.new(0, -10, 0), RaycastParams1)
  295. if Raycast and Raycast.Instance then
  296. if (Humanoid.Parent:FindFirstChild("Torso").Position.Y - Raycast.Position.Y) > 9 then
  297. mouse1click()
  298. else
  299. repeat
  300. RaycastParams1 = RaycastParams.new()
  301. RaycastParams1.FilterType = Enum.RaycastFilterType.Blacklist
  302. RaycastParams1.FilterDescendantsInstances = {Humanoid.Parent}
  303.  
  304. Raycast = workspace:Raycast(Humanoid.Parent:FindFirstChild("Torso").Position, Vector3.new(0, -10, 0), RaycastParams1)
  305. task.wait()
  306. until (Humanoid.Parent:FindFirstChild("Torso").Position.Y - Raycast.Position.Y) > 9
  307. mouse1click()
  308. end
  309. end
  310. end)
  311. end
  312.  
  313. repeat task.wait() until not Client.Character:FindFirstChild("Basketball")
  314. if Humanoid then
  315. if A then
  316. NoInput()
  317. end
  318. Humanoid.WalkSpeed = 16
  319. end
  320.  
  321. self.Requesting = false
  322. self.OriginatedPosition = nil
  323. self.FPSConnection:Disconnect()
  324. self.FPSConnection = nil
  325. else
  326. self.Requesting = false
  327. end
  328. end)
  329. else
  330. if self.CurrentConnection then
  331. self.CurrentConnection:Disconnect()
  332. end
  333. if self.FPSConnection then
  334. self.FPSConnection:Disconnect()
  335. end
  336. end
  337. end
  338.  
  339. game:GetService("RunService").RenderStepped:Connect(function()
  340. if not Client.Character or not Client.Character:FindFirstChild("Basketball") then
  341. Aimbot.OriginatedPosition = nil
  342. Aimbot.Requesting = false
  343. end
  344. end)
  345. end
  346.  
  347. do
  348. local function IgnoreList()
  349. local IgnoreList = {}
  350.  
  351. for i, Player in ipairs(game:GetService("Players"):GetPlayers()) do
  352. if Player.Character then
  353. table.insert(IgnoreList, Player.Character)
  354. end
  355. end
  356.  
  357. for a,b in pairs(game:GetService("CollectionService"):GetTagged("Walls")) do
  358. table.insert(IgnoreList, b)
  359. end
  360.  
  361. return IgnoreList
  362. end
  363.  
  364. local function GetMousePosition()
  365. local Location = game:GetService("UserInputService"):GetMouseLocation()
  366. local RayA = workspace.CurrentCamera:ViewportPointToRay(Location.X, Location.Y)
  367. return workspace:FindPartOnRayWithIgnoreList(Ray.new(RayA.Origin, RayA.Direction * 1000), IgnoreList())
  368. end
  369.  
  370. local function Yea1()
  371. local Yea, Yessir = GetMousePosition()
  372. return (Yessir - game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position).unit
  373. end
  374.  
  375. local old; old = hookfunction(game:GetService("ReplicatedStorage").shootingEvent.FireServer, newcclosure(function(self, ...)
  376. local args = {...}
  377.  
  378. if Aimbot.Requesting then
  379. local X, Y, Z
  380. local Yeahh = Yea1()
  381.  
  382. for i,v in pairs(args[3]) do
  383. if v == Yeahh.X then
  384. X = i
  385. elseif v == Yeahh.Y then
  386. Y = i
  387. elseif v == Yeahh.Z then
  388. Z = i
  389. end
  390. end
  391.  
  392.  
  393.  
  394. local Trajectory = Aimbot:GetTrajectory() and (Aimbot:GetTrajectory() - game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position).Unit
  395. local _, _, d = Aimbot:GetTrajectory()
  396.  
  397. if Trajectory then
  398. --Library.Notify(Library, "Shooting at " .. tostring(math.floor(d)))
  399. print(tostring(math.floor(d)))
  400. args[3][X] = Trajectory.X
  401. args[3][Y] = Trajectory.Y
  402. args[3][Z] = Trajectory.Z
  403. end
  404. end
  405. return old(self, table.unpack(args))
  406. end))
  407. end
  408.  
  409. do
  410. AutoDribble.Enabled = false
  411. AutoDribble.Combination = "Randomized"
  412. AutoDribble.LastUse = 0
  413.  
  414. function AutoDribble:GetClosestPlayer()
  415. local ClosestDistance = math.huge
  416. local ClosestPlayer = nil
  417.  
  418. for _, Player in ipairs(Players:GetPlayers()) do
  419. if Player == Client then continue end
  420. local Root = Player.Character and Player.Character.PrimaryPart
  421. if Root then
  422. local MyRoot = Client.Character and Client.Character.PrimaryPart
  423. if MyRoot then
  424. local Distance = (MyRoot.Position - Root.Position).Magnitude
  425. if Distance < ClosestDistance then
  426. ClosestDistance = Distance
  427. ClosestPlayer = Player
  428. end
  429. end
  430. end
  431. end
  432.  
  433. return ClosestPlayer
  434. end
  435.  
  436. function AutoDribble:GetClosestPartToBall()
  437. local Player = self:GetClosestPlayer()
  438. if Player then
  439. local Character = Client.Character
  440. local Basketball = Character and Character:FindFirstChild("Basketball")
  441.  
  442. if Basketball then
  443. local Ball = Basketball:FindFirstChild("Ball")
  444.  
  445. local ClosestPartLeftArmDistance = math.huge
  446. local ClosestPartLeftArm
  447.  
  448. local ClosestPartRightArmDistance = math.huge
  449. local ClosestPartRightArm
  450.  
  451. if Player.Character then
  452. for _, Part in ipairs(Player.Character:GetChildren()) do
  453. if Part:IsA("BasePart") then
  454. local G = (Part.Position - Character:FindFirstChild("Right Arm").Position).Magnitude
  455. if G < ClosestPartRightArmDistance then
  456. ClosestPartRightArmDistance = G
  457. ClosestPartRightArm = Part
  458. end
  459. end
  460. end
  461.  
  462. for _, Part in ipairs(Player.Character:GetChildren()) do
  463. if Part:IsA("BasePart") then
  464. local G = (Part.Position - Character:FindFirstChild("Left Arm").Position).Magnitude
  465. if G < ClosestPartRightArmDistance then
  466. ClosestPartLeftArmDistance = G
  467. ClosestPartLeftArm = Part
  468. end
  469. end
  470. end
  471.  
  472. if ClosestPartRightArmDistance < (ClosestPartLeftArmDistance) then
  473. return "left"
  474. else
  475. return "right"
  476. end
  477. end
  478. end
  479. end
  480. end
  481. local VirtualInputManager = game:GetService('VirtualInputManager')
  482. function Aimbot:GetEquippedBall()
  483. local Character = Client.Character
  484. local Basketball = Character and Character:FindFirstChild("Basketball")
  485. local LeftArmDistance = math.huge
  486. local RightArmDistance = math.huge
  487.  
  488. local LeftArm, RightArm, Ball = Character and Character:FindFirstChild("Left Arm"), Character and Character:FindFirstChild("Right Arm"), Basketball and Basketball:FindFirstChild("Ball")
  489.  
  490. if LeftArm and RightArm and Ball then
  491. LeftArmDistance = (Ball.Position - LeftArm.Position).Magnitude
  492. RightArmDistance = (Ball.Position - RightArm.Position).Magnitude
  493.  
  494. return LeftArmDistance < RightArmDistance and "Left" or "Right"
  495. end
  496. end
  497.  
  498. game:GetService("RunService").RenderStepped:Connect(function()
  499. if AutoDribble.Enabled and (tick() - AutoDribble.LastUse) >= .5 then
  500. local Side = AutoDribble:GetClosestPartToBall()
  501. local g = Client.Character and Client.Character:FindFirstChild("Basketball") and Client.Character:FindFirstChild("Basketball"):FindFirstChild("Ball")
  502. local Ye = Client.Character and Client.Character:FindFirstChild("Left Arm")
  503. local Ye2 = Client.Character and Client.Character:FindFirstChild("Right Arm")
  504.  
  505. local Left = {
  506. "H",
  507. "G",
  508. --"B"
  509. }
  510.  
  511. local Right = {
  512. "H",
  513. "F",
  514. --"V"
  515. }
  516.  
  517.  
  518. if Side == "left" and Aimbot:GetEquippedBall() == "Right" or Side == "right" and Aimbot:GetEquippedBall() == "Left" then
  519. if Side == "left" and Aimbot:GetEquippedBall() == "Right" then
  520. if AutoDribble.Combination == "Randomized" then
  521. local Key = Left[math.random(1, #Left)]
  522. VirtualInputManager:SendKeyEvent(true, Key, false, game)
  523. task.wait()
  524. VirtualInputManager:SendKeyEvent(false, Key, false, game)
  525. elseif AutoDribble.Combination == "Switch hands" then
  526. local Key = "H"
  527. VirtualInputManager:SendKeyEvent(true, Key, false, game)
  528. task.wait()
  529. VirtualInputManager:SendKeyEvent(false, Key, false, game)
  530. elseif AutoDribble.Combination == "Behind the back" then
  531. local Key = "G"
  532. VirtualInputManager:SendKeyEvent(true, Key, false, game)
  533. task.wait()
  534. VirtualInputManager:SendKeyEvent(false, Key, false, game)
  535. end
  536.  
  537. AutoDribble.LastUse = tick()
  538. elseif Side == "right" and Aimbot:GetEquippedBall() == "Left" then
  539. if AutoDribble.Combination == "Randomized" then
  540. local Key = Right[math.random(1, #Right)]
  541. VirtualInputManager:SendKeyEvent(true, Key, false, game)
  542. task.wait()
  543. VirtualInputManager:SendKeyEvent(false, Key, false, game)
  544. elseif AutoDribble.Combination == "Switch hands" then
  545. local Key = "H"
  546. VirtualInputManager:SendKeyEvent(true, Key, false, game)
  547. task.wait()
  548. VirtualInputManager:SendKeyEvent(false, Key, false, game)
  549. elseif AutoDribble.Combination == "Behind the back" then
  550. local Key = "F"
  551. VirtualInputManager:SendKeyEvent(true, Key, false, game)
  552. task.wait()
  553. VirtualInputManager:SendKeyEvent(false, Key, false, game)
  554. end
  555.  
  556. AutoDribble.LastUse = tick()
  557. end
  558. end
  559.  
  560. if not Client.Character or not Client.Character:FindFirstChild("Basketball") then
  561. AutoDribble.LastSide = ""
  562. end
  563. end
  564. end)
  565.  
  566.  
  567. end
  568.  
  569. do
  570. AutoGuard.Enabled = false
  571. AutoGuard.Keybind = "E"
  572.  
  573. game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessedEvent)
  574. if not gameProcessedEvent then
  575. if input.KeyCode == Enum.KeyCode[AutoGuard.Keybind] then
  576. AutoGuard.Enabled = not AutoGuard.Enabled
  577. if AutoGuard.Enabled then
  578. local ClosestDistance = math.huge
  579. local ClosestPlayer = nil
  580. for _, Player in ipairs(game:GetService("Players"):GetPlayers()) do
  581. if Player ~= Client then
  582.  
  583. local Torso = Client.Character and Client.Character:FindFirstChild("Torso")
  584. local OtherTorso = Player.Character and Player.Character:FindFirstChild("Torso")
  585.  
  586. if Torso and OtherTorso then
  587. if (Torso.Position - OtherTorso.Position).Magnitude < ClosestDistance and OtherTorso.Parent:FindFirstChild("Ball", true) then
  588. ClosestDistance = (Torso.Position - OtherTorso.Position).Magnitude
  589. ClosestPlayer = Player
  590. end
  591. end
  592. end
  593. end
  594.  
  595. if ClosestPlayer then
  596. local Torso = Client.Character and Client.Character:FindFirstChild("Torso")
  597. local OtherTorso = ClosestPlayer.Character and ClosestPlayer.Character:FindFirstChild("Torso")
  598. while true do
  599. if not AutoGuard.Enabled then
  600. break
  601. end
  602.  
  603. if OtherTorso.Velocity.magnitude > 0.5 and OtherTorso.Parent:FindFirstChild("Ball", true) then
  604. Torso.Parent:FindFirstChildOfClass("Humanoid"):MoveTo(OtherTorso.Position + OtherTorso.Velocity.unit * 7)
  605. elseif OtherTorso.Velocity.magnitude < 0.5 and OtherTorso.Parent:FindFirstChild("Ball", true) then
  606. Torso.Parent:FindFirstChildOfClass("Humanoid"):MoveTo(OtherTorso.Position)
  607. elseif not OtherTorso.Parent:FindFirstChild("Ball", true) then
  608. AutoGuard.Enabled = false
  609. end
  610.  
  611. task.wait()
  612. end
  613. end
  614. end
  615. end
  616. end
  617. end)
  618. end
  619. --[[
  620. BallReach.Distance = 5
  621.  
  622. function BallReach:GetClosestBall()
  623. local ClosestBall = nil
  624. local ClosestDistance = math.huge
  625.  
  626. for _, Player in ipairs(Players:GetPlayers()) do
  627. local Ball = Player.Character and Player.Character:FindFirstChild("Basketball") and Player.Character:FindFirstChild("Basketball"):FindFirstChild("Ball")
  628. local RootPart = Client.Character and Client.Character:FindFirstChild("HumanoidRootPart")
  629.  
  630. if Ball and RootPart then
  631. local Distance = (Ball.Position - RootPart.Position).Magnitude
  632. if Distance < self.Distance and Distance < ClosestDistance then
  633. ClosestBall = Ball
  634. ClosestDistance = Distance
  635. end
  636. end
  637. end
  638.  
  639. return ClosestBall
  640. end
  641.  
  642. function BallReach:GetClosestPart(Ball)
  643. if Client.Character then
  644. local ClosestDistance = math.huge
  645. local ClosestPart = nil
  646.  
  647. for i,v in pairs(Client.Character:GetChildren()) do
  648. if v:IsA("BasePart") then
  649. local Distance = (v.Position - Ball.Position).Magnitude
  650. if Distance < ClosestDistance then
  651. ClosestDistance = Distance
  652. ClosestPart = v
  653. end
  654. end
  655. end
  656.  
  657. return ClosestPart
  658. end
  659. end
  660.  
  661. game:GetService("RunService").RenderStepped:Connect(function()
  662. local Ball = BallReach:GetClosestBall()
  663. local RootPart = Ball and BallReach:GetClosestPart(Ball)
  664.  
  665. if Ball and RootPart then
  666. firetouchinterest(RootPart, Ball, 0)
  667. task.wait()
  668. firetouchinterest(RootPart, Ball, 1)
  669. end
  670. end)
  671. ]]
  672.  
  673.  
  674. do
  675. function GetClosestPart(Ball)
  676. if Client.Character then
  677. local ClosestDistance = math.huge
  678. local ClosestPart = nil
  679.  
  680. for i,v in pairs(Client.Character:GetChildren()) do
  681. if v:IsA("BasePart") then
  682. local Distance = (v.Position - Ball.Position).Magnitude
  683. if Distance < ClosestDistance then
  684. ClosestDistance = Distance
  685. ClosestPart = v
  686. end
  687. end
  688. end
  689.  
  690. return ClosestPart
  691. end
  692. end
  693.  
  694. do
  695. BallMags.Distance = 0
  696.  
  697. function BallMags:GetClosestBall()
  698. local ClosestBall = nil
  699. local ClosestDistance = math.huge
  700.  
  701. for _, Ball in ipairs(workspace:GetChildren()) do
  702. if Ball.Name == "Basketball" and Ball:FindFirstChild("Ball") then
  703. Ball = Ball:FindFirstChild("Ball")
  704. local RootPart = Client.Character and Client.Character:FindFirstChild("HumanoidRootPart")
  705. local Distance = (Ball.Position - RootPart.Position).Magnitude
  706. if Distance < self.Distance and Distance < ClosestDistance then
  707. ClosestBall = Ball
  708. ClosestDistance = Distance
  709. end
  710. end
  711. end
  712.  
  713. return ClosestBall
  714. end
  715.  
  716. end
  717.  
  718. do
  719. BallReach.Distance = 0
  720.  
  721. function BallReach:GetClosestBall()
  722. local ClosestBall = nil
  723. local ClosestDistance = math.huge
  724.  
  725. for _, Player in ipairs(Players:GetPlayers()) do
  726. local Ball = Player.Character and Player.Character:FindFirstChild("Basketball") and Player.Character:FindFirstChild("Basketball"):FindFirstChild("Ball")
  727. local RootPart = Client.Character and Client.Character:FindFirstChild("HumanoidRootPart")
  728.  
  729. if Ball and RootPart then
  730. local Distance = (Ball.Position - RootPart.Position).Magnitude
  731. if Distance < self.Distance and Distance < ClosestDistance then
  732. ClosestBall = Ball
  733. ClosestDistance = Distance
  734. end
  735. end
  736. end
  737.  
  738. return ClosestBall
  739. end
  740. end
  741.  
  742.  
  743. game:GetService("RunService").RenderStepped:Connect(function()
  744. local MagsBall = BallMags:GetClosestBall()
  745. local ReachBall = BallReach:GetClosestBall()
  746. local Root1, Root2 = MagsBall and GetClosestPart(MagsBall), ReachBall and GetClosestPart(ReachBall)
  747.  
  748. if MagsBall then
  749. firetouchinterest(Root1, MagsBall, 0)
  750. task.wait()
  751. firetouchinterest(Root1, MagsBall, 1)
  752. end
  753.  
  754. if ReachBall then
  755. firetouchinterest(Root2, ReachBall, 0)
  756. task.wait()
  757. firetouchinterest(Root2, ReachBall, 1)
  758. end
  759. end)
  760. end
  761.  
  762.  
  763. game:GetService("RunService").RenderStepped:Connect(function()
  764. Aimbot:GetTrajectory()
  765. end)
  766.  
  767. local Window = Library:CreateWindow({
  768. Title = "KINGHAX",
  769. Center = true,
  770. AutoShow = true
  771. })
  772.  
  773. local Tabs = {
  774. Ball = Window:AddTab("Ball"),
  775. Physics = Window:AddTab("Physics"),
  776. Defense = Window:AddTab("Defense")
  777. }
  778.  
  779. local GroupBoxes = {
  780. Ball = {
  781. SilentAim = Tabs.Ball:AddLeftGroupbox("Silent Aim"),
  782. AutoHandles = Tabs.Ball:AddRightGroupbox("Handles"),
  783. },
  784.  
  785. Physics = {
  786. TouchInterests = Tabs.Physics:AddLeftGroupbox("Touch Interests")
  787. },
  788.  
  789. Defense = {
  790. AutoGuardT = Tabs.Defense:AddLeftGroupbox("Auto Guard")
  791. }
  792. }
  793.  
  794. GroupBoxes.Ball.SilentAim:AddToggle("SilentAimEnabled", {
  795. Text = "Enabled",
  796. Default = Aimbot.Enabled,
  797. })
  798.  
  799. GroupBoxes.Ball.SilentAim:AddToggle("RangeIndicator", {
  800. Text = "Range Indicator",
  801. Default = RangeIndicator.Enabled,
  802. })
  803.  
  804. GroupBoxes.Ball.SilentAim:AddToggle("HighArc", {
  805. Text = "High Arc",
  806. Default = Aimbot.HighArc,
  807. })
  808.  
  809.  
  810.  
  811. GroupBoxes.Ball.AutoHandles:AddToggle("AutoHandlesEnabled", {
  812. Text = "Enabled",
  813. Default = AutoDribble.Enabled,
  814. })
  815.  
  816. GroupBoxes.Ball.AutoHandles:AddDropdown("HandlesDropdown", {
  817. Values = {'Behind the back', 'Switch hands', 'Randomized'},
  818. Default = 3,
  819. Multi = false,
  820. Text = 'Combination',
  821. })
  822.  
  823. GroupBoxes.Physics.TouchInterests:AddSlider("ReachValue", {
  824. Text = "Ball Reach",
  825. Default = BallReach.Distance,
  826. Min = 0,
  827. Max = 30,
  828. Rounding = 2,
  829. Compact = false
  830. })
  831.  
  832. GroupBoxes.Physics.TouchInterests:AddSlider("MagsValue", {
  833. Text = "Ball Mags",
  834. Default = BallMags.Distance,
  835. Min = 0,
  836. Max = 30,
  837. Rounding = 2,
  838. Compact = false
  839. })
  840.  
  841. GroupBoxes.Defense.AutoGuardT:AddLabel("Keybind"):AddKeyPicker("AutoGuardKeyPicker", {
  842. Default = AutoGuard.Keybind,
  843. SyncToggleState = false,
  844. Mode = 'Toggle',
  845. Text = "?"
  846. })
  847.  
  848. Options.MagsValue:OnChanged(function()
  849. BallMags.Distance = Options.MagsValue.Value
  850. end)
  851.  
  852. Options.ReachValue:OnChanged(function()
  853. BallReach.Distance = Options.ReachValue.Value
  854. end)
  855.  
  856. Options.AutoGuardKeyPicker:OnClick(function()
  857. AutoGuard.Keybind = Options.AutoGuardKeyPicker.Value
  858. end)
  859.  
  860. Toggles.AutoHandlesEnabled:OnChanged(function()
  861. AutoDribble.Enabled = Toggles.AutoHandlesEnabled.Value
  862. end)
  863.  
  864. Options.HandlesDropdown:OnChanged(function()
  865. AutoDribble.Combination = typeof(Options.HandlesDropdown.Value) ~= "table" and Options.HandlesDropdown.Value or Options.HandlesDropdown.Value[1]
  866. end)
  867.  
  868.  
  869. Toggles.SilentAimEnabled:OnChanged(function()
  870. Aimbot:NewValue(Toggles.SilentAimEnabled.Value)
  871. end)
  872.  
  873. Toggles.RangeIndicator:OnChanged(function()
  874. RangeIndicator.Enabled = Toggles.RangeIndicator.Value
  875. end)
  876.  
  877. Toggles.HighArc:OnChanged(function()
  878. if Toggles.HighArc.Value == true then
  879. Aimbot.HighArc = true
  880. Aimbot.LowArc = false
  881. else
  882. Aimbot.HighArc = false
  883. Aimbot.LowArc = true
  884. end
  885. end)
  886.  
  887. Library:Notify("KINGHAX")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement