local cloneref = cloneref or function(obj) return obj end local Players = cloneref(game:GetService("Players")) local lp = cloneref(Players.LocalPlayer) local function getchar(plr) return (plr or lp).Character end local function gethumanoid(plr) local char = plr and plr:IsA("Model") and plr or getchar(plr) return (char and char:FindFirstChildWhichIsA("Humanoid")),char end local function GetHumanoids() local Humanoids = {} for i,v in Players:GetPlayers() do local Humanoid,char = gethumanoid(v) if char and Humanoid then Humanoids[char] = Humanoid end end return Humanoids end while task.wait() do for _, v in GetHumanoids() do repeat task.wait() until v if v ~= lp then game:GetService("ReplicatedStorage"):WaitForChild("SwordEvent"):FireServer("Damage",v) end end end