Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Admins = {
- ["testingism"] = 3,
- ["simquan"] = 3,
- ["simhwuibro"] = 3
- }
- local Levels = {
- [0] = {"Peasant", BrickColor.new("Medium stone grey")};
- [1] = {"Knight", BrickColor.new("Bright red")};
- [2] = {"Lord", BrickColor.new("Navy blue")};
- [3] = {"King", BrickColor.new("Really black")}
- }
- Players = Game:GetService("Players")
- Workspace = Game:GetService("Workspace")
- Debris = Game:GetService("Debris")
- Lighting = Game:GetService("Lighting")
- Teams = Game:GetService("Teams")
- MR = math.rad
- MD = math.deg
- IPStore = {}
- IPBans = {}
- Banned = {"funcrazyawesomeman"}
- PrivateServer = {}
- PrivateServerWarnings = {}
- function IncommingConnection(IPAddress, Replicator)
- local IP = IPAddress:sub(1, IPAddress:find(":")-1)
- local ThePlayer
- Players.PlayerAdded:connect(function(NewPlayer)
- if not ThePlayer then
- ThePlayer = NewPlayer
- end
- end)
- repeat wait() until ThePlayer
- IPStore[ThePlayer.Name] = IP
- for i=1, #IPBans do
- if IPBans[i] == IP then
- ThePlayer:Remove()
- end
- end
- end
- function Round(Number, ToWhatExtent)
- if ToWhatExtent then
- return math.floor(Number/ToWhatExtent+0.5)*ToWhatExtent
- else
- return math.floor(Number + 0.5)
- end
- end
- Settings = {
- Color = BrickColor.new("Really black"),
- Name = "Gamzie's Command Books",
- Version = "1.0 Beta"
- }
- function ShowInCircle(Prompter,...)
- local Args = {...}
- local Books = {}
- Args[#Args + 1] = "Dismiss."
- local Ans = nil
- local Rank = Admins[Prompter.Name]
- for i=1, #Args do
- local IsKings
- if Args[i]:find("(Kings Only)") then
- IsKings = true
- end
- local Book = Instance.new("Part", Game:GetService("Workspace"))
- Book.Anchored = false
- Book.Locked = true
- Book.CanCollide = false
- Book.TopSurface, Book.BottomSurface = 0, 0
- Book.Transparency = 0.5
- Book.FormFactor = Enum.FormFactor.Custom
- Book.Size = Vector3.new(2.3, 1, 3)
- if IsKings and Admins[Prompter.Name] < 3 then
- Book.BrickColor = BrickColor.new("Really black")
- else
- Book.BrickColor = Settings.Color
- end
- table.insert(Books, Book)
- local Mesh = Instance.new("SpecialMesh", Book)
- Mesh.MeshId = "http://www.roblox.com/asset/?id=1136139"
- Mesh.MeshType = "FileMesh"
- local BG = Instance.new("BodyGyro", Book)
- local BP = Instance.new("BodyPosition", Book)
- if (IsKings and Admins[Prompter.Name] == 3) or not IsKings then
- local Fire = Instance.new("Fire", Book)
- Fire.Heat = 0
- Fire.Color = Settings.Color.Color
- Fire.SecondaryColor = Settings.Color.Color
- end
- local Billboard = Instance.new("BillboardGui", Book)
- Billboard.Adornee = Book
- Billboard.Enabled = true
- Billboard.Active = true
- Billboard.Size = UDim2.new(0.3, 0, 0.05, 0)
- Billboard.ExtentsOffset = Vector3.new(0, 2.5, 0)
- local Text = Instance.new("TextLabel", Billboard)
- Text.Text = Args[i]
- if IsKings and Admins[Prompter.Name] ~= 3 then
- Text.TextColor3 = BrickColor.new("Really black").Color
- else
- Text.TextColor3 = Settings.Color.Color
- end
- Text.BackgroundTransparency = 1
- Text.Size = UDim2.new(1, 0, 1, 0)
- local ClickDetector = Instance.new("ClickDetector", Book)
- ClickDetector.MouseClick:connect(function(Player)
- if Player == Prompter and Args[i] == "Dismiss." then
- Ans = Args[i]
- for _, v in pairs(Books) do
- v:Remove()
- end
- Books = {}
- end
- end)
- end
- coroutine.resume(coroutine.create(function()
- local radius = 3 + (#Books*.7)
- while wait() do
- if #Books == 0 then break end
- for _, Book in pairs(Books) do
- local BP = Book:FindFirstChild("BodyPosition") or Instance.new("BodyPosition", Book)
- BP.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
- local BG = Book:FindFirstChild("BodyGyro") or Instance.new("BodyGyro", Book)
- BG.maxTorque = Vector3.new(1000000000, 1000000000, 1000000000)
- local Pos = (Prompter.Character:FindFirstChild("Torso") or Prompter.Character:FindFirstChild("Torso")).CFrame
- local x = math.cos((tonumber(_)/#Books - (0.5/#Books)) * math.pi*2) * radius -- cos
- local y = 0
- local z = math.sin((tonumber(_)/#Books - (0.5/#Books)) * math.pi*2) * radius -- sin
- BP.position = Pos:toWorldSpace(CFrame.new(x,y,z):inverse()).p
- BG.cframe = CFrame.new(Book.Position, Pos.p) * CFrame.Angles(math.pi/2, 0, 0)
- end
- end
- end))
- end
- function Prompt(Prompter, ...)
- local Args = {...}
- local Books = {}
- Args[#Args + 1] = "Dismiss."
- local Ans = nil
- for i=1, #Args do
- local Book = Instance.new("Part", Game:GetService("Workspace"))
- Book.Anchored = false
- Book.Locked = true
- Book.CanCollide = false
- Book.TopSurface, Book.BottomSurface = 0, 0
- Book.Transparency = 0.5
- Book.FormFactor = Enum.FormFactor.Custom
- Book.Size = Vector3.new(2.3, 1, 3)
- Book.BrickColor = Settings.Color
- table.insert(Books, Book)
- local Mesh = Instance.new("SpecialMesh", Book)
- Mesh.MeshId = "http://www.roblox.com/asset/?id=1136139"
- Mesh.MeshType = "FileMesh"
- local Fire = Instance.new("Fire", Book)
- Fire.Heat = 0
- Fire.Color = Settings.Color.Color
- Fire.SecondaryColor = Settings.Color.Color
- local Billboard = Instance.new("BillboardGui", Book)
- Billboard.Adornee = Book
- Billboard.Enabled = true
- Billboard.Active = true
- Billboard.Size = UDim2.new(0.3, 0, 0.05, 0)
- Billboard.ExtentsOffset = Vector3.new(0, 2.5, 0)
- local Text = Instance.new("TextLabel", Billboard)
- Text.Text = Args[i]
- Text.TextColor3 = Settings.Color.Color
- Text.BackgroundTransparency = 1
- Text.Size = UDim2.new(1, 0, 1, 0)
- local AttemptToFixPrompt = i
- local ClickDetector = Instance.new("ClickDetector", Book)
- ClickDetector.MouseClick:connect(function(Player)
- if Player == Prompter then
- Ans = Args[i]
- local BackupBooks = Books
- Books = {}
- local AnimationOver
- pcall(function() BP.Position = Player.Character.Torso.Position end)
- Book.Touched:connect(function(zPart)
- pcall(function()
- if zPart == Player.Character.Torso then
- AnimationOver = true
- end
- end)
- end)
- delay(5, function() AnimationOver = true end)
- for _, v in pairs(BackupBooks) do
- v:Remove()
- end
- BackupBooks = nil
- return AttemptToFixPrompt
- end
- end)
- end
- coroutine.resume(coroutine.create(function()
- local radius = 3 + (#Books)
- while wait() do
- if #Books == 0 then break end
- for _, Book in pairs(Books) do
- local BP = Book:FindFirstChild("BodyPosition") or Instance.new("BodyPosition", Book)
- BP.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
- local BG = Book:FindFirstChild("BodyGyro") or Instance.new("BodyGyro", Book)
- BG.maxTorque = Vector3.new(1000000000, 1000000000, 1000000000)
- local Pos = (Prompter.Character:FindFirstChild("Torso") or Prompter.Character:FindFirstChild("Torso")).CFrame
- local x = math.cos((tonumber(_)/#Books - (0.5/#Books)) * math.pi) * radius -- cos
- local y = 0
- local z = math.sin((tonumber(_)/#Books - (0.5/#Books)) * math.pi) * radius -- sin
- BP.position = Pos:toWorldSpace(CFrame.new(x,y,z):inverse()).p
- BG.cframe = CFrame.new(Book.Position, Pos.p) * CFrame.Angles(math.pi/2, 0, 0)
- end
- end
- end))
- while (Ans == nil) and (#Books > 0) do
- wait()
- end
- return Ans
- end
- function ParseMessage(Message)
- Message = Message:gsub("lego%s", "")
- Message = Message:gsub("runescape%s", "")
- Message = Message:gsub("minecraft%s", "")
- local Command
- local Args = {}
- for Word in Message:gmatch("%w+") do
- if not Command then
- Command = Word
- else
- table.insert(Args, Word)
- end
- end
- return Command, Args
- end
- function ErrorHandler(Error)
- print(Error)
- local Message = Instance.new("Message", Workspace)
- Message.Text = "!ERROR!: " .. Error:gsub("(.-:)","")
- Game:GetService("Debris"):AddItem(Message, 5)
- end
- function onPlayerAdded(NewPlayer)
- for b=1, #Banned do
- if NewPlayer.Name == Banned[b] then
- coroutine.resume(coroutine.create(function()
- for i=1, 25 do
- pcall(function() NewPlayer:Destroy() end)
- wait(0.5)
- end
- end))
- end
- end
- NewPlayer.Chatted:connect(function(C)
- xpcall(function()
- local a, b = coroutine.resume(coroutine.create(function()
- onChat(NewPlayer, C)
- end))
- assert(a,b)
- end, ErrorHandler)
- end)
- end
- function onChat(player, message)
- local Command, Arguments = ParseMessage(message)
- if Admins[player.Name] ~= nil then
- if Command == "kickmenu" then
- local People = Game:GetService("Players"):GetPlayers()
- local Names = {}
- for _, v in pairs(People) do
- table.insert(Names, v.Name)
- end
- local OptionChoosen = Prompt(player, unpack(Names))
- print(OptionChoosen)
- if OptionChoosen and game:GetService("Players"):FindFirstChild(OptionChoosen) then
- game:GetService("Players") [OptionChoosen]:Destroy()
- else
- print("Player missing")
- end
- elseif Command == "banmenu" then
- local People = Game:GetService("Players"):GetPlayers()
- local Names = {}
- for _, v in pairs(People) do
- table.insert(Names, v.Name)
- end
- local OptionChoosen = Prompt(player, unpack(Names))
- print(OptionChoosen)
- if OptionChoosen and game:GetService("Players"):FindFirstChild(OptionChoosen) then
- table.insert(Banned, OptionChoosen)
- game:GetService("Players") [OptionChoosen]:Destroy()
- else
- print("Player missing")
- end
- elseif Command == "cleanup" then
- for _, v in pairs(Workspace:GetChildren()) do
- if Players:GetPlayerFromCharacter(v) == nil and v.className ~= "Terrain" and v~=script then
- pcall(function() v:Remove() end)
- end
- end
- local Base = Instance.new("Part", Workspace)
- Base.Anchored = true
- Base.TopSurface = Enum.SurfaceType.Smooth
- Base.BottomSurface = Enum.SurfaceType.Smooth
- Base.FormFactor = Enum.FormFactor.Symmetric
- Base.BrickColor = BrickColor.new("Earth green")
- Base.Size = Vector3.new(1000, 1, 1000)
- Base.Name = "Base"
- Base.CFrame = CFrame.new(Vector3.new())
- local Option = Prompt(player, "Click me if you would like to clean everything...")
- if Option == "Click me if you would like to clean everything..." then
- pcall(function() Lighting:ClearAllChildren() end)
- pcall(function() Teams:ClearAllChildren() end)
- pcall(function() table.foreach(Players:GetPlayers(), function(_, v) v.Neutral = true end) end)
- end
- local Option = Prompt(player, "Click me if you would like to respawn players...")
- if Option == "Click me if you would like to respawn players..." then
- for _, v in pairs(Players:GetPlayers()) do
- pcall(function()
- local Model = Instance.new("Model", Workspace)
- Instance.new("Humanoid", Model)
- v.Character = Model
- end)
- end
- end
- elseif Command == "shutdown" then
- local InitTime = time()
- while wait() do
- pcall(function()
- Players:ClearAllChildren()
- end)
- pcall(function()
- if #Players:GetPlayers() >= 1 or InitTime + 30 < time() then
- Instance.new("ManualSurfaceJointInstance", Workspace)
- end
- end)
- end
- elseif Command == "kick" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():match(Arg:lower()) then
- pcall(function() Player:Destroy() end)
- end
- end
- end
- elseif Command == "commands1" then
- ShowInCircle(player,
- "banmenu", "kickmenu", "killmenu", "antiban", "cleanup"
- )
- elseif Command == "commands2" then
- ShowInCircle(player,
- "kick", "kill", "ff", "unff", "nbc", "bc", "tbc", "obc", "shutdown"
- )
- elseif Command == "commandsALL" then
- ShowInCircle(player,
- "banmenu", "kickmenu", "killmenu", "antiban", "cleanup", "kick", "kill", "ff", "unff", "nbc", "bc", "tbc", "obc", "shutdown"
- )
- elseif Command == "antiban" then
- local PeopleNames = {}
- for _, v in pairs(Game:GetService("Players"):GetPlayers()) do
- table.insert(PeopleNames, v.Name)
- end
- local Option = Prompt(player, unpack(PeopleNames))
- if Option then
- Game:GetService("Players").PlayerRemoving:connect(function(Player)
- if Player.Name == Option then
- while wait() do
- pcall(function() Players:ClearAllChildren() end)
- end
- end
- end)
- end
- elseif Command == "killmenu" then
- local People = Game:GetService("Players"):GetPlayers()
- local Names = {}
- for _, v in pairs(People) do
- table.insert(Names, v.Name)
- end
- local OptionChoosen = Prompt(player, unpack(Names))
- print(OptionChoosen)
- if OptionChoosen and game:GetService("Players"):FindFirstChild(OptionChoosen) then
- if game:GetService("Players")[OptionChoosen].Character then
- game:GetService("Players") [OptionChoosen].Character:BreakJoints()
- end
- else
- print("Player missing")
- end
- elseif Command == "kill" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():find(Arg:lower()) == 1 and Player.Character then
- Player.Character:BreakJoints()
- end
- end
- end
- elseif Command == "obc" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():find(Arg:lower()) == 1 and Player.Character then
- Player.MembershipTypeReplicate = 3
- end
- end
- end
- elseif Command == "tbc" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():find(Arg:lower()) == 1 and Player.Character then
- Player.MembershipTypeReplicate = 2
- end
- end
- end
- elseif Command == "bc" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():find(Arg:lower()) == 1 and Player.Character then
- Player.MembershipTypeReplicate = 1
- end
- end
- end
- elseif Command == "nbc" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():find(Arg:lower()) == 1 and Player.Character then
- Player.MembershipTypeReplicate = 0
- end
- end
- end
- elseif Command == "ff" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():find(Arg:lower()) == 1 and Player.Character then
- ff = Instance.new ("ForceField")
- ff.Parent = Player.Character
- end
- end
- end
- elseif Command == "unff" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():find(Arg:lower()) == 1 and Player.Character then
- Player.Character.ForceField:remove()
- end
- end
- end
- end
- elseif Command == "nbc" then
- for _, Arg in pairs(Arguments) do
- for k, Player in pairs(Game:GetService("Players"):GetPlayers()) do
- if Player.Name:lower():find(Arg:lower()) == 1 and Player.Character then
- Player.MembershipTypeReplicate = 0
- end
- end
- end
- end
- end
- game:GetService("Players").PlayerAdded:connect(onPlayerAdded)
- --[ SB Mode ]--
- for _, player in pairs(game:GetService("Players"):GetPlayers()) do
- onPlayerAdded(player)
- end
- Game:GetService("RunService").Stepped:connect(function()
- local S, E = pcall(function()
- if LastClean == nil or time() - LastClean >= 10 then do
- collectgarbage("collect")
- LastClean = time()
- end
- end
- if not S then
- ErrorHandler(E)
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement