--kill all npc local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Workspace = game:GetService("Workspace") local remote = ReplicatedStorage:WaitForChild("dam") local playerChars = {} for _, plr in ipairs(Players:GetPlayers()) do if plr.Character then playerChars[plr.Character] = true end end for _, obj in ipairs(Workspace:GetDescendants()) do if obj:IsA("Humanoid") and obj.Health > 0 then local model = obj.Parent if model and model:IsA("Model") and not playerChars[model] then remote:FireServer(obj, math.huge) end end end --kill all player local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local remote = ReplicatedStorage:WaitForChild("dam") for _, plr in ipairs(Players:GetPlayers()) do if plr ~= Players.LocalPlayer then local char = plr.Character if char then local hum = char:FindFirstChildOfClass("Humanoid") if hum and hum.Health > 0 then remote:FireServer(hum, math.huge) end end end end