Hto945

AimBotIAT_LooseDummyCREATOR

Sep 25th, 2024
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. local replicatedStorage = game:GetService("ReplicatedStorage")
  2. local players = game:GetService("Players")
  3. local UserInputService = game:GetService("UserInputService")
  4. local mouse = game.Players.LocalPlayer:GetMouse()
  5.  
  6. local tool = Instance.new("Tool")
  7. tool.RequiresHandle = false
  8. tool.Name = "tpTool"
  9. tool.Activated:connect(function()
  10. local pos = mouse.Hit + Vector3.new(0, 2.5, 0)
  11. pos = CFrame.new(pos.X, pos.Y, pos.Z)
  12. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = pos
  13. end)
  14. tool.Parent = game.Players.LocalPlayer.Backpack
  15.  
  16. local attacks = replicatedStorage:WaitForChild("Attacks")
  17. local spaceRipper = attacks:WaitForChild("SpaceRipper")
  18. local localPlayer = players.LocalPlayer
  19. local animationId = "rbxassetid://5901872109"
  20. local animator = localPlayer.Character:WaitForChild("Humanoid"):FindFirstChildOfClass("Animator") or Instance.new("Animator", localPlayer.Character:WaitForChild("Humanoid"))
  21.  
  22. local screenGui = Instance.new("ScreenGui", localPlayer.PlayerGui)
  23. local button = Instance.new("TextButton", screenGui)
  24. button.Size = UDim2.new(0, 100, 0, 50)
  25. button.Position = UDim2.new(0.9, 0, 0.9, 0)
  26. button.Text = "Space Ripper"
  27. button.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  28.  
  29. local function getClosestPlayer()
  30. local closestPlayer = nil
  31. local closestDistance = math.huge
  32.  
  33. for _, player in ipairs(players:GetPlayers()) do
  34. if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  35. local distance = (localPlayer.Character.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).magnitude
  36. if distance < closestDistance then
  37. closestDistance = distance
  38. closestPlayer = player
  39. end
  40. end
  41. end
  42.  
  43. return closestPlayer
  44. end
  45.  
  46. local function predictTargetPosition(target, speed)
  47. local targetPosition = target.Character.HumanoidRootPart.Position
  48. local targetVelocity = target.Character.HumanoidRootPart.Velocity
  49. local predictedPosition = targetPosition + targetVelocity * speed
  50. return predictedPosition
  51. end
  52.  
  53. local function onButtonClick()
  54. local closestPlayer = getClosestPlayer()
  55.  
  56. if closestPlayer then
  57. local animation = Instance.new("Animation")
  58. animation.AnimationId = animationId
  59. local animationTrack = animator:LoadAnimation(animation)
  60. animationTrack:Play()
  61.  
  62. wait(0.3)
  63.  
  64. local targetPosition = predictTargetPosition(closestPlayer, 0.4)
  65. spaceRipper:FireServer(targetPosition, closestPlayer.Name)
  66. else
  67. warn("no nearby player.")
  68. end
  69. end
  70.  
  71. button.MouseButton1Click:Connect(onButtonClick)
Add Comment
Please, Sign In to add comment