Advertisement
giorgichaduneli

Untitled

Mar 9th, 2024
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. getgenv().Paws = {
  2. ["AutoParry"] = true,
  3. ["PingBased"] = false,
  4. ["PingBasedOffset"] = 0,
  5. ["DistanceToParry"] = 0.5,
  6. ["BallSpeedCheck"] = true,
  7. }
  8.  
  9. local Players = game:GetService("Players")
  10. local Player = Players.LocalPlayer or Players.PlayerAdded:Wait()
  11. local ReplicatedPaw = game:GetService("ReplicatedStorage")
  12.  
  13. local Paws = ReplicatedPaw:WaitForChild("Remotes", 9e9)
  14. local PawsBalls = workspace:WaitForChild("Balls", 9e9)
  15. local PawsTable = getgenv().Paws
  16.  
  17. local function IsTheTarget()
  18. return Player.Character:FindFirstChild("Highlight")
  19. end
  20.  
  21. local function FindBall()
  22. local RealBall
  23. for i, v in pairs(PawsBalls:GetChildren()) do
  24. if v:GetAttribute("realBall") == true then
  25. RealBall = v
  26. local distance = 10
  27. -- You can use 'distance' variable as needed here
  28. end
  29. end
  30. return RealBall
  31. end
  32.  
  33. game:GetService("RunService").PreRender:connect(function()
  34. if not FindBall() then
  35. return
  36. end
  37. local Ball = FindBall()
  38.  
  39. local BallPosition = Ball.Position
  40.  
  41. local BallVelocity = Ball.AssemblyLinearVelocity.Magnitude
  42.  
  43. local Distance = Player:DistanceFromCharacter(BallPosition)
  44.  
  45. local Ping = BallVelocity * (game.Stats.Network.ServerStatsItem["Data Ping"]:GetValue() / 1000)
  46.  
  47. if PawsTable.PingBased then
  48. Distance -= Ping + PawsTable.PingBasedOffset
  49. end
  50.  
  51. if PawsTable.BallSpeedCheck and BallVelocity == 0 then return
  52. end
  53.  
  54. if (Distance / BallVelocity) <= PawsTable.DistanceToParry and IsTheTarget() and PawsTable.AutoParry then
  55. Paws:WaitForChild("ParryButtonPress"):Fire()
  56. end
  57. end)
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement