Elisonpp

Blade ball by darker 9899

Jan 15th, 2025 (edited)
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.48 KB | None | 0 0
  1. -- Criação de uma ScreenGui
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Name = "AutoParryGui"
  4. screenGui.ResetOnSpawn = false -- Isso impede que a GUI seja removida quando o jogador respawnar
  5. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  6.  
  7. -- Criação da Janela Principal
  8. local mainFrame = Instance.new("Frame")
  9. mainFrame.Parent = screenGui
  10. mainFrame.Size = UDim2.new(0, 250, 0, 150)
  11. mainFrame.Position = UDim2.new(0.5, -125, 0.5, -75)
  12. mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  13. mainFrame.BorderSizePixel = 0
  14. mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  15. mainFrame.Visible = true
  16.  
  17. -- Adicionando Cantos Arredondados
  18. local uiCorner = Instance.new("UICorner")
  19. uiCorner.Parent = mainFrame
  20. uiCorner.CornerRadius = UDim.new(0, 12)
  21.  
  22. -- Título da Janela
  23. local titleLabel = Instance.new("TextLabel")
  24. titleLabel.Parent = mainFrame
  25. titleLabel.Size = UDim2.new(1, 0, 0, 30)
  26. titleLabel.Position = UDim2.new(0, 0, 0, 0)
  27. titleLabel.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  28. titleLabel.Text = "Auto Parry Script - by darker9899"
  29. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  30. titleLabel.Font = Enum.Font.SourceSansBold
  31. titleLabel.TextSize = 16
  32.  
  33. -- Adicionando Cantos Arredondados no Título
  34. local titleCorner = Instance.new("UICorner")
  35. titleCorner.Parent = titleLabel
  36. titleCorner.CornerRadius = UDim.new(0, 12)
  37.  
  38. -- Botão de Auto Parry
  39. local autoParryButton = Instance.new("TextButton")
  40. autoParryButton.Parent = mainFrame
  41. autoParryButton.Size = UDim2.new(0.8, 0, 0, 40)
  42. autoParryButton.Position = UDim2.new(0.1, 0, 0.4, 0)
  43. autoParryButton.BackgroundColor3 = Color3.fromRGB(60, 120, 220)
  44. autoParryButton.Text = "Ativar Auto Parry"
  45. autoParryButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  46. autoParryButton.Font = Enum.Font.SourceSansBold
  47. autoParryButton.TextSize = 16
  48.  
  49. -- Adicionando Cantos Arredondados no Botão
  50. local buttonCorner = Instance.new("UICorner")
  51. buttonCorner.Parent = autoParryButton
  52. buttonCorner.CornerRadius = UDim.new(0, 12)
  53.  
  54. -- Função do Botão Auto Parry
  55. autoParryButton.MouseButton1Click:Connect(function()
  56. print("Auto Parry ativado!") local RunService = game:GetService("RunService") or game:FindFirstDescendant("RunService")
  57. local Players = game:GetService("Players") or game:FindFirstDescendant("Players")
  58. local VirtualInputManager = game:GetService("VirtualInputManager") or game:FindFirstDescendant("VirtualInputManager")
  59.  
  60. local Player = Players.LocalPlayer
  61.  
  62. local Cooldown = tick()
  63. local IsParried = false
  64. local Connection = nil
  65.  
  66. local function GetBall()
  67. for _, Ball in ipairs(workspace.Balls:GetChildren()) do
  68. if Ball:GetAttribute("realBall") then
  69. return Ball
  70. end
  71. end
  72. end
  73.  
  74. local function ResetConnection()
  75. if Connection then
  76. Connection:Disconnect()
  77. Connection = nil
  78. end
  79. end
  80.  
  81. workspace.Balls.ChildAdded:Connect(function()
  82. local Ball = GetBall()
  83. if not Ball then return end
  84. ResetConnection()
  85. Connection = Ball:GetAttributeChangedSignal("target"):Connect(function()
  86. Parried = false
  87. end)
  88. end)
  89.  
  90. RunService.PreSimulation:Connect(function()
  91. local Ball, HRP = GetBall(), Player.Character.HumanoidRootPart
  92. if not Ball or not HRP then
  93. return
  94. end
  95.  
  96. local Speed = Ball.zoomies.VectorVelocity.Magnitude
  97. local Distance = (HRP.Position - Ball.Position).Magnitude
  98.  
  99. if Ball:GetAttribute("target") == Player.Name and not Parried and Distance / Speed <= 0.55 then
  100. VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0)
  101. Parried = true
  102. Cooldown = tick()
  103.  
  104. if (tick() - Cooldown) >= 1 then
  105. Partied = false
  106. end
  107. end
  108. end)
  109. end)
  110.  
  111. -- Botão para fechar/abrir a Janela
  112. local toggleButton = Instance.new("TextButton")
  113. toggleButton.Parent = screenGui
  114. toggleButton.Size = UDim2.new(0, 100, 0, 40)
  115. toggleButton.Position = UDim2.new(0.5, -50, 0.9, 0)
  116. toggleButton.BackgroundColor3 = Color3.fromRGB(100, 200, 100)
  117. toggleButton.Text = "Fechar"
  118. toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  119. toggleButton.Font = Enum.Font.SourceSansBold
  120. toggleButton.TextSize = 16
  121.  
  122. -- Adicionando Cantos Arredondados no Botão de Toggle
  123. local toggleCorner = Instance.new("UICorner")
  124. toggleCorner.Parent = toggleButton
  125. toggleCorner.CornerRadius = UDim.new(0, 12)
  126.  
  127. -- Função do Botão de Fechar/Abrir
  128. local isVisible = true
  129. toggleButton.MouseButton1Click:Connect(function()
  130. isVisible = not isVisible
  131. mainFrame.Visible = isVisible
  132. toggleButton.Text = isVisible and "Fechar" or "Abrir"
  133. end)
  134.  
  135. -- Garantir que a GUI persista após a morte
  136. local player = game.Players.LocalPlayer
  137. player.CharacterAdded:Connect(function()
  138. screenGui.Parent = player:WaitForChild("PlayerGui")
  139. end)
  140.  
  141. -- Criação de uma ScreenGui
  142. local screenGui = Instance.new("ScreenGui")
  143. screenGui.Name = "AutoParryGui"
  144. screenGui.ResetOnSpawn = false -- Isso impede que a GUI seja removida quando o jogador respawnar
  145. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  146.  
  147. -- Criação da Janela Principal
  148. local mainFrame = Instance.new("Frame")
  149. mainFrame.Parent = screenGui
  150. mainFrame.Size = UDim2.new(0, 250, 0, 150)
  151. mainFrame.Position = UDim2.new(0.5, -125, 0.5, -75)
  152. mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  153. mainFrame.BorderSizePixel = 0
  154. mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  155. mainFrame.Visible = true
  156.  
  157. -- Adicionando Cantos Arredondados
  158. local uiCorner = Instance.new("UICorner")
  159. uiCorner.Parent = mainFrame
  160. uiCorner.CornerRadius = UDim.new(0, 12)
  161.  
  162. -- Título da Janela
  163. local titleLabel = Instance.new("TextLabel")
  164. titleLabel.Parent = mainFrame
  165. titleLabel.Size = UDim2.new(1, 0, 0, 30)
  166. titleLabel.Position = UDim2.new(0, 0, 0, 0)
  167. titleLabel.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  168. titleLabel.Text = "Auto Parry Script - by darker9899"
  169. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  170. titleLabel.Font = Enum.Font.SourceSansBold
  171. titleLabel.TextSize = 16
  172.  
  173. -- Adicionando Cantos Arredondados no Título
  174. local titleCorner = Instance.new("UICorner")
  175. titleCorner.Parent = titleLabel
  176. titleCorner.CornerRadius = UDim.new(0, 12)
  177.  
  178. -- Botão de Auto Parry
  179. local autoParryButton = Instance.new("TextButton")
  180. autoParryButton.Parent = mainFrame
  181. autoParryButton.Size = UDim2.new(0.8, 0, 0, 40)
  182. autoParryButton.Position = UDim2.new(0.1, 0, 0.4, 0)
  183. autoParryButton.BackgroundColor3 = Color3.fromRGB(60, 120, 220)
  184. autoParryButton.Text = "Ativar Auto Parry"
  185. autoParryButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  186. autoParryButton.Font = Enum.Font.SourceSansBold
  187. autoParryButton.TextSize = 16
  188.  
  189. -- Adicionando Cantos Arredondados no Botão
  190. local buttonCorner = Instance.new("UICorner")
  191. buttonCorner.Parent = autoParryButton
  192. buttonCorner.CornerRadius = UDim.new(0, 12)
  193.  
  194. -- Função do Botão Auto Parry
  195. autoParryButton.MouseButton1Click:Connect(function()
  196. print("Auto Parry ativado!") local RunService = game:GetService("RunService") or game:FindFirstDescendant("RunService")
  197. local Players = game:GetService("Players") or game:FindFirstDescendant("Players")
  198. local VirtualInputManager = game:GetService("VirtualInputManager") or game:FindFirstDescendant("VirtualInputManager")
  199.  
  200. local Player = Players.LocalPlayer
  201.  
  202. local Cooldown = tick()
  203. local IsParried = false
  204. local Connection = nil
  205.  
  206. local function GetBall()
  207. for _, Ball in ipairs(workspace.Balls:GetChildren()) do
  208. if Ball:GetAttribute("realBall") then
  209. return Ball
  210. end
  211. end
  212. end
  213.  
  214. local function ResetConnection()
  215. if Connection then
  216. Connection:Disconnect()
  217. Connection = nil
  218. end
  219. end
  220.  
  221. workspace.Balls.ChildAdded:Connect(function()
  222. local Ball = GetBall()
  223. if not Ball then return end
  224. ResetConnection()
  225. Connection = Ball:GetAttributeChangedSignal("target"):Connect(function()
  226. Parried = false
  227. end)
  228. end)
  229.  
  230. RunService.PreSimulation:Connect(function()
  231. local Ball, HRP = GetBall(), Player.Character.HumanoidRootPart
  232. if not Ball or not HRP then
  233. return
  234. end
  235.  
  236. local Speed = Ball.zoomies.VectorVelocity.Magnitude
  237. local Distance = (HRP.Position - Ball.Position).Magnitude
  238.  
  239. if Ball:GetAttribute("target") == Player.Name and not Parried and Distance / Speed <= 0.55 then
  240. VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0)
  241. Parried = true
  242. Cooldown = tick()
  243.  
  244. if (tick() - Cooldown) >= 1 then
  245. Partied = false
  246. end
  247. end
  248. end)
  249. end)
  250.  
  251. -- Botão para fechar/abrir a Janela
  252. local toggleButton = Instance.new("TextButton")
  253. toggleButton.Parent = screenGui
  254. toggleButton.Size = UDim2.new(0, 100, 0, 40)
  255. toggleButton.Position = UDim2.new(0.5, -50, 0.9, 0)
  256. toggleButton.BackgroundColor3 = Color3.fromRGB(100, 200, 100)
  257. toggleButton.Text = "Fechar"
  258. toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  259. toggleButton.Font = Enum.Font.SourceSansBold
  260. toggleButton.TextSize = 16
  261.  
  262. -- Adicionando Cantos Arredondados no Botão de Toggle
  263. local toggleCorner = Instance.new("UICorner")
  264. toggleCorner.Parent = toggleButton
  265. toggleCorner.CornerRadius = UDim.new(0, 12)
  266.  
  267. -- Função do Botão de Fechar/Abrir
  268. local isVisible = true
  269. toggleButton.MouseButton1Click:Connect(function()
  270. isVisible = not isVisible
  271. mainFrame.Visible = isVisible
  272. toggleButton.Text = isVisible and "Fechar" or "Abrir"
  273. end)
  274.  
  275. -- Variáveis
  276. local player = game.Players.LocalPlayer
  277. local character = player.Character or player.CharacterAdded:Wait()
  278. local proximityDistance = 10 -- Distância máxima para detectar outros jogadores
  279.  
  280. -- Função para detectar jogadores próximos
  281. local function getNearbyPlayers()
  282. local nearbyPlayers = {}
  283. for _, otherPlayer in ipairs(game.Players:GetPlayers()) do
  284. if otherPlayer ~= player and otherPlayer.Character and otherPlayer.Character:FindFirstChild("HumanoidRootPart") then
  285. local distance = (character.HumanoidRootPart.Position - otherPlayer.Character.HumanoidRootPart.Position).Magnitude
  286. if distance <= proximityDistance then
  287. table.insert(nearbyPlayers, otherPlayer)
  288. end
  289. end
  290. end
  291. return nearbyPlayers
  292. end
  293.  
  294. -- Função para spammar a tecla "F"
  295. local function spamKeyF()
  296. while task.wait(0.1) do -- Intervalo de spam (0.1 segundos)
  297. local nearbyPlayers = getNearbyPlayers()
  298. if #nearbyPlayers > 0 then
  299. -- Simula pressionar a tecla "F"
  300. game:GetService("UserInputService"):InputBegan({
  301. KeyCode = Enum.KeyCode.F
  302. }, false)
  303. end
  304. end
  305. end
  306.  
  307. -- Inicia o script
  308. spamKeyF()
Advertisement
Add Comment
Please, Sign In to add comment