admin = {"TheNewScripter"}
function find(name, speaker, msg)
chars = {}
text = msg
ppl = 0
local x = game.Players:GetChildren()
for i = 1, #x do
table.insert(chars, x[i])
if string.sub(string.lower(msg), 1, string.len(msg)) == string.sub(x[i], 1, string.len(msg)) then
ppl = ppl + 1
if not ppl > 1 then
return chars
end
end
end
end
function chat(msg, speaker)
if string.sub(msg, 1, 5) == "kill/" then
local plyr = find(string.sub(msg, 6), speaker, msg)
if plyr ~= nil then
plyr.Character.Humanoid.Health = 0
end
end
end
function join(player)
for i, v in pairs(admin) do
if player.Name == v then
player.Chatted:connect(function(player) chat(player, msg) end )
end
end
end
No output... Idk why it won't work... Help |