Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Criação de uma ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "AutoParryGui"
- screenGui.ResetOnSpawn = false -- Isso impede que a GUI seja removida quando o jogador respawnar
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Criação da Janela Principal
- local mainFrame = Instance.new("Frame")
- mainFrame.Parent = screenGui
- mainFrame.Size = UDim2.new(0, 250, 0, 150)
- mainFrame.Position = UDim2.new(0.5, -125, 0.5, -75)
- mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- mainFrame.BorderSizePixel = 0
- mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- mainFrame.Visible = true
- -- Adicionando Cantos Arredondados
- local uiCorner = Instance.new("UICorner")
- uiCorner.Parent = mainFrame
- uiCorner.CornerRadius = UDim.new(0, 12)
- -- Título da Janela
- local titleLabel = Instance.new("TextLabel")
- titleLabel.Parent = mainFrame
- titleLabel.Size = UDim2.new(1, 0, 0, 30)
- titleLabel.Position = UDim2.new(0, 0, 0, 0)
- titleLabel.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- titleLabel.Text = "Auto Parry Script - by darker9899"
- titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- titleLabel.Font = Enum.Font.SourceSansBold
- titleLabel.TextSize = 16
- -- Adicionando Cantos Arredondados no Título
- local titleCorner = Instance.new("UICorner")
- titleCorner.Parent = titleLabel
- titleCorner.CornerRadius = UDim.new(0, 12)
- -- Botão de Auto Parry
- local autoParryButton = Instance.new("TextButton")
- autoParryButton.Parent = mainFrame
- autoParryButton.Size = UDim2.new(0.8, 0, 0, 40)
- autoParryButton.Position = UDim2.new(0.1, 0, 0.4, 0)
- autoParryButton.BackgroundColor3 = Color3.fromRGB(60, 120, 220)
- autoParryButton.Text = "Ativar Auto Parry"
- autoParryButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- autoParryButton.Font = Enum.Font.SourceSansBold
- autoParryButton.TextSize = 16
- -- Adicionando Cantos Arredondados no Botão
- local buttonCorner = Instance.new("UICorner")
- buttonCorner.Parent = autoParryButton
- buttonCorner.CornerRadius = UDim.new(0, 12)
- -- Função do Botão Auto Parry
- autoParryButton.MouseButton1Click:Connect(function()
- print("Auto Parry ativado!") local RunService = game:GetService("RunService") or game:FindFirstDescendant("RunService")
- local Players = game:GetService("Players") or game:FindFirstDescendant("Players")
- local VirtualInputManager = game:GetService("VirtualInputManager") or game:FindFirstDescendant("VirtualInputManager")
- local Player = Players.LocalPlayer
- local Cooldown = tick()
- local IsParried = false
- local Connection = nil
- local function GetBall()
- for _, Ball in ipairs(workspace.Balls:GetChildren()) do
- if Ball:GetAttribute("realBall") then
- return Ball
- end
- end
- end
- local function ResetConnection()
- if Connection then
- Connection:Disconnect()
- Connection = nil
- end
- end
- workspace.Balls.ChildAdded:Connect(function()
- local Ball = GetBall()
- if not Ball then return end
- ResetConnection()
- Connection = Ball:GetAttributeChangedSignal("target"):Connect(function()
- Parried = false
- end)
- end)
- RunService.PreSimulation:Connect(function()
- local Ball, HRP = GetBall(), Player.Character.HumanoidRootPart
- if not Ball or not HRP then
- return
- end
- local Speed = Ball.zoomies.VectorVelocity.Magnitude
- local Distance = (HRP.Position - Ball.Position).Magnitude
- if Ball:GetAttribute("target") == Player.Name and not Parried and Distance / Speed <= 0.80 then
- VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0)
- Parried = true
- Cooldown = tick()
- if (tick() - Cooldown) >= 0 then
- Partied = false
- end
- end
- end)
- end)
- -- Botão para fechar/abrir a Janela
- local toggleButton = Instance.new("TextButton")
- toggleButton.Parent = screenGui
- toggleButton.Size = UDim2.new(0, 100, 0, 40)
- toggleButton.Position = UDim2.new(0.5, -50, 0.9, 0)
- toggleButton.BackgroundColor3 = Color3.fromRGB(100, 200, 100)
- toggleButton.Text = "Fechar"
- toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- toggleButton.Font = Enum.Font.SourceSansBold
- toggleButton.TextSize = 16
- -- Adicionando Cantos Arredondados no Botão de Toggle
- local toggleCorner = Instance.new("UICorner")
- toggleCorner.Parent = toggleButton
- toggleCorner.CornerRadius = UDim.new(0, 12)
- -- Função do Botão de Fechar/Abrir
- local isVisible = true
- toggleButton.MouseButton1Click:Connect(function()
- isVisible = not isVisible
- mainFrame.Visible = isVisible
- toggleButton.Text = isVisible and "Fechar" or "Abrir"
- end)
- -- Garantir que a GUI persista após a morte
- local player = game.Players.LocalPlayer
- player.CharacterAdded:Connect(function()
- screenGui.Parent = player:WaitForChild("PlayerGui")
- end)
Advertisement
Add Comment
Please, Sign In to add comment