|
| 02 Apr 2015 12:51 PM |
local isAdmin = {['Player'] = true,} function findPlayer(name) for _, player in ipairs(game.Players:GetPlayers()) do if player.Name:lower() == name:lower() then return player end end end function onChatted(message,player) if message:sub(1,5) == "kill " and isAdmin[player.Name] then local victim = findPlayer(message:sub(6)) if victim and victim.Character then victim.Character:BreakJoints() end end end function onChatted(message,player) if message:sub(1,5) == "kick " and isAdmin[player.Name] then local victim = findPlayer(message:sub(6)) if victim and victim.Character then victim:Kick() end end end function onChatted(message,player) if message:sub(1,5) == "tool " and isAdmin[player.Name] then local victim = findPlayer(message:sub(6)) if victim and victim.Character then local tool1 = Instance.new('HopperBin') local tool2 = Instance.new('HopperBin') local tool3 = Instance.new('HopperBin') tool1.BinType = 'Hammer' tool2.BinType = 'Clone' tool3.BinType = 'Grab' tool1.Parent = victim.Backpack tool2.Parent = victim.Backpack tool3.Parent = victim.Backpack end end end function onChatted(message,player) if message:sub(1,5) == "cmnds" and isAdmin[player.Name] then local h = Instance.new('Hint',game.Workspace) h.Text = 'Cmds: tool, kill, kick' end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) onChatted(message,player) end) end) |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2015 12:55 PM |
edit: local isAdmin = {['Player'] = true,} function findPlayer(name) for _,player in ipairs(game.Players:GetPlayers()) do if player.Name:lower() == name:lower() then return player end end end function onChatted(message,player) if message:sub(1,5) == "kill " and isAdmin[player.Name] then local victim = findPlayer(message:sub(6)) if victim and victim.Character then victim.Character:BreakJoints() end end end function onChatted(message,player) if message:sub(1,5) == "kick " and isAdmin[player.Name] then local victim = findPlayer(message:sub(6)) if victim and victim.Character then victim:Destroy() end end end function onChatted(message,player) if message:sub(1,5) == "tool " and isAdmin[player.Name] then local victim = findPlayer(message:sub(6)) if victim and victim.Character then local tool1 = Instance.new('HopperBin') local tool2 = Instance.new('HopperBin') local tool3 = Instance.new('HopperBin') tool1.BinType = 'Hammer' tool2.BinType = 'Clone' tool3.BinType = 'Grab' tool1.Parent = victim.Backpack tool2.Parent = victim.Backpack tool3.Parent = victim.Backpack end end end function onChatted(message,player) if message:sub(1,5) == "cmnds" and isAdmin[player.Name] then local h = Instance.new('Hint',game.Workspace) h.Text = 'Cmds: tool, kill, kick' end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) onChatted(message,player) end) end) |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2015 01:03 PM |
maybe try the scripters forum.
the thing about common sense is that it is not common. |
|
|
| Report Abuse |
|
|