local plr = game:GetService("Players").LocalPlayer local rs = game:GetService("ReplicatedStorage") local char = plr.Character or plr.CharacterAdded:Wait() local root = char:WaitForChild("HumanoidRootPart") local r = rs:WaitForChild("remotes") local onhit, swing = r.onHit, r.swing local range, dmg, idk, delay = 250, 100, 1, 1 while task.wait(delay) do if not root.Parent then char = plr.Character or plr.CharacterAdded:Wait() root = char:WaitForChild("HumanoidRootPart") end swing:FireServer() for _, m in ipairs(workspace:GetChildren()) do local hum = m:IsA("Model") and m:FindFirstChildOfClass("Humanoid") local hrp = hum and m:FindFirstChild("HumanoidRootPart") if hum and hrp and hum.Health > 0 and (root.Position - hrp.Position).Magnitude <= range then onhit:FireServer(hum, dmg, {}, idk) end end end while true do task.wait() game:GetService("ReplicatedStorage"):WaitForChild("remotes"):WaitForChild("swing"):FireServer() end