Advertisement
BLATANTYADY

hoopz script

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