Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- [1] The Streets
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local UserInput = game:GetService("UserInputService")
- local Core = game:GetService("CoreGui")
- local Plr = Players.LocalPlayer
- local Mouse = Plr:GetMouse()
- local ToggleKey = Enum.KeyCode.Equals
- local BlinkKey = Enum.KeyCode.Q
- local FlyKey = Enum.KeyCode.Semicolon
- local FoodKey = Enum.KeyCode.P
- local Prefix = ";"
- local Split = " "
- -- [2] Init Stuff
- Plr.CameraMaxZoomDistance = math.huge
- local AutoJumpOn = false
- local NoSlowOn = false
- local CanFly = false
- local CanUnlock = false
- local CanBlink = false
- local BringCashOn = false
- local Blinking = false
- local Flying = false
- local FlightSpeed = 1
- local BlinkSpeed = 1
- -- [3] Main Functions
- local TP = function(CFRAME)
- for i,v in pairs(Plr.PlayerGui:GetChildren()) do
- if v:IsA("LocalScript") then
- v.Disabled = true
- end
- end
- Plr.Character.HumanoidRootPart.CFrame = CFRAME
- for i,v in pairs(Plr.PlayerGui:GetChildren()) do
- if v:IsA("LocalScript") then
- v.Disabled = false
- end
- end
- end
- local Respawn = function()
- Plr.Character:Destroy()
- local a1 = Instance.new("Model", workspace)
- local a2 = Instance.new("Part", a1)
- a2.CanCollide = true
- a2.Anchored = true
- a2.CFrame = CFrame.new(10000, 10000, 10000)
- a2.Name = "Torso"
- local a3 = Instance.new("Humanoid", a1)
- a3.MaxHealth=100;a3.Health=100
- Plr.Character = a1
- a3.Health=0
- end
- local GetItems = function()
- local Pos = Plr.Character.Torso.CFrame
- for i,v in pairs(workspace:GetChildren()) do
- if v.Name == "RandomSpawner" then
- local Handle = v:FindFirstChild("Handle", true)
- if Handle then
- TP(Handle.CFrame)
- wait(1)
- end
- end
- end
- TP(Pos)
- end
- local GetTool = function(Name, P)
- local Tool = nil
- for i,v in pairs(P.Backpack:GetChildren()) do
- if v.Name == Name then
- Tool = v
- end
- end
- for i,v in pairs(P.Character:GetChildren()) do
- if v.Name == Name then
- Tool = v
- end
- end
- if Tool then
- return Tool
- else
- print("Cannot find: " .. Name)
- end
- end
- local PlayMusic = function(ID, P)
- local BoomBox = GetTool("BoomBox", P)
- BoomBox.Parent = P.Character
- BoomBox.Remote:FireServer("PlaySong", ID)
- BoomBox.Parent = P.Backpack
- end
- local ReEquip = function()
- local Tool = nil
- for i,v in pairs(Plr.Character:GetChildren()) do
- if v:IsA("Tool") or v:IsA("HopperBin") then
- Tool = v
- end
- end
- if Tool then
- Tool.Parent = Plr.Backpack
- wait(0.2)
- Tool.Parent = Plr.Character
- end
- end
- Mouse.Button1Down:connect(function()
- if CanUnlock and Mouse.Target and Mouse.Target.Name == "Click" then
- local Lock = Mouse.Target.Parent:FindFirstChild("Locker")
- if Lock and Lock.Value == true then
- Mouse.Target.Parent.Lock.ClickDetector.RemoteEvent:FireServer()
- wait(0.1)
- Mouse.Target.ClickDetector.RemoteEvent:FireServer()
- end
- end
- end)
- -- [4] GUI Main
- local NormalColor = Color3.fromRGB(42, 42, 42)
- local GUIColor = Color3.fromRGB(120, 25, 188)
- local GUI = game:GetObjects("rbxassetid://01207250298")[1]
- GUI.Parent = Core
- local Buttons = GUI.Buttons
- local localButton = Buttons["1local"]
- local bindsButton = Buttons["2keybinds"]
- local valueButton = Buttons["3values"]
- local infoButton = Buttons["4info"]
- local LocalTab = GUI.LocalTab
- local AutoJ = LocalTab.Frame["1"]
- local NoSlow = LocalTab.Frame["2"]
- local Flight = LocalTab.Frame["3"]
- local UnlockDoors = LocalTab.Frame["4"]
- local Blink = LocalTab.Frame["5"]
- local BindsTab = GUI.BindsTab
- local toggleButton = BindsTab.Frame.toggleKey
- local blinkButton = BindsTab.Frame.blinkKey
- local flightButton = BindsTab.Frame.flightKey
- local foodButton = BindsTab.Frame.foodKey
- local ValueTab = GUI.ValueTab
- local DownBlink = ValueTab.Frame.DownBlink
- local UpBlink = ValueTab.Frame.UpBlink
- local DownFlight = ValueTab.Frame.DownFlight
- local UpFlight = ValueTab.Frame.UpFlight
- local blinkTxt = ValueTab.Frame.blinkTxt
- local flightTxt = ValueTab.Frame.flightTxt
- local InfoTab = GUI.InfoTab
- local ptxt = InfoTab.Frame.pfixTxt
- ptxt.Text = 'Command Prefix: "' .. tostring(Prefix) .. '"'
- -- [5] Buttons
- localButton.MouseButton1Down:connect(function()
- if not LocalTab.Visible then
- LocalTab.Visible = true
- localButton.BackgroundColor3 = GUIColor
- else
- LocalTab.Visible = false
- localButton.BackgroundColor3 = NormalColor
- end
- end)
- bindsButton.MouseButton1Down:connect(function()
- if not BindsTab.Visible then
- BindsTab.Visible = true
- bindsButton.BackgroundColor3 = GUIColor
- else
- BindsTab.Visible = false
- bindsButton.BackgroundColor3 = NormalColor
- end
- end)
- valueButton.MouseButton1Down:connect(function()
- if not ValueTab.Visible then
- ValueTab.Visible = true
- valueButton.BackgroundColor3 = GUIColor
- else
- ValueTab.Visible = false
- valueButton.BackgroundColor3 = NormalColor
- end
- end)
- infoButton.MouseButton1Down:connect(function()
- if not InfoTab.Visible then
- InfoTab.Visible = true
- infoButton.BackgroundColor3 = GUIColor
- else
- InfoTab.Visible = false
- infoButton.BackgroundColor3 = NormalColor
- end
- end)
- -- [6] Local Tab
- AutoJ.MouseButton1Down:connect(function()
- if not AutoJumpOn then
- AutoJumpOn = true
- AutoJ.BackgroundColor3 = GUIColor
- else
- AutoJumpOn = false
- AutoJ.BackgroundColor3 = NormalColor
- end
- end)
- NoSlow.MouseButton1Down:connect(function()
- if not NoSlowOn then
- NoSlowOn = true
- NoSlow.BackgroundColor3 = GUIColor
- else
- NoSlowOn = false
- NoSlow.BackgroundColor3 = NormalColor
- end
- end)
- Flight.MouseButton1Down:connect(function()
- if not CanFly then
- CanFly = true
- Flight.BackgroundColor3 = GUIColor
- else
- CanFly = false
- Flying = false
- Flight.BackgroundColor3 = NormalColor
- end
- end)
- UnlockDoors.MouseButton1Down:connect(function()
- if not CanUnlock then
- CanUnlock = true
- UnlockDoors.BackgroundColor3 = GUIColor
- else
- CanUnlock = false
- UnlockDoors.BackgroundColor3 = NormalColor
- end
- end)
- Blink.MouseButton1Down:connect(function()
- if not CanBlink then
- CanBlink = true
- Blink.BackgroundColor3 = GUIColor
- else
- CanBlink = false
- Blinking = false
- Blink.BackgroundColor3 = NormalColor
- end
- end)
- -- [7] Keybinds
- toggleButton.Text = tostring(ToggleKey):sub(14)
- blinkButton.Text = tostring(BlinkKey):sub(14)
- flightButton.Text = tostring(FlyKey):sub(14)
- foodButton.Text = tostring(FoodKey):sub(14)
- toggleButton.MouseButton1Down:connect(function()
- toggleButton.Text = "Press a key"
- a = UserInput.InputBegan:connect(function(input, gp)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- wait()
- local key = input.KeyCode
- ToggleKey = key
- toggleButton.Text = tostring(key):sub(14)
- a:Disconnect()
- end
- end)
- end)
- blinkButton.MouseButton1Down:connect(function()
- blinkButton.Text = "Press a key"
- b = UserInput.InputBegan:connect(function(input, gp)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- wait()
- local key = input.KeyCode
- BlinkKey = key
- blinkButton.Text = tostring(key):sub(14)
- b:Disconnect()
- end
- end)
- end)
- flightButton.MouseButton1Down:connect(function()
- flightButton.Text = "Press a key"
- c = UserInput.InputBegan:connect(function(input, gp)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- wait()
- local key = input.KeyCode
- FlyKey = key
- flightButton.Text = tostring(key):sub(14)
- c:Disconnect()
- end
- end)
- end)
- foodButton.MouseButton1Down:connect(function()
- foodButton.Text = "Press a key"
- d = UserInput.InputBegan:connect(function(input, gp)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- wait()
- local key = input.KeyCode
- FoodKey = key
- foodButton.Text = tostring(key):sub(14)
- d:Disconnect()
- end
- end)
- end)
- -- [8] Values
- blinkTxt.Text = "Blink - " .. BlinkSpeed
- flightTxt.Text = "Flight - " .. FlightSpeed
- DownBlink.MouseButton1Down:connect(function()
- if BlinkSpeed > 1 then
- BlinkSpeed = BlinkSpeed - 1
- blinkTxt.Text = "Blink - " .. BlinkSpeed
- end
- end)
- UpBlink.MouseButton1Down:connect(function()
- if BlinkSpeed < 5 then
- BlinkSpeed = BlinkSpeed + 1
- blinkTxt.Text = "Blink - " .. BlinkSpeed
- end
- end)
- DownFlight.MouseButton1Down:connect(function()
- if FlightSpeed > 1 then
- FlightSpeed = FlightSpeed - 1
- flightTxt.Text = "Flight - " .. FlightSpeed
- end
- end)
- UpFlight.MouseButton1Down:connect(function()
- if FlightSpeed < 5 then
- FlightSpeed = FlightSpeed + 1
- flightTxt.Text = "Flight - " .. FlightSpeed
- end
- end)
- -- [9] UIS
- local Open = false
- local ToggleGUI = function()
- if not Open then
- Open = true
- Buttons:TweenPosition(UDim2.new(0.005, 0, 0.45, 0), "Out", "Quad", 0.1, true)
- wait()
- GUI.Enabled = true
- else
- Open = false
- Buttons:TweenPosition(UDim2.new(-1.1, 0, 0.45, 0), "Out", "Quad", 0.1, true)
- wait()
- GUI.Enabled = false
- end
- end
- local GetMovement = function(time)
- local Speed = FlightSpeed * 10
- local nextMove = Vector3.new()
- -- Left/Right
- if UserInput:IsKeyDown("A") or UserInput:IsKeyDown("Left") then
- nextMove = Vector3.new(-1,0,0)
- elseif UserInput:IsKeyDown("D") or UserInput:IsKeyDown("Right") then
- nextMove = Vector3.new(1,0,0)
- end
- -- Forward/Back
- if UserInput:IsKeyDown("W") or UserInput:IsKeyDown("Up") then
- nextMove = nextMove + Vector3.new(0,0,-1)
- elseif UserInput:IsKeyDown("S") or UserInput:IsKeyDown("Down") then
- nextMove = nextMove + Vector3.new(0,0,1)
- end
- -- Up/Down
- if UserInput:IsKeyDown("Space") then
- nextMove = nextMove + Vector3.new(0,1,0)
- elseif UserInput:IsKeyDown("LeftControl") then
- nextMove = nextMove + Vector3.new(0,-1,0)
- end
- if UserInput:IsKeyDown("LeftShift") then
- Speed = 120
- else
- Speed = FlightSpeed * 10
- end
- return CFrame.new(nextMove * (Speed * time))
- end
- local Flight = function()
- local last = tick()
- local root = Plr.Character.HumanoidRootPart
- local hum = Plr.Character.Humanoid
- local cam = workspace.CurrentCamera
- --
- if not Flying and CanFly then
- Flying = true
- Plr.Character.Humanoid.Died:connect(function()
- Flying = false
- end)
- hum.PlatformStand = true
- while Flying do
- root.Anchored = true
- local delta = tick() - last
- local look = (cam.Focus.p - cam.CoordinateFrame.p).unit
- local move = GetMovement(delta)
- local pos = root.Position
- root.CFrame = CFrame.new(pos, pos + look) * move
- last = tick()
- wait(.001)
- end
- hum.PlatformStand = false
- root.Anchored = false
- else
- Flying = false
- end
- end
- local Blink = function()
- if CanBlink then
- if not Blinking then
- Blinking = true
- while Blinking do
- Plr.Character.HumanoidRootPart.CFrame = Plr.Character.HumanoidRootPart.CFrame + (Plr.Character.HumanoidRootPart.CFrame.lookVector * BlinkSpeed)
- wait(0.001)
- end
- else
- Blinking = false
- end
- end
- end
- UserInput.InputBegan:connect(function(input, gp)
- if not gp then
- if input.KeyCode == ToggleKey then
- ToggleGUI()
- elseif input.KeyCode == BlinkKey then
- Blink()
- elseif input.KeyCode == FlyKey then
- spawn(function()
- Flight()
- end)
- elseif input.KeyCode == FoodKey then
- if workspace:FindFirstChild("Chicken | $12") then
- workspace["Chicken | $12"]:MoveTo(Plr.Character.Torso.Position)
- end
- end
- end
- end)
- -- [10] Admin Main
- local Admins = {}
- local Bans = {}
- -- # Main Lib
- local ServerLocked = false
- local Cmds = {}
- local CheckInTable = function(Tab, Obj)
- for i,v in pairs(Tab) do
- if Obj == v then
- return true
- end
- end
- return false
- end
- local Endat = function(a, b)
- local c = a:find(b)
- if c then
- return a:sub(0, c - string.len(b)), true
- else
- return a, false
- end
- end
- local FindCmd = function(Cmd)
- for i,v in pairs(Cmds) do
- if v.Name:lower() == Cmd:lower() or CheckInTable(v.Alias, Cmd:lower()) then
- return v
- end
- end
- end
- local GetCmd = function(a)
- local cmd, lol = Endat(a:lower(), Split)
- if lol then
- return {cmd, true}
- else
- return {cmd, false}
- end
- end
- local GetPrefix = function(str)
- if str:sub(1, string.len(Prefix)) == Prefix then
- return {"CMD", string.len(Prefix) + 1}
- end
- end
- local GetArgs = function(str)
- local a = {}
- local na = nil
- local hs = nil
- local s = str
- repeat
- na, hs = Endat(s:lower(), Split)
- if na ~= "" then
- table.insert(a, na)
- s = s:sub(string.len(na) + string.len(Split) + 1)
- end
- until not hs
- return a
- end
- local ExCmd = function(str, speaker)
- repeat
- if str:find(" ") then
- str = str:gsub(" ", " ")
- end
- until not str:find(" ")
- local x = GetCmd(str)
- local cmd = FindCmd(x[1])
- if not cmd then
- return
- end
- local a = str:sub(string.len(x[1]) + string.len(Split) + 1)
- local args = GetArgs(a)
- pcall(function()
- cmd.Func(args, speaker)
- end)
- end
- local CheckAdmin = function(a)
- if CheckInTable(Admins, a.Name) then
- return true
- elseif a.UserId == Plr.UserId then
- return true
- end
- return false
- end
- local HandleMsg = function(str, speaker)
- if not CheckAdmin(speaker) then
- return
- end
- str = str:gsub("/e ", "")
- local gp = GetPrefix(str)
- if not gp then
- return
- end
- str = str:sub(gp[2])
- if gp[1] == "CMD" then
- ExCmd(str, speaker)
- end
- end
- local AddCmd = function(Name, Desc, Alias, Func)
- table.insert(Cmds, {
- Name = Name;
- Desc = Desc;
- Alias = Alias;
- Func = Func;
- })
- end
- local SplitString = function(Self, Sep)
- local Sep, Fields = Sep or Split, {}
- local Pattern = string.format("([^%s]+)", Sep)
- Self:gsub(Pattern, function(c) Fields[#Fields+1] = c end)
- return Fields
- end
- local GetPlr = function(str, speaker)
- local tab = {}
- str = str:lower()
- local a = SplitString(str, ",")
- for z,x in pairs(a) do
- if x == "me" or x == "!" then
- table.insert(tab, speaker.Name)
- elseif x == "others" or x == "other" then
- for i,v in pairs(Players:GetPlayers()) do
- if v.Name ~= speaker.Name then
- table.insert(tab, v.Name)
- end
- end
- elseif x == "all" or x == "*" then
- for i,v in pairs(Players:GetPlayers()) do
- table.insert(tab, v.Name)
- end
- elseif x == "admins" then
- for i,v in pairs(Players:GetPlayers()) do
- if CheckInTable(Admins, v.Name) then
- table.insert(tab, v.Name)
- end
- end
- elseif x == "nonadmins" then
- for i,v in pairs(Players:GetPlayers()) do
- if not CheckInTable(Admins, v.Name) then
- table.insert(tab, v.Name)
- end
- end
- elseif x == "friends" then
- for i,v in pairs(Players:GetPlayers()) do
- if v ~= speaker and v:IsFriendsWith(speaker.UserId) then
- table.insert(tab, v.name)
- end
- end
- elseif x == "nonfriends" then
- for i,v in pairs(Players:GetPlayers()) do
- if v ~= speaker and not v:IsFriendsWith(speaker.UserId) then
- table.insert(tab, v.name)
- end
- end
- else
- for i,v in pairs(Players:GetPlayers()) do
- local l = v.Name:lower()
- local f = l:find(str)
- if f == 1 then
- table.insert(tab, v.Name)
- end
- end
- end
- end
- return tab
- end
- local Hook = function(P)
- P.Chatted:connect(function(Msg)
- HandleMsg(Msg, P)
- end)
- end
- for i,v in pairs(Players:GetPlayers()) do
- Hook(v)
- end
- Players.PlayerAdded:connect(function(P)
- Hook(P)
- end)
- -- [11] Admin Commands
- AddCmd("Respawn", "Respawn character", {"rs"},
- function(Args, Speaker)
- Respawn()
- end)
- AddCmd("Goto", "Goto plr", {"to"},
- function(Args, Speaker)
- local p = GetPlr(Args[1], Speaker)
- for i,v in pairs(p) do
- TP(Players[v].Character.Torso.CFrame)
- ReEquip()
- end
- end)
- AddCmd("Fly", "Allows you to fly", {},
- function(Args, Speaker)
- spawn(function()
- Flight()
- end)
- end)
- AddCmd("Bank", "TP to bank", {},
- function(Args, Speaker)
- TP(CFrame.new(-269.053375, 4.81635475, 139.362961))
- ReEquip()
- end)
- AddCmd("Prison", "TP to prison", {},
- function(Args, Speaker)
- TP(CFrame.new(-973.523621, 3.19878054, -76.6112595))
- ReEquip()
- end)
- AddCmd("Music", "Play music", {"mus", "play", "sound"},
- function(Args, Speaker)
- local str = table.concat(Args, " ")
- if string.match(str, "%a") then
- local http = game:HttpGet("https://search.roblox.com/catalog/json?CatalogContext=2&SortAggregation=5&LegendExpanded=true&Category=9&Keyword=" .. str, true)
- if http ~= "[]" then
- local ID = http:sub(13)
- ID = ID:sub(1, ID:find(",") - 1)
- PlayMusic(ID, Speaker)
- else
- print("No results")
- end
- else
- PlayMusic(Args[1], Speaker)
- end
- end)
- AddCmd("Items", "Gets all items", {},
- function(Args, Speaker)
- GetItems()
- end)
- AddCmd("Uzi", "Brings uzi", {},
- function(Args, Speaker)
- if workspace:FindFirstChild("Uzi | $150") then
- workspace["Uzi | $150"]:MoveTo(Plr.Character.Torso.Position)
- end
- end)
- AddCmd("Glock", "Bring glock", {},
- function(Args, Speaker)
- if workspace:FindFirstChild("Glock | $200") then
- workspace["Glock | $200"]:MoveTo(Plr.Character.Torso.Position)
- end
- end)
- AddCmd("Machete", "Bring machete", {},
- function(Args, Speaker)
- if workspace:FindFirstChild("Machete | $70") then
- workspace["Machete | $70"]:MoveTo(Plr.Character.Torso.Position)
- end
- end)
- AddCmd("Food", "Brings food", {},
- function(Args, Speaker)
- if workspace:FindFirstChild("Chicken | $12") then
- workspace["Chicken | $12"]:MoveTo(Plr.Character.Torso.Position)
- end
- end)
- AddCmd("Ammo", "Brings ammo", {},
- function(Args, Speaker)
- if workspace:FindFirstChild("Buy Ammo | $25") then
- workspace["Buy Ammo | $25"]:MoveTo(Plr.Character.Torso.Position)
- end
- end)
- AddCmd("Bt", "Gives hammer tool", {},
- function(Args, Speaker)
- Instance.new("HopperBin", Plr.Backpack).BinType = "Hammer"
- end)
- AddCmd("Anim", "Load animation", {},
- function(Args, Speaker)
- local ID = Args[1]
- local Anim = Instance.new("Animation")
- Anim.AnimationId = "http://www.roblox.com/Asset?ID=" .. ID
- local Track = Plr.Character.Humanoid:LoadAnimation(Anim)
- Track:Play()
- end)
- AddCmd("Prefix", "Set prefix", {},
- function(Args, Speaker)
- if Args[1] == "nil" then
- Prefix = ""
- else
- Prefix = Args[1]
- end
- end)
- -- [12] Ending stuff
- local Main = function()
- local Char = Plr.Character
- local Hum = Char.Humanoid
- --
- Hum.FallingDown:connect(function()
- if AutoJumpOn then
- for i = 1, 2 do
- Hum.Sit = true
- Hum.Jump = true
- end
- end
- end)
- Hum.Changed:connect(function()
- if NoSlowOn and Hum.WalkSpeed <= 0 then
- Hum.WalkSpeed = 16
- end
- end)
- end
- Main()
- Plr.CharacterAdded:connect(function()
- wait(0.5)
- Main()
- end)
- unl = function(ins)
- for i,v in pairs(ins:GetChildren()) do
- if v:IsA("BasePart") then
- v.Locked = false
- end
- unl(v)
- end
- end
- unl(workspace)
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Script loaded; v1"; -- Required. Has to be a string!
- Text = "Press '" .. tostring(ToggleKey):sub(14) .. "' key to toggle GUI"; -- Required. Has to be a string!
- Icon = nil; -- Optional, defaults to "" (no icon)
- Duration = 7; -- Optional, defaults to 5 seconds
- })
Add Comment
Please, Sign In to add comment