Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- this admin script was made by 11robot3000 do not take credit
- 11robot admin commands work in progress V0.5 ALPHA
- 11robot admin commands 1ad for short is constantly being developed
- check my youtube for updates now and then
- dont touch anything below here other than to put you name in the admin there can only be one name right now
- --]]
- function ehandler(err)--this function debugs the message function and other future functions
- warn("error handler running!!!!!")--expect this alot
- if err == nil then return true else return false--first it checks if the error is nil if it is it will return true and will set the return to true but this may cause other issues it will return false if it was falsely called
- end
- if err == "exception" then print("player non existant exception") return "continue" end
- if err == "STOP" then warn("fatal error script disabled!") error() end
- end
- function message(text, retrn)--this is what displays messages the first argument is the message and the second is whether or not to jump back to where the script was when this function was called
- m = Instance.new("Message", workspace)
- m.Text = "nil"
- wait(0.1)
- m.Text = text
- wait(3)
- i = 1
- while i == 1 do--this ensures ALL duplicant messages are deleted
- messiii = game.workspace:FindFirstChild("Message")
- if messiii == nil and retrn == true then return else local fix = ehandler(nil) end
- if fix == true then return end
- wait(0.5)
- if messiii == nil and retrn == false then print("error handler failed!") wait(3) ehandler("STOP") end
- if messiii == nil then return end--multi filter just in case
- --[[this is for emergencies]] if messiii == nil then print("error handler failed!") wait(3) ehandler("STOP") end
- messiii:Destroy()
- end
- end
- --------------------------------------------------------------------------------------------------------------------------
- message("11robot admin script loaded!", true)
- wait(5)
- message("the prefix is /")
- function run()
- admins = {"WinslowMau"}
- wait(1)
- local admcheck = game.workspace:FindFirstChild(admins[1])
- if admcheck == nil then ehandler("STOP")
- end
- prefix = "/" --this prefix only applies to server commands player commands will be cmd/playerhere
- if game.Players.LocalPlayer.Name ~= admins[1] then
- message("you are not an admin!")
- script.Disabled = true
- end
- while true do
- wait(3)
- game.Players.LocalPlayer.Chatted:connect(function(msg) -- checks when the player chats and bounces the message to the if's below
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 5) == "kill/" then
- local target = string.sub(msg, 6) --checks for the second argument of type Player
- local plr = game.workspace:FindFirstChild(target)
- if plr == nil then
- message("player does not exist!")
- end
- plr.Humanoid.Health = 0
- end
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if msg == prefix .. "night" then
- local nme = game.Players.LocalPlayer.Name
- local plr = game.workspace:FindFirstChild(nme)
- game.Lighting.TimeOfDay = 0
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if msg == prefix .. "day" then
- local nme = game.Players.LocalPlayer.Name
- local plr = game.workspace:FindFirstChild(nme)
- game.Lighting.TimeOfDay = 12
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 4) == "msg/" then
- local target = string.sub(msg, 5)
- message(target)
- end
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 5) == "goto/" then
- local target = string.sub(msg, 6)
- local nme = game.Players.LocalPlayer.Name
- local lclplr = game.workspace:FindFirstChild(nme)
- local plr = game.workspace:FindFirstChild(target)
- lclplr.Torso.CFrame = plr.Torso.CFrame
- if plr == nil then
- message("player does not exist")
- else
- lclplr.Torso.CFrame = plr.Torso.CFrame
- end
- end
- end
- end)
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 7) == "freeze/" then
- local target = string.sub(msg, 8)
- local plr = game.workspace:FindFirstChild(target)
- if plr == nil then
- message("player does not exist!")
- end
- plr.Torso.Anchored = true
- end
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 15) == "clearworkspace/" then
- message("are you sure?, if you are please re enter that with your secret code", true)
- if string.sub(msg, 16) == "170401" then
- message("identity confirmed, 11robot3000", true)
- game.workspace:ClearAllChildren()--[[
- this admin script was made by 11robot3000
- do not take credit
- --]]
- function message(text, retrn)
- m = Instance.new("Message", workspace)
- m.Text = text
- wait(3)
- i = 1
- while i == 1 do
- mess = game.workspace:FindFirstChild("Message")
- wait(0.5)
- if mess == nil then
- return
- end
- mess:Destroy()
- m:Destroy()
- end
- end
- --------------------------------------------------------------------------------------------------------------------------
- message("11robot admin script loaded!", true)
- wait(2)
- message("the prefix is /")
- function run()
- admins = {"11robot3000"}
- admins2 = {}
- prefix = "/" --this prefix only applies to server commands player commands will be cmd/playerhere
- if game.Players.LocalPlayer.Name ~= admins[1] then
- print("busy")
- message("you are not an admin!")
- script.Disabled = true
- end
- while true do
- wait(3)
- print("admin starting")
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 5) == "kill/" then
- local target = string.sub(msg, 6)
- local plr = game.workspace:FindFirstChild(target)
- if plr == nil then
- message("player does not exist!")
- end
- plr.Humanoid.Health = 0
- end
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if msg == prefix .. "night" then
- local nme = game.Players.LocalPlayer.Name
- local plr = game.workspace:FindFirstChild(nme)
- game.Lighting.TimeOfDay = 0
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if msg == prefix .. "day" then
- local nme = game.Players.LocalPlayer.Name
- local plr = game.workspace:FindFirstChild(nme)
- game.Lighting.TimeOfDay = 12
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 4) == "msg/" then
- local target = string.sub(msg, 5)
- message(target)
- end
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 5) == "goto/" then
- local target = string.sub(msg, 6)
- local nme = game.Players.LocalPlayer.Name
- local lclplr = game.workspace:FindFirstChild(nme)
- local plr = game.workspace:FindFirstChild(target)
- lclplr.Torso.CFrame = plr.Torso.CFrame
- if plr == nil then
- message("player does not exist")
- else
- lclplr.Torso.CFrame = plr.Torso.CFrame
- end
- end
- end
- end)
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 7) == "freeze/" then
- local target = string.sub(msg, 8)
- local plr = game.workspace:FindFirstChild(target)
- if plr == nil then
- message("player does not exist!")
- end
- plr.Torso.Anchored = true
- end
- end
- if game.Players.LocalPlayer.Name == admins[1] then--this cmd is most complicated to clear the workspace you have to enter the code which can be found below
- if string.sub(msg, 1, 15) == "clearworkspace/" then
- if string.sub(msg, 16) == 170401 then--<--<-RIGHT HERE!
- message("identity confirmed, 11robot3000", true)
- wait(18)
- game.workspace:ClearAllChildren()
- run()
- if string.sub(msg, 16) ~= 170401 then
- message("are you sure?, if you are please re enter that with your secret code", true)
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 3) == "ff/" then
- local target = string.sub(msg, 4)
- local plr = game.workspace:FindFirstChild(target)
- if plr == nil then
- message("player does not exist!")
- end
- ff = Instance.new("ForceField")
- ff.Parent = plr
- end
- if game.Players.LocalPlayer.Name == admins[1] then
- if string.sub(msg, 1, 5) == "unff/" then
- local target = string.sub(msg, 6)
- local plr = game.workspace:FindFirstChild(target)
- if plr == nil then
- message("player does not exist!")
- ehandler("exception")
- end
- ff:Destroy()
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end)
- end
- end
- run()
- end
- end
- end
- end
- end
- end
- end)
- end
- end
- run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement