Elisonpp

Blade ball by darker 9899

Jan 15th, 2025
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 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.80 then
  100. VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0)
  101. Parried = true
  102. Cooldown = tick()
  103.  
  104. if (tick() - Cooldown) >= 0 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)
Advertisement
Add Comment
Please, Sign In to add comment