Advertisement
ColdSpecs

park aimbot

Jul 13th, 2023 (edited)
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. -- Generated From Chat GPT-4
  2. -- Variables
  3. local plr = game.Players.LocalPlayer
  4.  
  5. local uis = game:GetService("UserInputService")
  6. local rs = game:GetService("RunService")
  7.  
  8. local footing = false
  9. local hasBall = false
  10. local label
  11.  
  12. for i,v in pairs(plr.PlayerGui:GetDescendants()) do
  13. if v:IsA("TextLabel") and v.Text == "75" then
  14. label = v
  15. end
  16. end
  17.  
  18. -- Functions
  19.  
  20. function getGoal()
  21. local dist, goal = 9e9
  22. for i,v in pairs(workspace:GetDescendants()) do
  23. if v.Name == "Lol" or v.Name == "Goal" then
  24. local mag = (plr.Character.Torso.Position - v.Position).Magnitude
  25. if dist > mag then
  26. dist = mag; goal = v;
  27. end
  28. end
  29. end
  30. return goal
  31. end
  32.  
  33. function getVector(goal)
  34. local dist = (plr.Character.Torso.Position - goal.Position).Magnitude
  35. return goal.Position + Vector3.new(0, 45 + (dist / 10)) - plr.Character.Humanoid.MoveDirection
  36. end
  37.  
  38. function shootBall(vector)
  39. if hasBall then
  40. local event = plr.Character.Basketball.shoot_event
  41.  
  42. local unit = (vector - plr.Character.Head.Position).Unit
  43. local spawnPos = plr.Character.PrimaryPart.Position + unit * 3.8
  44.  
  45. if spawnPos.Y - plr.Character.PrimaryPart.Position.Y < 4 then
  46. spawnPos = plr.Character.PrimaryPart.Position + unit * 4
  47. end
  48.  
  49. event:FireServer(
  50. vector,
  51. spawnPos,
  52. "\240\159\148\165\240\159\148\165"
  53. )
  54. end
  55. end
  56.  
  57. function handleJumped()
  58. task.wait(0.225)
  59. shootBall(getVector(getGoal()))
  60. end
  61.  
  62. function handleRender()
  63. local goal = getGoal()
  64. local dist = (plr.Character.Torso.Position - goal.Position).Magnitude
  65.  
  66. if math.floor(dist) == 57 then
  67. footing = true
  68. else
  69. footing = false
  70. end
  71.  
  72. if plr.Character and plr.Character:FindFirstChild("Basketball") then
  73. hasBall = true
  74. else
  75. hasBall = false
  76. end
  77.  
  78. if hasBall then
  79. if footing then
  80. label.TextColor3 = Color3.fromRGB(0, 255, 0)
  81. else
  82. label.TextColor3 = Color3.fromRGB(255, 0, 0)
  83. end
  84. else
  85. label.TextColor3 = Color3.fromRGB(157, 157, 157)
  86. end
  87. end
  88.  
  89. -- Connections
  90.  
  91. plr.Character.Humanoid.Jumping:Connect(handleJumped)
  92. rs.Stepped:Connect(handleRender)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement