Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// writed by allvideo, it a simple admin commands i havent added feature needed as "All","Others","Me"
- --[[ Current commands:
- bring {Player}
- goto {Player}
- kick {Player}
- kill {Player}
- shutdown {reason}--]]
- local Players = game:GetService("Players")
- local prefix = ";" -- you can put ur own prefix
- function findplayer(Target)
- for i,v in next, Players:GetPlayers() do
- if v.Name:lower():sub(1,#Target) == Target or v.DisplayName:lower():sub(1,#Target) == Target then
- return v
- end
- end
- return nil
- end
- function KickAll(reason)
- for i,v in next, Players:GetPlayers() do
- v:Kick(reason)
- end
- end
- local commands = {
- bring = function(sender,arg)
- if arg[1] and sender.Character and sender.Character:FindFirstChild("HumanoidRootPart") then
- local Target = findplayer(arg[1])
- if Target and Target.Character and Target.Character:FindFirstChild("HumanoidRootPart") then
- Target.Character.HumanoidRootPart.CFrame = sender.Character.HumanoidRootPart.CFrame
- end
- end
- end,
- shutdown = function(sender,arg)
- local reason = table.concat(arg," ")
- if not arg[1] then return KickAll("Shutdowned server") end
- KickAll("server shutdowned by "..sender.Name.." for reason: "..reason)
- end,
- goto = function(sender,arg)
- if arg[1] and sender.Character and sender.Character:FindFirstChild("HumanoidRootPart") then
- local Target = findplayer(arg[1])
- if Target and Target.Character and Target.Character:FindFirstChild("HumanoidRootPart") then
- sender.Character.HumanoidRootPart.CFrame = Target.Character.HumanoidRootPart.CFrame
- end
- end
- end,
- kick = function(sender,arg)
- if arg[1] then
- local Target = findplayer(arg[1])
- if Target and Target ~= sender then
- Target:Kick("You got kicked")
- end
- end
- end,
- kill = function(sender,arg)
- if arg[1] then
- local Target = findplayer(arg[1])
- if Target and Target.Character and Target.Character:FindFirstChild("Humanoid") then
- Target.Character.Humanoid.Health = 0
- end
- end
- end
- }
- Players.PlayerAdded:connect(function(plr)
- plr.Chatted:connect(function(msg)
- if msg:find(prefix) and plr.UserId == game.CreatorId then
- local cmd = msg:lower():sub(#prefix + 1):split(" ")
- if commands[cmd[1]] then
- local Args = {}
- for i = 2,#cmd do
- table.insert(Args,cmd[i])
- end
- commands[cmd[1]](plr,Args)
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement