giorgichadunelipro

Untitled

Jan 10th, 2024 (edited)
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.91 KB | None | 0 0
  1. local function get_plr()
  2. return game.Players.LocalPlayer
  3. end
  4.  
  5. local function get_plrChar()
  6. local plrChar = get_plr().Character
  7. if plrChar then
  8. return plrChar
  9. end
  10. end
  11.  
  12. local function get_plrRP()
  13. local plrRP = get_plrChar():FindFirstChild("HumanoidRootPart")
  14. if plrRP then
  15. return plrRP
  16. end
  17. end
  18.  
  19. local function playerJump()
  20. pcall(function()
  21. game.Players.LocalPlayer.Character.Humanoid.Jump = true
  22. end)
  23. end
  24.  
  25. local function get_PlayersNumber()
  26. local Alive = workspace:WaitForChild("Alive", 20):GetChildren()
  27. local PlayersNumber = 0
  28. for _,v in pairs(Alive) do
  29. if v and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 50 then
  30. PlayersNumber = PlayersNumber + 1
  31. end
  32. end
  33. return PlayersNumber
  34. end
  35.  
  36. local function get_ProxyPlayer()
  37. local Players = workspace:WaitForChild("Alive"):GetChildren()
  38. local Distance = math.huge
  39. local plr = game.Players.LocalPlayer
  40. local plrRP = plr.Character:FindFirstChild("HumanoidRootPart")
  41. local Player = nil
  42.  
  43. for _,plr1 in pairs(Players) do
  44. if plr1.Name ~= plr.Name and plrRP and plr1:FindFirstChild("HumanoidRootPart") and plr1:FindFirstChild("Humanoid") and plr1.Humanoid.Health > 50 then
  45. local magnitude = (plr1.HumanoidRootPart.Position - plrRP.Position).Magnitude
  46. if magnitude <= Distance then
  47. Distance = magnitude
  48. Player = plr1
  49. end
  50. end
  51. end
  52. return Player
  53. end
  54.  
  55. local function Click_Button()
  56. task.spawn(function()
  57. local plr = game.Players.LocalPlayer
  58. local plrFind = workspace.Alive:FindFirstChild(plr.Name)
  59. if plrFind then
  60. local plrs = 0
  61. for _,v in pairs(workspace:WaitForChild("Alive", 10):GetChildren()) do
  62. plrs = plrs + 1
  63. end
  64. if plrs > 1 then
  65. local args = {[1] = 1.5,[2] = CFrame.new(-254, 112, -119) * CFrame.Angles(-2, 0, 2),[3] = {
  66. ["2617721424"] = Vector3.new(-273, -724, -20),
  67. },[4] = {[1] = 910,[2] = 154}}
  68. game:GetService("ReplicatedStorage").Remotes.ParryAttempt:FireServer(unpack(args))task.wait()
  69. end
  70. end
  71. end)
  72. end
  73.  
  74. task.spawn(function()
  75. while task.wait() do
  76. if getgenv().SpamClickA then
  77. Click_Button()
  78. end
  79. end
  80. end)
  81.  
  82. local function DetectSpam()
  83. local Balls = workspace:WaitForChild("Balls", 20)
  84.  
  85. local OldPos = Vector3.new()
  86. local OldTick1 = tick()
  87.  
  88. local OldBall = Balls
  89. local TargetPlayer = ""
  90. local SpamNum = 0
  91. local BallSpeed = 0
  92. local BallDistance = 0
  93.  
  94. task.spawn(function()
  95. local OldTick = tick()
  96. local OldPos = Vector3.new()
  97. while getgenv().DetectSpam do task.wait()
  98. local plrRP = get_plrRP()
  99. local Ball = Balls:FindFirstChildOfClass("Part")
  100. if plrRP and Ball then
  101. BallDistance = (plrRP.Position - Ball.Position).Magnitude
  102. BallSpeed = (OldPos - Ball.Position).Magnitude
  103. if tick() - OldTick >= 1/60 then
  104. OldTick = tick()
  105. OldPos = Ball.Position
  106. end
  107. end
  108. end
  109. end)
  110.  
  111. while getgenv().DetectSpam do task.wait()
  112. local Ball = Balls:FindFirstChildOfClass("Part")
  113. local plrRP = get_plrRP()
  114. local ProxyPlayer = get_ProxyPlayer()
  115.  
  116. if not Ball then
  117. getgenv().SpamClickA = false
  118. end
  119.  
  120. if Ball and Ball:GetAttribute("realBall") and OldBall ~= Ball then
  121.  
  122. Ball.Changed:Connect(function()task.wait()
  123. local Ball = Balls:FindFirstChildOfClass("Part")
  124.  
  125. if Ball then
  126. TargetPlayer = Ball:GetAttribute("target")
  127.  
  128. if ProxyPlayer and TargetPlayer == ProxyPlayer.Name or get_plr() and TargetPlayer == get_plr().Name then
  129. SpamNum = SpamNum + 1
  130. else
  131. SpamNum = 0
  132. end
  133.  
  134. local args = ProxyPlayer and ProxyPlayer:FindFirstChild("HumanoidRootPart")
  135. local HL1 = ProxyPlayer and ProxyPlayer:FindFirstChild("Highlight")
  136. local HL2 = get_plrChar() and get_plrChar():FindFirstChild("Highlight")
  137.  
  138. if plrRP and HL1 and args or plrRP and HL2 and args then
  139. local DistancePlayer = (ProxyPlayer.HumanoidRootPart.Position - plrRP.Position).Magnitude
  140. local DistanceBall = (Ball.Position - plrRP.Position).Magnitude
  141.  
  142. if get_PlayersNumber() < 3 then
  143. if DistancePlayer <= 30 and DistanceBall <= 35 and SpamNum >= 2 then
  144. getgenv().SpamClickA = true
  145. else
  146. getgenv().SpamClickA = false
  147. end
  148. else
  149. if DistancePlayer <= 30 and DistanceBall <= 35 and SpamNum >= 3 then
  150. getgenv().SpamClickA = true
  151. else
  152. getgenv().SpamClickA = false
  153. end
  154. end
  155. else
  156. getgenv().SpamClickA = false
  157. end
  158. end
  159. end)
  160. OldBall = Ball
  161. end
  162. end
  163. end
  164.  
  165. getgenv().DetectSpam = true
  166. DetectSpam()
Add Comment
Please, Sign In to add comment