Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Admins = {["366915725"] = true}
- local prefix = (";")
- local commandTable = {}
- function findPlayer(name)
- for _, player in ipairs(game.Players:GetPlayers()) do
- if player.Name:lower() == name:lower() then
- return player
- end
- end
- end
- -- Reset command.
- function commandTable.reset(message, player)
- player.Character:BreakJoints()
- end
- -- Rejoin command
- function commandTable.rejoin(message, player)
- game:GetService("TeleportService"):Teleport(game.PlaceId, player)
- if player.Character ~= nil then
- player.Character:remove()
- end
- end
- -- Kill command
- function commandTable.kill(message, player)
- victim = findPlayer(message)
- if victim and victim.Character then
- victim.Character:BreakJoints()
- end
- end
- -- Kick command
- function commandTable.kick(message, player)
- victim = findPlayer(message)
- if victim and victim.Character then
- victim:Kick("[Kick]: "..player.Name.." has kicked you from the game!")
- end
- end
- game.Players.PlayerAdded:Connect(function(player)
- if Admins[tostring(player.UserId)] then
- player.Chatted:Connect(function(message)
- local command, argument = message:match(prefix.."(.+) (.+)")
- if command and commandTable[command] then
- commandTable[command](argument, player)
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement