Advertisement
Guest User

Untitled

a guest
Feb 25th, 2023
11,761
2
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.11 KB | None | 2 0
  1. here is the script
  2.  
  3. local reset = false
  4.  
  5. pcall(function()
  6. if _G.stepped then
  7. reset = true
  8. _G.stepped:Disconnect()
  9. _G.input:Disconnect()
  10. _G.charAdded:Disconnect()
  11. _G.charAdded = nil
  12. _G.stepped = nil
  13. _G.input = nil
  14. print("RESET")
  15. end
  16.  
  17. if not reset then
  18. print("LOADED")
  19. end
  20. end)
  21.  
  22. local plr = game.Players.LocalPlayer
  23. local uis = game:GetService("UserInputService")
  24. local rs = game:GetService("RunService")
  25.  
  26. local lib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
  27. local window = lib:MakeWindow({Name = "Magnet's Hoopz UI"})
  28. local main = window:MakeTab({Name = "Main"})
  29.  
  30. main:AddToggle({Name = "Aimbot", Default = false, Callback = function(v)
  31. _G.Aimbot = v
  32. end})
  33. main:AddToggle({Name = "Reach", Default = false, Callback = function(v)
  34. _G.Reach = v
  35. end})
  36. main:AddToggle({Name = "AutoGaurd/Defend", default = false, Callback = function(v)
  37. if v then
  38. game.StarterGui:SetCore("SendNotification", {Title = "AutoGaurd/Defend", Text = "Press U to go to the nearest ball", Duration = 5, Button1 = "Okay"})
  39. end
  40. _G.Autogaurd = v
  41. end})
  42. main:AddSlider({Name = "WalkSpeed", Min = 16, Max = 19, Default = 16, Color = Color3.fromRGB(80, 80, 255), Increment = 0.1, Callback = function(v)
  43. _G.WS = v
  44. end})
  45.  
  46. local shootingEvent = game:GetService("ReplicatedStorage").shootingEvent
  47.  
  48. if workspace:FindFirstChild("PracticeArea") then
  49. workspace.PracticeArea.Parent = workspace.Courts
  50. end
  51.  
  52. local jumping = false
  53.  
  54. for i,v in pairs(getconnections(game:GetService("UserInputService").TouchTapInWorld)) do
  55. for z,x in pairs(getupvalues(v.Function)) do
  56. if type(x) == "table" and rawget(x, 1) then
  57. _G.method = x
  58. elseif z == 10 then
  59. _G.key = x
  60. end
  61. end
  62. end
  63.  
  64. for i,v in pairs(getconnections(plr.Character.HumanoidRootPart:GetPropertyChangedSignal("Size"))) do
  65. v:Disable()
  66. end
  67.  
  68. for i,v in pairs(getconnections(plr.Character.HumanoidRootPart:GetPropertyChangedSignal("Color"))) do
  69. v:Disable()
  70. end
  71.  
  72. for i,v in pairs(getconnections(plr.Character.HumanoidRootPart:GetPropertyChangedSignal("BrickColor"))) do
  73. v:Disable()
  74. end
  75.  
  76. for i,v in pairs(getconnections(plr.Character.Humanoid:GetPropertyChangedSignal("WalkSpeed"))) do
  77. v:Disable()
  78. end
  79.  
  80. local ground
  81.  
  82. local part = workspace:FindPartOnRay(Ray.new(plr.Character.Torso.Position, Vector3.new(0, -100, 5)))
  83. if part then
  84. ground = part
  85. end
  86.  
  87. local tracking = false
  88. local player
  89.  
  90. function updateNearestPlayerWithBall()
  91. local dist = 9e9
  92. for i,v in pairs(game.Players:GetPlayers()) do
  93. if v.Name ~= plr.Name and v.Character and v.Character:FindFirstChild("Basketball") and not plr.Character:FindFirstChild("Basketball") and (plr.Character.Torso.Position - v.Character.Torso.Position).Magnitude < 50 then
  94. local mag = (plr.Character.Torso.Position - v.Character.Torso.Position).Magnitude
  95. if dist > mag then
  96. dist = mag
  97. player = v
  98. end
  99. end
  100. end
  101. end
  102.  
  103. if _G.hook ~= nil then
  104. _G.hook = ""; _G.hook = hookmetamethod(game, "__index", newcclosure(function(self, idx)
  105. if tostring(self) == "HumanoidRootPart" and idx == "Size" then
  106. return Vector3.new(2, 2, 1)
  107. elseif tostring(self) == "HumanoidRootPart" and idx == "BrickColor" then
  108. return BrickColor.new("Medium stone grey")
  109. elseif tostring(self) == "HumanoidRootPart" and idx == "Color" then
  110. return Color3.fromRGB(163, 162, 165)
  111. elseif tostring(self) == "Humanoid" and idx == "WalkSpeed" then
  112. return 16
  113. end
  114. return hook(self, idx)
  115. end))
  116. end
  117.  
  118. shootingEvent.OnClientEvent:Connect(function(newKey)
  119. _G.key = newKey
  120. end)
  121.  
  122. function setup()
  123. local dist, goal = 9e9, nil
  124. for i,v in pairs(workspace.Courts:GetDescendants()) do
  125. if v.Name == "Swish" and v:IsA("Sound") and plr.Character and plr.Character:FindFirstChild("Torso") then
  126. local mag = (plr.Character.Torso.Position - v.Parent.Position).Magnitude
  127. if dist > mag then
  128. dist = mag; goal = v.Parent
  129. end
  130. end
  131. end
  132. return dist, goal
  133. end
  134.  
  135. function power()
  136. return plr.Power
  137. end
  138.  
  139. function changePower(goal)
  140. power().Value = goal
  141. end
  142.  
  143. function table(a, b)
  144. local args = {
  145. X1 = a.X,
  146. Y1 = a.Y,
  147. Z1 = a.Z,
  148. X2 = b.X,
  149. Y2 = b.Y,
  150. Z2 = b.Z
  151. };
  152.  
  153. return {args[_G.method[1]], args[_G.method[2]], args[_G.method[3]], args[_G.method[4]], args[_G.method[5]], args[_G.method[6]]}
  154. end
  155.  
  156. function arc()
  157. local dist, goal = setup()
  158.  
  159. dist = math.floor(dist)
  160. print(dist)
  161. if dist == 12 or dist == 13 then
  162. return 15
  163. elseif dist == 14 or dist == 15 then
  164. return 20
  165. elseif dist == 16 or dist == 17 then
  166. return 15
  167. elseif dist == 18 then
  168. return 25
  169. elseif dist == 19 then
  170. return 20
  171. elseif dist == 20 or dist == 21 then
  172. return 20
  173. elseif dist == 22 or dist == 23 then
  174. return 25
  175. elseif dist == 24 or dist == 25 then
  176. return 20
  177. elseif dist == 26 then
  178. return 15
  179. elseif dist == 27 or dist == 28 then
  180. return 25
  181. elseif dist == 29 or dist == 30 then
  182. return 20
  183. elseif dist == 31 then
  184. return 15
  185. elseif dist == 32 or dist == 33 then
  186. return 30
  187. elseif dist == 34 or dist == 35 or dist == 36 then
  188. return 25
  189. elseif dist == 37 or dist == 38 then
  190. return 35
  191. elseif dist == 39 or dist == 40 then
  192. return 30
  193. elseif dist == 41 then
  194. return 25
  195. elseif dist == 42 or dist == 43 then
  196. return 40
  197. elseif dist == 44 then
  198. return 35
  199. elseif dist == 45 or dist == 46 then
  200. return 30
  201. elseif dist == 47 or dist == 48 then
  202. return 45
  203. elseif dist == 49 then
  204. return 40
  205. elseif dist == 50 then
  206. return 35
  207. elseif dist == 51 then
  208. return 50
  209. elseif dist == 52 then
  210. return 55
  211. elseif dist == 53 or dist == 54 then
  212. return 50
  213. elseif dist == 55 then
  214. return 45
  215. elseif dist == 56 then
  216. return 40
  217. elseif dist == 57 or dist == 58 then
  218. return 55
  219. elseif dist == 59 or dist == 60 or dist == 61 then
  220. return 50
  221. elseif dist == 62 or dist == 63 then
  222. return 65
  223. elseif dist == 64 then
  224. return 55
  225. elseif dist == 65 then
  226. return 60
  227. elseif dist == 66 or dist == 67 then
  228. return 50
  229. elseif dist == 68 or dist == 69 then
  230. return 75
  231. elseif dist == 70 or dist == 71 then
  232. return 70
  233. elseif dist == 72 then
  234. return 65
  235. elseif dist == 73 then
  236. return 60
  237. elseif dist == 74 then
  238. return 50
  239. elseif jumping then
  240. if dist == 9 or dist == 10 then
  241. return 20
  242. elseif dist == 11 or dist == 12 then
  243. return 15
  244. end
  245. end
  246. end
  247.  
  248. function getNearestPart(torso)
  249. local dist, part = 9e9
  250. for i,v in pairs(plr.Character:GetChildren()) do
  251. if v:IsA("Part") and torso then
  252. local mag = (v.Position - torso.Position).Magnitude
  253. if dist > mag then
  254. dist = mag
  255. part = v
  256. end
  257. end
  258. end
  259. return part
  260. end
  261.  
  262. function stepped() pcall(function()
  263. if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") and _G.Aimbot then
  264. local pwr = power()
  265. local dist, goal = setup()
  266. local root = plr.Character.HumanoidRootPart
  267.  
  268. dist = math.floor(dist)
  269.  
  270. if root and hasBall then
  271. root.Size = Vector3.new(2.1, 2.1, 1.1)
  272. root.BrickColor = BrickColor.new("Lime green")
  273. root.Material = Enum.Material.Neon
  274.  
  275. if dist >= 13 and dist <= 16 then
  276. changePower(30)
  277. root.Transparency = 0
  278. elseif dist >= 17 and dist <= 21 then
  279. changePower(35)
  280. root.Transparency = 0
  281. elseif dist >= 22 and dist <= 26 then
  282. changePower(40)
  283. root.Transparency = 0
  284. elseif dist >= 27 and dist <= 31 then
  285. changePower(45)
  286. root.Transparency = 0
  287. elseif dist >= 32 and dist <= 36 then
  288. changePower(50)
  289. root.Transparency = 0
  290. elseif dist >= 37 and dist <= 41 then
  291. changePower(55)
  292. root.Transparency = 0
  293. elseif dist >= 42 and dist <= 46 then
  294. changePower(60)
  295. root.Transparency = 0
  296. elseif dist >= 47 and dist <= 50 then
  297. changePower(65)
  298. root.Transparency = 0
  299. elseif dist >= 51 and dist <= 56 then
  300. changePower(70)
  301. root.Transparency = 0
  302. elseif dist >= 57 and dist <= 61 then
  303. changePower(75)
  304. root.Transparency = 0
  305. elseif dist >= 62 and dist <= 67 then
  306. changePower(80)
  307. root.Transparency = 0
  308. elseif dist >= 68 and dist <= 74 then
  309. changePower(85)
  310. root.Transparency = 0
  311. elseif jumping and dist == 9 or dist == 10 or dist == 11 or dist == 12 then
  312. changePower(25)
  313. root.Transparency = 0
  314. else
  315. root.Transparency = 1
  316. end
  317. elseif root and not hasBall and _G.Aimbot then
  318. root.Transparency = 1
  319. elseif root and not _G.Aimbot then
  320. root.Transparency = 1
  321. end
  322. end
  323.  
  324. updateNearestPlayerWithBall()
  325.  
  326. if _G.WS ~= 16 and plr.Character:WaitForChild("Humanoid").WalkSpeed ~= 0 then
  327. plr.Character:WaitForChild("Humanoid").WalkSpeed = _G.WS
  328. end
  329.  
  330. if _G.Autogaurd and tracking and player and plr.Character and plr.Character:FindFirstChild("Humanoid") and not plr.Character:FindFirstChild("Basketball") and player.Character and player.Character:FindFirstChild("Basketball") then
  331. plr.Character.Humanoid:MoveTo(player.Character.Basketball:FindFirstChildOfClass("Part").Position + player.Character.Torso.CFrame.LookVector + ((player.Character.Humanoid.MoveDirection * 2) + (plr.Character.Torso.Velocity.Unit * 3)))
  332.  
  333. if (player.Character.Torso.Position.Y - ground.Position.Y) > 2.5 then
  334. plr.Character.Humanoid.Jump = true
  335. end
  336. elseif tracking and player ~= nil and player.Character and plr.Character and plr.Character:FindFirstChild("Basketball") or not player.Character:FindFirstChild("Basketball") then
  337. tracking = false
  338. return
  339. end
  340.  
  341. for i,v in pairs(game.Players:GetPlayers()) do
  342. if (v.Name ~= plr.Name and v.Character and plr.Character) and _G.Reach then
  343. local nearestPart = getNearestPart(v.Character.Torso)
  344. for z,x in pairs(v.Character:GetChildren()) do
  345. if ((nearestPart.Position - v.Character.Torso.Position).Magnitude < 8) then
  346. if (x:IsA("Tool") or x:IsA("Folder")) then
  347. firetouchinterest(nearestPart, x:FindFirstChildOfClass("Part"), 0)
  348. task.wait()
  349. firetouchinterest(nearestPart, x:FindFirstChildOfClass("Part"), 1)
  350. elseif (x:IsA("BasePart") and string.find(x.Name:lower(), "ball")) then
  351. firetouchinterest(nearestPart, x, 0)
  352. task.wait()
  353. firetouchinterest(nearestPart, x, 1)
  354. end
  355. end
  356. end
  357. end
  358. end
  359. end) end
  360.  
  361. function shoot()
  362. local dist, goal = setup()
  363. local pwr = power()
  364. local arc = arc()
  365.  
  366. if arc ~= nil and plr.Character and plr.Character:FindFirstChild("Humanoid") then
  367. local args = table(plr.Character.Torso.Position, (goal.Position + Vector3.new(0, arc, 0) - plr.Character.HumanoidRootPart.Position + plr.Character.Humanoid.MoveDirection).Unit)
  368.  
  369. shootingEvent:FireServer(
  370. plr.Character.Basketball,
  371. pwr.Value,
  372. args,
  373. _G.key
  374. )
  375. end
  376. end
  377.  
  378. function jumped()
  379. if _G.Aimbot and plr.Character and hasBall and plr.Character:FindFirstChild("HumanoidRootPart") and plr.Character.HumanoidRootPart.Transparency == 0 then
  380. jumping = true
  381. task.wait(0.325)
  382. shoot()
  383. task.wait(0.1)
  384. jumping = false
  385. end
  386. end
  387.  
  388. function added(v)
  389. if v.Name == "Basketball" then
  390. task.wait(0.5)
  391. hasBall = true
  392. end
  393. end
  394.  
  395. function removed(v)
  396. if v.Name == "Basketball" then
  397. hasBall = false
  398. end
  399. end
  400.  
  401. function began(key, gpe)
  402. if not gpe and key.KeyCode == Enum.KeyCode.U and _G.Autogaurd then
  403. updateNearestPlayerWithBall()
  404. if not tracking then
  405. tracking = true
  406. else
  407. tracking = false
  408. end
  409. end
  410. end
  411.  
  412. _G.input = plr.Character.Humanoid.Jumping:Connect(jumped)
  413. _G.added = plr.Character.ChildAdded:Connect(added)
  414. _G.removed = plr.Character.ChildRemoved:Connect(removed)
  415. _G.stepped = rs.Stepped:Connect(stepped)
  416. _G.began = uis.InputBegan:Connect(began)
  417.  
  418. _G.charAdded = plr.CharacterAdded:Connect(function(ch)
  419. _G.input = ch:WaitForChild("Humanoid").Jumping:Connect(jumped)
  420. _G.added = ch.ChildAdded:Connect(added)
  421. _G.removed = ch.ChildRemoved:Connect(removed)
  422.  
  423. for i,v in pairs(getconnections(ch:WaitForChild("HumanoidRootPart"):GetPropertyChangedSignal("Size"))) do
  424. v:Disable()
  425. end
  426. for i,v in pairs(getconnections(ch:WaitForChild("HumanoidRootPart"):GetPropertyChangedSignal("BrickColor"))) do
  427. v:Disable()
  428. end
  429. for i,v in pairs(getconnections(ch:WaitForChild("HumanoidRootPart"):GetPropertyChangedSignal("Color"))) do
  430. v:Disable()
  431. end
  432. for i,v in pairs(getconnections(ch:WaitForChild("Humanoid"):GetPropertyChangedSignal("WalkSpeed"))) do
  433. v:Disable()
  434. end
  435. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement