Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Prefix = ":"
- local ClientSound = Instance.new("Sound")
- ClientSound.SoundId = "http://www.roblox.com/asset/?id=2741270504"
- ClientSound.Volume = 2
- ClientSound.Parent = workspace
- ClientSound.PlaybackSpeed = 1
- ClientSound:Play()
- -- Objects
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local TextButton = Instance.new("TextButton")
- local TextButton_2 = Instance.new("TextButton")
- -- Properties
- ScreenGui.Parent = game.CoreGui
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.new(0.121569, 0.121569, 0.121569)
- Frame.BorderColor3 = Color3.new(0, 0, 0)
- Frame.Position = UDim2.new(0.342884421, 0, 0.194006309, 0)
- Frame.Size = UDim2.new(0, 311, 0, 134)
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel.BorderColor3 = Color3.new(0, 0, 0)
- TextLabel.Size = UDim2.new(0, 311, 0, 50)
- TextLabel.Font = Enum.Font.GothamSemibold
- TextLabel.Text = "Hospital Life 2 Admin 2.0 Loaded!"
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14
- TextLabel.TextWrapped = true
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.new(0, 0, 0)
- TextButton.BorderColor3 = Color3.new(0, 0, 0)
- TextButton.Position = UDim2.new(0.530546606, 0, 0.626865685, 0)
- TextButton.Size = UDim2.new(0, 146, 0, 50)
- TextButton.Font = Enum.Font.GothamSemibold
- TextButton.Text = "OK"
- TextButton.TextColor3 = Color3.new(1, 1, 1)
- TextButton.TextScaled = true
- TextButton.TextSize = 14
- TextButton.TextWrapped = true
- TextButton_2.Parent = Frame
- TextButton_2.BackgroundColor3 = Color3.new(0, 0, 0)
- TextButton_2.BorderColor3 = Color3.new(0, 0, 0)
- TextButton_2.Position = UDim2.new(0, 0, 0.626865685, 0)
- TextButton_2.Size = UDim2.new(0, 146, 0, 50)
- TextButton_2.Font = Enum.Font.GothamSemibold
- TextButton_2.Text = "Commands"
- TextButton_2.TextColor3 = Color3.new(1, 1, 1)
- TextButton_2.TextScaled = true
- TextButton_2.TextSize = 14
- TextButton_2.TextWrapped = true
- TextButton.MouseButton1Click:connect(function()
- local ClientSound2 = Instance.new("Sound")
- ClientSound2.SoundId = "http://www.roblox.com/asset/?id=142916958"
- ClientSound2.Volume = 1
- ClientSound2.Parent = workspace
- ClientSound2.PlaybackSpeed = .94125
- ClientSound2:Play()
- for i=1,math.random(6,9) do
- Frame.BackgroundTransparency = Frame.BackgroundTransparency + .1
- TextButton.TextTransparency = TextButton.TextTransparency + .1
- TextButton_2.TextTransparency = TextButton_2.TextTransparency + .1
- wait()
- end
- game.CoreGui.ScreenGui:Destroy()
- end)
- TextButton_2.MouseButton1Click:connect(function()
- local ClientSound3 = Instance.new("Sound")
- ClientSound3.SoundId = "http://www.roblox.com/asset/?id=142916958"
- ClientSound3.Volume = 1
- ClientSound3.Parent = workspace
- ClientSound3.PlaybackSpeed = .94125
- ClientSound3:Play()
- game:GetService("StarterGui"):SetCore("DeveloperConsoleVisible", true)
- print([[
- Script Admin Commands
- Refer to the prefix at the top of the script
- cmds
- prefix [prefix] (cannot be more than one character)
- kill [player]
- explode [player]
- arrest [player]
- spamarrest [player]
- gear me [ID]
- name me [name]
- sword me
- boombox me
- bomb me
- hat me [ID]
- ws me [amount]
- jp me [amount]
- admin [player]
- fixcam me]])
- end)
- --Credit to timeless for this part V
- function GetPlayer(String)
- local Found = {}
- local strl = String:lower()
- if strl == "all" then
- for i,v in pairs(game.Players:GetPlayers()) do
- table.insert(Found,v)
- end
- elseif strl == "others" then
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name ~= game.Players.LocalPlayer.Name then
- table.insert(Found,v)
- end
- end
- elseif strl == "me" then
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name == game.Players.LocalPlayer.Name then
- table.insert(Found,v)
- end
- end
- else
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name:lower():sub(1, #String) == String:lower() then
- table.insert(Found,v)
- end
- end
- end
- return Found
- end
- function GetPlayer_Event(String)
- local Found = {}
- local strl = String:lower()
- if strl == "all" then
- for i,v in pairs(game.Players:GetPlayers()) do
- table.insert(Found,v.Name)
- end
- elseif strl == "others" then
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name ~= game.Players.LocalPlayer.Name then
- table.insert(Found,v.Name)
- end
- end
- elseif strl == "me" then
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name == game.Players.LocalPlayer.Name then
- table.insert(Found,v.Name)
- end
- end
- else
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name:lower():sub(1, #String) == String:lower() then
- table.insert(Found,v.Name)
- end
- end
- end
- return Found
- end
- --End of credit ^
- workspace.FE.RemoteEvents.NameChange:FireServer("Admin | "..game.Players.LocalPlayer.Name)
- wait()
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Hospital Life Admin 2.0 Loaded!";
- Text = "Say :cmds for the commands.";
- })
- wait()
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if msg == Prefix.."fixcam" or msg == Prefix.."fixcam me" then
- workspace.CurrentCamera.CameraType = Enum.CameraType.Track
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if msg:sub(1,8) == Prefix.."prefix " then
- local prefixx = msg:sub(9, #msg)
- Prefix = prefixx
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,9) == (Prefix.."gear me ") then
- local Gear = msg:sub(10, #msg)
- Gearx = {Gear}
- for i,v in pairs(Gearx) do
- game:GetService"Workspace".FE.RemoteEvents.Accessories:FireServer("Hat", v)
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if msg:sub(1,9) == Prefix.."name me " then
- local name = msg:sub(10, #msg)
- workspace.FE.RemoteEvents.NameChange:FireServer(name)
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if msg == Prefix.."sword" or msg == Prefix.."sword me" then
- local things = {125013769}
- for i,v in pairs(things) do
- workspace.FE.RemoteEvents.Accessories:FireServer("Hat", v)
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if msg == Prefix.."boombox" or msg == Prefix.."boombox me" then
- local things = {212641536}
- for i,v in pairs(things) do
- workspace.FE.RemoteEvents.Accessories:FireServer("Hat", v)
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if msg == Prefix.."bomb" or msg == Prefix.."bomb me" then
- local things = {11563251}
- for i,v in pairs(things) do
- workspace.FE.RemoteEvents.Accessories:FireServer("Hat", v)
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,8) == (Prefix.."arrest ") then
- for i,v in pairs(GetPlayer_Event(string.sub(msg, 9))) do
- workspace.FE.RemoteEvents.HandcuffArrest:FireServer(v)
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,9) == (Prefix.."explode ") then
- for i,v in pairs(GetPlayer(string.sub(msg, 10))) do
- local Location = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- local targetplayer = v.Character.HumanoidRootPart
- things = {1527622}
- for v,i in pairs(things) do
- game:GetService"Workspace".FE.RemoteEvents.Accessories:FireServer("Hat", i)
- end
- wait(4.875)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(targetplayer.Position.X, targetplayer.Position.Y, targetplayer.Position.Z)
- wait(6)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Location
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,6) == (Prefix.."kill ") then
- for i,v in pairs(GetPlayer(string.sub(msg, 7))) do
- local Location = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- local targetplayer = v.Character.HumanoidRootPart
- things = {1527622}
- for v,i in pairs(things) do
- game:GetService"Workspace".FE.RemoteEvents.Accessories:FireServer("Hat", i)
- end
- wait(4.875)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(targetplayer.Position.X, targetplayer.Position.Y, targetplayer.Position.Z)
- wait(6)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Location
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,8) == (Prefix.."hat me ") then
- local Hat = msg:sub(9, #msg)
- Hatx = {Hat}
- for i,v in pairs(Gearx) do
- game:GetService"Workspace".FE.RemoteEvents.Accessories:FireServer("Hat", v)
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,7) == (Prefix.."ws me ") then
- local ws = msg:sub(8, #msg)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = ws
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,8) == (Prefix.."jp me ") then
- local jp = msg:sub(9, #msg)
- game.Players.LocalPlayer.Character.Humanoid.JumpPower = jp
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,12) == (Prefix.."spamarrest ") then
- for i,v in pairs(GetPlayer_Event(string.sub(msg, 13))) do
- repeat
- workspace.FE.RemoteEvents.HandcuffArrest:FireServer(v)
- wait()
- until game.Players.LocalPlayer.Character.Humanoid.Health == 0
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if string.sub(msg,1,7) == (Prefix.."admin ") then
- for i,v in pairs(GetPlayer(string.sub(msg, 8))) do
- if msg:sub(8, #msg) == "others" then
- game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("/me has given admin powers to everyone else accept themself.", "All")
- else
- if msg:sub(8, #msg) == "all" then
- game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("/me has given admin powers to everyone.", "All")
- else
- if msg:sub(8, #msg) == "me" then
- game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("/me has given admin powers to themself.", "All")
- else
- game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("/me has given admin powers to "..v.Name..".", "All")
- end
- end
- end
- v.Chatted:connect(function(msg)
- if string.sub(msg,1,12) == (Prefix.."spamarrest ") then
- for i,v in pairs(GetPlayer_Event(string.sub(msg, 13))) do
- repeat
- workspace.FE.RemoteEvents.HandcuffArrest:FireServer(v)
- wait()
- until game.Players.LocalPlayer.Character.Humanoid.Health == 0
- end
- end
- end)
- v.Chatted:connect(function(msg)
- if string.sub(msg,1,8) == (Prefix.."arrest ") then
- for i,v in pairs(GetPlayer_Event(string.sub(msg, 9))) do
- workspace.FE.RemoteEvents.HandcuffArrest:FireServer(v)
- end
- end
- end)
- v.Chatted:connect(function(msg)
- if string.sub(msg,1,9) == (Prefix.."explode ") then
- for i,v in pairs(GetPlayer(string.sub(msg, 10))) do
- local Location = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- local targetplayer = v.Character.HumanoidRootPart
- things = {1527622}
- for v,i in pairs(things) do
- game:GetService"Workspace".FE.RemoteEvents.Accessories:FireServer("Hat", i)
- end
- wait(4.875)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(targetplayer.Position.X, targetplayer.Position.Y, targetplayer.Position.Z)
- wait(6)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Location
- end
- end
- end)
- v.Chatted:connect(function(msg)
- if string.sub(msg,1,6) == (Prefix.."kill ") then
- for i,v in pairs(GetPlayer(string.sub(msg, 7))) do
- local Location = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- local targetplayer = v.Character.HumanoidRootPart
- things = {1527622}
- for v,i in pairs(things) do
- game:GetService"Workspace".FE.RemoteEvents.Accessories:FireServer("Hat", i)
- end
- wait(4.875)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(targetplayer.Position.X, targetplayer.Position.Y, targetplayer.Position.Z)
- wait(6)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Location
- end
- end
- end)
- v.Chatted:connect(function(msg)
- if msg == Prefix.."cmds" or msg == Prefix.."commands" then
- game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("Mod/Admin Commands: "..Prefix.."kill [player] | "..Prefix.."explode [player] | "..Prefix.."arrest [player] | "..Prefix.."spamarrest [player] | "..Prefix.."cmds", "All")
- end
- end)
- end
- end
- end)
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if msg == Prefix.."cmds" or msg == Prefix.."commands" then
- print("Script Admin Commands")
- print("Refer to the prefix at the top of the script")
- print("cmds")
- print("prefix [prefix] (cannot be more than one character)")
- print("kill [player]")
- print("explode [player]")
- print("arrest [player]")
- print("spamarrest [player]")
- print("gear me [ID]")
- print("name me [name]")
- print("sword me")
- print("boombox me")
- print("bomb me")
- print("hat me [ID]")
- print("ws me [amount]")
- print("jp me [amount]")
- print("admin [player]")
- print("fixcam me")
- game:GetService("StarterGui"):SetCore("DeveloperConsoleVisible", true)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement