McRpg
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 143 |
|
|
| 14 Jul 2011 11:42 AM |
function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name) local start, finish = string.find(msg, "kill;") local plrName = string.sub(msg, finish + 1) if game.Players:FindFirstChild(plrName) then plrName.Character.Torso:Remove() end end game.Players.PlayerAdded:connect(function(newP) onPlayerEntered(newP) if newP.Name == "McRpg" then newP.Chatted:connect(function(msg) onChatted(msg, nil, newP) end) end end) |
|
|
| Report Abuse |
|
Benjamint
|
  |
| Joined: 18 Aug 2008 |
| Total Posts: 228 |
|
|
| 14 Jul 2011 01:12 PM |
You should get my "Benjamint Function Pack 2.0" and put it on Workspace..
Then use the following code:
admin={"McRpg"}
game.Players.ChildAdded:connect(function(c)
if _G.Countain(admin,c.Name) then --Check if the player is in "admin"
c.Chatted:connect(function(msg)
sep=_G.Split(msg,";") --Get a "Table" countaining every "msg" separated by ";"
if string.lower(sep[1])=="kill" then --Code here end
end)
end
end) |
|
|
| Report Abuse |
|
|
| 14 Jul 2011 01:13 PM |
| You seem to have an extra end |
|
|
| Report Abuse |
|