local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local RunService = game:GetService("RunService") local spamActive = false local spamDelay = 0.01 local spamLoop local ScreenGui = Instance.new("ScreenGui") ScreenGui.Parent = PlayerGui local Button = Instance.new("TextButton") Button.Size = UDim2.new(0, 100, 0, 50) Button.Position = UDim2.new(0.5, -50, 0.8, 0) Button.BackgroundColor3 = Color3.fromRGB(0,0,0) Button.TextColor3 = Color3.fromRGB(255,255,255) Button.Text = "Auto Punch" Button.Parent = ScreenGui Button.ZIndex = 10 Button.Active = true Button.Draggable = true -- Permite drag no mobile local function getClosestPlayer() local Character = LocalPlayer.Character if not Character then return nil end local RootPart = Character:FindFirstChild("HumanoidRootPart") if not RootPart then return nil end local closestPlayer = nil local shortestDistance = math.huge for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then local distance = (RootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude if distance < shortestDistance then shortestDistance = distance closestPlayer = player end end end return closestPlayer end local function spamPunch() local targetPlayer = getClosestPlayer() if targetPlayer and targetPlayer.Character then local targetLeg = targetPlayer.Character:FindFirstChild("RightLowerLeg") if targetLeg then local args = { 1, targetPlayer.Character, 282, targetLeg } ReplicatedStorage:WaitForChild("MainEvents"):WaitForChild("PUNCHEVENT"):FireServer(unpack(args)) end end end local function startSpam() if spamLoop then return end -- evita múltiplos loops spamLoop = RunService.Heartbeat:Connect(function() if spamActive then spamPunch() wait(spamDelay) end end) end Button.MouseButton1Click:Connect(function() spamActive = not spamActive Button.Text = spamActive and "Auto Punch ✅" or "Auto Punch" if spamActive then startSpam() end end) local function stopSpam() if spamLoop then spamLoop:Disconnect() spamLoop = nil end end RunService.Heartbeat:Connect(function() if not spamActive then stopSpam() end end)