It does everything but kill the player. I want it so that you don't need to type the full name of a player, but obviously I have failed.
players = game:GetService("Players")
admins = {["Player"] = true ; }
players.PlayerAdded:connect(function(newPlayer)
if admins[newPlayer.Name] then
newPlayer.Chatted:connect(function(msg, speaker)
if string.sub (msg, 1, 6) == ":kill " then
for _,v in pairs (players:GetPlayers()) do
if v.Name:match(string.lower(msg, 6, string.len(msg))) then
v.Character.Humanoid.Health = 0
end
end
end
end)
end
end)
