getgenv().AutoSwing = true local players = game:GetService("Players") local runService = game:GetService("RunService") local lp = players.LocalPlayer if getgenv().AutoSwingConnection then getgenv().AutoSwingConnection:Disconnect() getgenv().AutoSwingConnection = nil end local function fetchRemote() local pGui = lp:FindFirstChild("PlayerGui") local mGui = pGui and pGui:FindFirstChild("MainGui") if not mGui then return nil end for _, v in ipairs(mGui:GetChildren()) do if v:IsA("RemoteEvent") and v.Name:match("^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$") then return v end end return nil end local targetRemote = fetchRemote() local seq = 0 if getgenv().AutoSwing then getgenv().AutoSwingConnection = runService.RenderStepped:Connect(function() if not getgenv().AutoSwing then if getgenv().AutoSwingConnection then getgenv().AutoSwingConnection:Disconnect() getgenv().AutoSwingConnection = nil end return end if not targetRemote or not targetRemote.Parent then targetRemote = fetchRemote() end if targetRemote then local ok = pcall(targetRemote.FireServer, targetRemote, "SwordSlash", seq) if ok then seq = seq + 1 end end end) end