local w = game:GetService("Workspace")
local lp = game:GetService("Players").LocalPlayer

local s = GLib:Window()

local ss = s:Tab("Welcome")
s:Line()

ss:Label("Welcome, " .. lp.Name .. " to Garfield Hub", false)
ss:Label("By using this hub, you agree to our terms of service and privacy policy.", true)
ss:Label(
    "If you do not have a game tab, that means your game isn't supported. Suggest a game and it will be added soon!",
    true
)
ss:Label("Press Right Control to close and open the GUI")
ss:Label("Use the top orange bar to drag around the UI")
ss:BigBox(
    "Credits",
    {"Owner: Boo", "Head Developer: Nick", "Scripter: Jahman", "Manager: ReklessCruise", "UI Lib: dawid"}
)
ss:BigBox("Changelog - 1.0.0", {"- UI Lib looks amazing", "- General/universal tabs", "", "Changed: 16/12/2020"})
ss:BigBox("Changelog - 1.0.1", {"- Some more games", "- Scrolling and some other stuff", "", "Changed: 17/12/2020"})
ss:BigBox("Changelog - 1.0.2", {"- Actually made it so you can execute the script", "- Fencing, tower of *****", "", "Changed: 27/12/2020"})

if game.PlaceId == 3956818381 then
    local gametab = s:Tab("Game")
    gametab:Label("Auto Farm - Ninja Legends")
end

if game.PlaceId == 155615604 then
    local gametab = s:Tab("Game")
    gametab:Label("Prison Life")
    gametab:Button(
        "Kill All",
        function()
            pcall(
                function()
                    local savedteam = game.Players.LocalPlayer.TeamColor.Name
                    workspace.Remote.TeamEvent:FireServer("Medium stone grey")
                    workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["Remington 870"].ITEMPICKUP)
                    for i, v in pairs(game.Players:GetPlayers()) do
                        local A_1 = {
                            [1] = {
                                ["RayObject"] = Ray.new(
                                    Vector3.new(845.555908, 101.429337, 2269.43945),
                                    Vector3.new(-391.152252, 8.65560055, -83.2166901)
                                ),
                                ["Distance"] = 3.2524313926697,
                                ["Cframe"] = CFrame.new(
                                    840.310791,
                                    101.334137,
                                    2267.87988,
                                    0.0636406094,
                                    0.151434347,
                                    -0.986416459,
                                    0,
                                    0.988420188,
                                    0.151741937,
                                    0.997972965,
                                    -0.00965694897,
                                    0.0629036576
                                ),
                                ["Hit"] = v.Character.Head
                            },
                            [2] = {
                                ["RayObject"] = Ray.new(
                                    Vector3.new(845.555908, 101.429337, 2269.43945),
                                    Vector3.new(-392.481476, -8.44939327, -76.7261353)
                                ),
                                ["Distance"] = 3.2699294090271,
                                ["Cframe"] = CFrame.new(
                                    840.290466,
                                    101.184189,
                                    2267.93506,
                                    0.0964837447,
                                    0.0589403138,
                                    -0.993587971,
                                    4.65661287e-10,
                                    0.998245299,
                                    0.0592165813,
                                    0.995334625,
                                    -0.00571343815,
                                    0.0963144377
                                ),
                                ["Hit"] = v.Character.Head
                            },
                            [3] = {
                                ["RayObject"] = Ray.new(
                                    Vector3.new(845.555908, 101.429337, 2269.43945),
                                    Vector3.new(-389.21701, -2.50536323, -92.2163162)
                                ),
                                ["Distance"] = 3.1665518283844,
                                ["Cframe"] = CFrame.new(
                                    840.338867,
                                    101.236496,
                                    2267.80371,
                                    0.0166504811,
                                    0.0941716284,
                                    -0.995416701,
                                    1.16415322e-10,
                                    0.995554805,
                                    0.0941846818,
                                    0.999861419,
                                    -0.00156822044,
                                    0.0165764652
                                ),
                                ["Hit"] = v.Character.Head
                            },
                            [4] = {
                                ["RayObject"] = Ray.new(
                                    Vector3.new(845.555908, 101.429337, 2269.43945),
                                    Vector3.new(-393.353973, 3.13988972, -72.5452042)
                                ),
                                ["Distance"] = 3.3218522071838,
                                ["Cframe"] = CFrame.new(
                                    840.277222,
                                    101.285957,
                                    2267.9707,
                                    0.117109694,
                                    0.118740402,
                                    -0.985994935,
                                    -1.86264515e-09,
                                    0.992826641,
                                    0.119563118,
                                    0.993119001,
                                    -0.0140019981,
                                    0.116269611
                                ),
                                ["Hit"] = v.Character.Head
                            },
                            [5] = {
                                ["RayObject"] = Ray.new(
                                    Vector3.new(845.555908, 101.429337, 2269.43945),
                                    Vector3.new(-390.73172, 3.2097764, -85.5477524)
                                ),
                                ["Distance"] = 3.222757101059,
                                ["Cframe"] = CFrame.new(
                                    840.317993,
                                    101.286423,
                                    2267.86035,
                                    0.0517584644,
                                    0.123365127,
                                    -0.991010666,
                                    0,
                                    0.992340803,
                                    0.123530701,
                                    0.99865967,
                                    -0.00639375951,
                                    0.0513620302
                                ),
                                ["Hit"] = v.Character.Head
                            }
                        }
                        local A_2 = game.Players.LocalPlayer.Backpack["Remington 870"]
                        local Event = game:GetService("ReplicatedStorage").ShootEvent
                        Event:FireServer(A_1, A_2)
                        Event:FireServer(A_1, A_2)
                    end
                    workspace.Remote.TeamEvent:FireServer(savedteam)
                end
            )
        end
    )

    gametab:Line()

    gametab:Button(
        "Remove Doors",
        function()
            local k = game:GetService("Workspace").Doors:GetChildren()
            for i, v in pairs(k) do
                v:Destroy()
            end
        end
    )

    gametab:Button(
        "Remove Fences",
        function()
            pcall(
                function()
                    local path = game:GetService("Workspace")["Prison_Fences"]:GetChildren()
                    for i, v in pairs(path) do
                        v:Destroy()
                    end
                end
            )
        end
    )

    gametab:Line()

    gametab:Button(
        "God Mode",
        function()
            pcall(
                function()
                    while wait() do
                        if game.Players.LocalPlayer.Character.Humanoid.Health < 100 then
                            game.Players.LocalPlayer.Character.Humanoid.Health = 100
                        end
                    end
                end
            )
        end
    )

    gametab:Toggle(
        "Anti Arrest",
        false,
        function(arg)
            pcall(function()
                print('ll')
_G.AntiArrest = arg
while wait() do
if _G.AntiArrest == true then
    if game.Players.LocalPlayer.Character.Humanoid.Health == 0 then
     workspace.Remote.TeamEvent:FireServer("Bright orange")
    end
   if game.Players.LocalPlayer.Character.Humanoid.Health == 100 then
    workspace.Remote.TeamEvent:FireServer("Medium stone grey")
  end
end
end
            end)
        end
    )

    gametab:Line()

    gametab:Label("Teleports")
    gametab:Dropdown("Teleport", {"Crim Base", "Outside Prison", "Prison Cells", "Homes", "Hallway End", "Police Base", "Yard", "Secret Place"}, function(arg)
        if arg == "Hallway End" then
            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(785, 97.49, 2362.26)
        elseif arg == "Homes" then
            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-254.3, 51.675, 2484.08)
        elseif arg == "Prison Cells" then
            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(924.2, 97.73, 2450.54)
        elseif arg == "Outside Prison" then
            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(484.01, 95.54, 2212.1)
        elseif arg == "Crim Base" then
            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-918.65, 92.827, 2139.81)
        elseif arg == "Secret Place" then
            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-50.27, 8.599, 1303.56)
        elseif arg == "Yard" then
            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(778.34, 95.5, 2450.89)
        elseif arg == "Police Base" then
            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(826.43, 97.49, 2261.37)
        end
    end)

    gametab:Line()
    gametab:Label("Gun Mods")
    gametab:Button("Give All Guns", function()
        pcall(function()
            workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["M9"].ITEMPICKUP)
            workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["Remington 870"].ITEMPICKUP)
            workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["AK-47"].ITEMPICKUP)
            workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["M4A1"].ITEMPICKUP)
        end)
    end)
    gametab:Button("Gun Mods", function()
        pcall(function()
            local plr = game.Players.LocalPlayer
local gun = plr.Backpack["Remington 870"].GunStates
a = require(gun)
a.Damage = math.huge
a.MaxAmmo = math.huge
a.CurrentAmmo = math.huge
a.AutoFire = true
a.ReloadTime = 0
a.FireRate = math.huge
local Gun2 = plr.Backpack.M9.GunStates
a2 = require(Gun2)
a2.Damage = math.huge
a2.MaxAmmo = math.huge
a2.CurrentAmmo = math.huge
a2.AutoFire = true
a2.ReloadTime = 0
a2.FireRate = math.huge
local Gun3 = plr.Backpack.M4A1.GunStates
a3 = require(Gun3)
a3.Damage = math.huge
a3.MaxAmmo = math.huge
a3.CurrentAmmo = math.huge
a3.AutoFire = true
a3.ReloadTime = 0
a3.FireRate = math.huge
local Gun3 = plr.Backpack["Ak-47"].GunStates
a4 = require(Gun3)
a4.Damage = math.huge
a4.MaxAmmo = math.huge
a4.CurrentAmmo = math.huge
a2.ReloadTime = 0
a2.FireRate = math.huge
        end)
    end)
end

_G.AutoFarming = false

if game.PlaceId == 3823781113 then
    local part = Instance.new("Part")
    part.Name = "AutoFarm_Platform"
    part.Parent = game:GetService("Workspace")
    part.Anchored = true
    part.Position = Vector3.new(762.09, 41.41, 13.55)
    part.Size = Vector3.new(18.1, 1, 20)

    _G.AutoFarming = false

    local gametab = s:Tab("Game")
    gametab:Label("Auto Farm - Saber Sim")

    gametab:Toggle(
        "Auto Farm",
        false,
        function(arg)
            pcall(
                function()
                    _G.AutoFarming = true
                    spawn(function()
                    while _G.AutoFarming == true do
                          wait(0.5)
                          if _G.AutoFarming == true then
                              if game.Players.LocalPlayer.Character.Humanoid.Health < 100 then
                                  game.Players.LocalPlayer.Character.Humanoid.Health = 100
                              end
                              while wait(0.5) do
                                  if _G.AutoFarming == true then
                                  print("Clicked!")
                                  game:GetService("ReplicatedStorage").Events.Clicked:FireServer()
                                  game:GetService("ReplicatedStorage").Events.BuyAll:FireServer("Auras")
                                  game:GetService("ReplicatedStorage").Events.BuyAll:FireServer("Swords")
                                  game:GetService("ReplicatedStorage").Events.BuyAll:FireServer("Backpacks")
                                  end
                              end
                          end
                    end
                  end)
                    if _G.AutoFarming == true then
                          while wait(5) do
                              if _G.AutoFarming == true then
                                  print("TP player")
                                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(532.523, 183.727, 147.524)
                                  wait(1)
                                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(762.51, 45.475, 13.27)
                              end
                          end
                      end
                end
            )
        end
    )
    gametab:Line()
    gametab:Label("Shop")

    gametab:Button(
        "Buy all possible backpacks",
        function()
            pcall(
                function()
                    game:GetService("ReplicatedStorage").Events.BuyAll:FireServer("Backpacks")
                end
            )
        end
    )

    gametab:Button(
        "Buy all possible swords",
        function()
            pcall(
                function()
                    game:GetService("ReplicatedStorage").Events.BuyAll:FireServer("Swords")
                end
            )
        end
    )

    gametab:Button(
        "Buy all possible crowns",
        function()
            pcall(
                function()
                    game:GetService("ReplicatedStorage").Events.BuyAll:FireServer("Auras")
                end
            )
        end
    )
end

if game.PlaceId == 12109643 then
    local gametab = s:Tab("Game")
    gametab:Label("Fencing")
    gametab:Button("Delete Anticheat", function()
        pcall(function()
            game:GetService'Workspace'.AntiExploitScript["AntiExploit"]:Destroy()
        end)
    end)
    gametab:Button("FE Fling",function()

   power = 10000 -- change this to make it more or less powerful
   
   game:GetService('RunService').Stepped:connect(function()
   game.Players.LocalPlayer.Character.Head.CanCollide = false
   game.Players.LocalPlayer.Character.Torso.CanCollide = false
   game.Players.LocalPlayer.Character["Left Leg"].CanCollide = false
   game.Players.LocalPlayer.Character["Right Leg"].CanCollide = false
   end)
   
   wait(.1)
   local bambam = Instance.new("BodyThrust")
   bambam.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
   bambam.Force = Vector3.new(power,0,power)
   bambam.Location = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
   end)
   gametab:Button("AutoHeal (Godmode)",function()
    game:GetService("RunService").RenderStepped:Connect(function()
firetouchinterest(game.Players.LocalPlayer.Character.Torso, workspace.Button, 0)

firetouchinterest(game.Players.LocalPlayer.Character.Torso, workspace.Button, 1)
end)
end)
end

if game.PlaceId == 1962086868 then
    local gametab = s:Tab('Game')
    gametab:Label("Tower of *****")
    gametab:Button("God Mode", function()
        pcall(function()
            while wait(0.8) do
                game:GetService("Players").LocalPlayer.Character.KillScript.Disabled = true
            end
        end)
    end)
    gametab:Button("Teleport to finish", function()
        pcall(function()
            game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = game:GetService("Workspace").tower.finishes.Finish.CFrame
        end)
    end)
    gametab:Button("Get all tools", function()
        pcall(function()
            local a = game:GetService("ReplicatedStorage").Gear:Clone()
for i,v in pairs(a:GetChildren()) do if v.ClassName == "Tool"
then v.Parent = game:GetService("Players").LocalPlayer.Backpack
end
end
        end)
    end)
end

if game.PlaceId == 2747834912 then
    local gametab = s:Tab("Eg")
    gametab:Label("Eg")
    gametab:Toggle("Autofarm", false, function(arg)
        pcall(function()
            _G.AutoFarming = arg

            while _G.AutoFarming == true do
                --auto farm coins
local a = game:GetService("Workspace").currencySpawns.coins:GetDescendants()
for i, v in pairs(a) do
    if v:IsA("Part") then
        wait()
        game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Position)
        
    end
end
while wait(30) do
for i, v in pairs(a) do
    if v:IsA("Part") then
        wait()
        game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Position)
        
    end
end
end

--auto grab all eggs
local a = game:GetService("Workspace").currencySpawns.eggs:GetDescendants()
for i, v in pairs(a) do
    if v:IsA("Part") then
        wait()
        game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Position)
        
    end
end
--
            end
        end)
    end)

    gametab:Button("Buy All Items", function()
        pcall(function()
            local path = game:GetService("ReplicatedStorage").asset.character.equippable.hat:GetChildren()

for i, v in pairs(path) do
game:GetService("ReplicatedStorage").remotes.events["fromClient-buyAsset"]:FireServer("globalShop",v.Name)
end
        end)
    end)

    gametab:Button("Grab All Eggs", function()
        pcall(function()
            local a = game:GetService("Workspace").currencySpawns.eggs:GetDescendants()
for i, v in pairs(a) do
    if v:IsA("Part") then
        wait()
        game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Position)
        
    end
end
        end)
    end)
end

if game.PlaceId == 171391948 then
    local gametab = s:Tab("Game")
    gametab:Label("Vehicle Simulator")
    gametab:Button("Get All Crates (if it doesnt work u have no crates)", function()
        pcall(function()
                local crates = workspace:getChildren()
                for i=1,#crates do
                if crates[i].ClassName == "Model" then
                local crates2 = crates[i]:getChildren()
                for i=1,#crates2 do
                if crates2[i].ClassName == "Model" then
                local crates3 = crates2[i]:getChildren()
                for i=1,#crates3 do
                if crates3[i].ClassName == "MeshPart" then
                if crates3[i]:findFirstChild("Smoke") then
                game.Players.LocalPlayer.Character:MoveTo(Vector3.new(crates3[i].Position.X+30,crates3[i].Position.Y+5,crates3[i].Position.Z))
                wait()
                game.Players.LocalPlayer.Character.Humanoid:MoveTo(Vector3.new(crates3[i].Position.X,crates3[i].Position.Y,crates3[i].Position.Z))
                wait(4)
                end
                end
                end
                end
                end
                end
                end
        end)
    end)

    gametab:Button("Get All Gamepasses (only works for this server)", function()
        game:GetService("Players").LocalPlayer.UserId = 1099580
    end)
end

if game.PlaceId == 13822889 then
    local gametab = s:Tab("Game")
    gametab:Label("Lumber Tycoon 2")
    gametab:Line()
    gametab:Button("Blacklist All", function()
        pcall(function()
            local Client = game.ReplicatedStorage.Interaction.ClientSetListPlayer
local players = game.Players
for i, v in pairs(players:GetPlayers()) do
	if v.Name ~= players.LocalPlayer.Name then
		Client:InvokeServer(players.LocalPlayer.BlacklistFolder, v, true)
	end
end
        end)
    end)

    gametab:Toggle("Freeze Water", false, function(arg)
        pcall(function()
            for _,v in pairs(game.Workspace.Water:GetChildren()) do
                v.CanCollide = arg
                end
        end)
    end)

    gametab:Button("Get Blueprints", function()
        pcall(function()
            for _,v in pairs(game.Workspace.Water:GetChildren()) do
                v.CanCollide = true
                end	for i,v in pairs(game.ReplicatedStorage.Purchasables.Structures.BlueprintStructures:GetChildren()) do
                local clone = v:Clone()
                clone.Parent = game.Players.LocalPlayer.PlayerBlueprints.Blueprints
                end
        end)
    end)

    gametab:Line()

    gametab:Button("Leak Items", function()
        pcall(function()
            game.ReplicatedStorage.Purchasables:Clone().Parent = game.Workspace.PlayerModels
        end)
    end)

    gametab:Line()

    gametab:Button("Get Gold Axe", function()
        pcall(function()
            local a=game:GetService("Players").LocalPlayer:GetMouse()a.Button1Down:connect(function(b)Pressing=false end)function GetAxe()if game.Players.LocalPlayer.Character:FindFirstChild("Tool")then return game.Players.LocalPlayer.Character:FindFirstChild("Tool")end end;local c={['GoldAxe']=50,['BasicHatchet']=0.2,['Axe1']=0.55,['Axe2']=0.93,['AxeAlphaTesters']=1.5,['Rukiryaxe']=1.68,['Axe3']=1.45,['AxeBetaTesters']=1.45,['FireAxe']=0.6,['SilverAxe']=1.6,['EndTimesAxe']=10000000,['AxeChicken']=0.1,['CandyCaneAxe']=0}local Pressing=false;local a=game:GetService("Players").LocalPlayer:GetMouse()a.Button1Down:connect(function(b)Pressing=false end)a.Button1Down:connect(function(b)Pressing=true;*****(GetAxe())end)function cut(d)local e=game.Players.LocalPlayer:GetMouse().Target;local f=game.Players.LocalPlayer:GetMouse().Hit;local g=e.CFrame:pointToObjectSpace(f.p).Y+e.Size.Y/2;if e.Parent:WaitForChild("CutEvent",0.1)then game.ReplicatedStorage.Interaction.RemoteProxy:FireServer(e.Parent.CutEvent,{["cuttingClass"]="Axe",["cooldown"]=0,["hitPoints"]=c[d.ToolName.Value],["sectionId"]=e.ID.Value,["tool"]=d,["faceVector"]=Vector3.new(-1,0,0),["height"]=g})end end;function *****(d)for h=1,100 do if Pressing==true then cut(d)end end end
        end)
    end)

    gametab:Label("Teleports")
    gametab:Line()

    gametab:Button("Teleport to base", function()
        pcall(function()
            for i,v in pairs(game.Workspace.Properties:GetChildren()) do
                if v.Owner.Value == game.Players.LocalPlayer then
                    game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.OriginSquare.CFrame
                end
            end
        end)
    end)

    gametab:Button("Teleport your wood to you", function()
        pcall(function()
            for _, Log in pairs(game.Workspace.LogModels:GetChildren()) do
                if Log.Name:sub(1,6) == "Loose_" and Log:findFirstChild("Owner") then
                    if Log.Owner.Value == game.Players.LocalPlayer then
                        Log:MoveTo(game.Players.LocalPlayer.Character.Torso.Position + Vector3.new(0,20,0))
                    end
                end
            end
        end)
    end)
end

if game.PlaceId == 402122991 then
    local gametab = s:Tab("Game")
    gametab:Label("Redwood Prison")
    gametab:Line()
    gametab:Button("Arrest All", function()
        pcall(function()
            local Player = game.Players.LocalPlayer
            wait(0.5)
            for i,v in pairs(game.Teams.Fugitives:GetPlayers()) do
            repeat
            wait()
            Player.Character.HumanoidRootPart.CFrame = v.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 1)
            until v.Team.Name ~= "Fugitives"
            end
            for _, v in pairs(game.Players:GetChildren()) do
                game.Workspace.resources.RemoteEvent:FireServer("cuff", v)
            end
        end)
    end)
    
    gametab:Button("Destroy Doors", function()
        pcall(function()
            game.Workspace.AllDoors:Destroy()
        end)
    end)

    gametab:Label("OP")
    gametab:Line()

    gametab:Button("Get All Tools", function()
        pcall(function()
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M1014")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "SPAS-12")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Makrov")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Dragunov")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "ACR")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "L86A2")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M60")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Beretta M9")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "UMP-45")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "AK47-U")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Revolver")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M16")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "S&W 638")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M14")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "AK47")
            game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M98B")
        end)
    end)

    gametab:Button("Give Fake Id", function()pcall(function()
        game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Fake ID Card")
    end)end)

    gametab:Button("Gun Mods (kinda buggy)", function()
        pcall(function()
            for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
                v:Destroy()
             end
             
             for i, v in pairs(getgc(true)) do
                 if type(v) == "table" and rawget(v, "isGun") and v.isGun == true then
                     v.maxAmmo = math.huge
                     v.coolDown = 0.5
                     v.reloadTIme = 0
                     v.damage = math.huge
                 end
             end
             
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M1014")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "SPAS-12")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Makrov")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Dragunov")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "ACR")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "L86A2")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M60")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Beretta M9")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "UMP-45")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "AK47-U")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "Revolver")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M16")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "S&W 638")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M14")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "AK47")
              game.Workspace.resources.RemoteFunction:InvokeServer("giveItem", "M98B")
        end)
    end)

    gametab:Button("Kill All", function()
        pcall(function()
            for _, v in pairs(game.Players:GetChildren()) do
                game.Workspace.resources.RemoteEvent:FireServer("dealDamage", v.Character.Humanoid, 100)
            end
        end)
    end)

    gametab:Button("Remove Hats", function()
        pcall(function()
            workspace.resources.RemoteEvent:FireServer("removeHats")
        end)
    end)

    gametab:Button("Taze All (friendly fire is off)", function()
        pcall(function()
            for _, v in pairs(game.Players:GetChildren()) do
                game.Workspace.resources.RemoteEvent:FireServer("tase", v)
            end
        end)
    end)

    gametab:Label("Teleports")
    gametab:Line()
    gametab:Button("Cells", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-2.1252234, 3.99408817, 38.6809654))
    end)
    gametab:Button("Vents", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(45.8967972, 17, 88.6420212))
    end)
    gametab:Button("Helipad", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(263.467377, 6.9100132, 113.983261))
    end)
    gametab:Button("Jail tops", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(105.896927, 34, 12.4054184))
    end)
    gametab:Button("Courtyard", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(243.07106, 2.3200254, -80.9014206))
    end)
    gametab:Button("Lunch Room", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(4.08053064, 4, -144.190895))
    end)
    gametab:Button("Kitchen", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-49.4526825, 4, -122.646904))
    end)
    gametab:Button("Security room", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(66.4363861, 4, 4.59404564))
    end)
    gametab:Button("Cake", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(108.500664, 4, -27.2045383))
    end)
    gametab:Button("Prison Front", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(150.264099, 4, -230.023178))
    end)
    gametab:Button("ATV", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-2.77235317, 5.5, -279.359253))
    end)
    gametab:Button("Watch Tower", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(178.239044, 44.9900742, -211.372543))
    end)
    gametab:Button("Watch Tower 2", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(121.033882, 25.9895439, -325.773987))
    end)
    gametab:Button("Waterfall", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(526.5802, 112.403442, -243.040665))
    end)
    gametab:Button("Car Spawner", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-320.428406, -23.989994, -808.608337))
    end)
    gametab:Button("Mercinary Shed", function()
        game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-618.375488, -24.7882366, -333.008667))
    end)
end

if game.PlaceId == 4872321990 then
    local gametab = s:Tab("Game")
    s:Label("Roblox Islands")
    s:Line()
    gametab:TextBox("Amount", function(arg)
        _G.ROBLOXISLANDSAMOUNT = arg
    end)

    gametab:Dropdown("Items", {"Stone Totem"; "Iron Totem"; "Coal Totem"; "Clay Totem"; "Wheat Totem"; "Potato Totem"; "Carrot Totem"; "Tomato Totem"; "Onion Totem"; "Starfruit Totem"; "Tomato Seeds"; "Potato Seeds"; "Carrot Seeds"; "Onion Seeds"; "Grape Seeds"; "Sapling"; "Pine Sapling"; "Maple Sapling"; "Birch Sapling"; "Hickery Sapling"; "Avacado Sapling"; "Grass Block"; "Sand Block"; "Gravel"; "Glass Pane"; "Glass Block"; "Carpet"; "Red Rug"}, function(arg)
        local t = {
            ["Stone Totem"] = 1
        }
    end)
end

if game.PlaceId == 606849621 then
    local gametab = s:Tab("Game")
    gametab:Label("Jailbreak")
    gametab:Line()
    gametab:Button("Join Prisoners (even when full)", function()
        pcall(function()
            local Network;
for i,v in pairs(getgc(true)) do
    if type(v) == "table" and rawget(v, "FireServer") then
        Network = v
    end
end

Network:FireServer("d91dba92", "Prisoner") 


        end)
    end)

    gametab:Button("Join Police", function()
        pcall(function()
            local Network;
            for i,v in pairs(getgc(true)) do
                if type(v) == "table" and rawget(v, "FireServer") then
                    Network = v
                end
            end
            
            Network:FireServer("d91dba92", "Police") 
                    
        end)
    end)

    gametab:Toggle("***** the sewer hatches", false, function(arg)
        pcall(function()
            _G.fuckingaroundwiththesewers = arg

            local Network;
for i,v in pairs(getgc(true)) do
    if type(v) == "table" and rawget(v, "FireServer") then
        Network = v
    end
end

spawn(function()
    while true do
        if _G.fuckingaroundwiththesewers == true then
            wait()
            Network:FireServer("f3f896bf", "SewerHatch", game:GetService("Workspace").EscapeRoutes.SewerHatches.StuckInPrisonTutorialHatch1.SewerHatch) 
        end
    end
end)
        end)
    end)

    gametab:Button("Remove Fences", function()
        pcall(function()
            for i,v in pairs(game:GetService("Workspace"):GetChildren()) do
                if v.Name == "FencePost" then
                    v:Destroy()
                end
                if v.Name == "BarbedWire" then
                    v:Destroy()
                end
            end
        end)
    end)

    gametab:Button("Remove Junk", function()
        pcall(function()
            for i,v in pairs(game:GetService("Workspace"):GetChildren()) do
                if v.Name == "Streetlights" then
                    v:Destroy()
                end
                if v.Name == "PalmTree" then
                    v:Destroy()
                end
                if v.Name == "Turbine" then
                    v:Destroy()
                end
                if v.Name == "Stopsigns" then
                    v:Destroy()
                end
                if v.Name == "PineTrees" then
                    v:Destroy()
                end
                if v.Name == "PineTrees" then
                    v:Destroy()
                end
            end
        end)
    end)

    gametab:Textbox("Spawn Car", function(arg)
        pcall(function()
local Network

for i,v in pairs(getgc(true)) do
    if type(v) == "table" and rawget(v, "FireServer") then
        Network = v
    end
end

Network:FireServer("ee19de02", "Chassis", arg)
        end)
    end)
end

local visuals = s:Tab("Visuals")
visuals:Label("Visuals")

visuals:Toggle(
    "First Person",
    lp.CameraMode == "LockFirstPerson",
    function(arg)
        pcall(
            function()
                local blabla
                if arg == true then
                    blabla = "LockFirstPerson"
                elseif not arg == true then
                    blabla = "Classic"
                end
                lp.CameraMode = blabla
            end
        )
    end
)
visuals:Line()
visuals:Label("FOV")
visuals:Slider(
    "FOV",
    1,
    120,
    w.Camera.FieldOfView,
    function(arg)
        pcall(
            function()
                w.Camera.FieldOfView = arg
            end
        )
    end
)
visuals:Label("ESP - kinda buggy", false)

local camera = game:GetService("Workspace").CurrentCamera
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local LocalPlayer = game:GetService("Players").LocalPlayer
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
local Paused = true
local slaveWork = false

function *****()
        TaggedPlayers = { }
LinedPlayers = { }
PlayerNames = { }

function WorldToScreen(part, idx)
if part ~= nil then
RootPos = part.position
scr, vis = camera:WorldToScreenPoint(RootPos)
if vis then
TaggedPlayers[idx].Visible = true
LinedPlayers[idx].Visible = true
return Vector2.new(scr.x, scr.y)
else
TaggedPlayers[idx].Visible = false
LinedPlayers[idx].Visible = false
return Vector2.new(0, 0)
end
else
TaggedPlayers[idx].Visible = false
LinedPlayers[idx].Visible = false
return Vector2.new(0, 0)
end
end

local function has_value (tab, val)
   for index, value in ipairs(tab) do
       if value == val then
           return true
       end
   end
   return false
end

local function cleartb(t)
for k in pairs (t) do
t [k] = nil
end
end

local function removeESP(t)
for k in pairs (t) do
t[k].Remove(t[k])
end
end

function Init()
Paused = false
removeESP(TaggedPlayers)
removeESP(LinedPlayers)
cleartb(LinedPlayers)
cleartb(TaggedPlayers)
cleartb(PlayerNames)
Paused = true
end

function LoadESP()
for i,v in pairs(game:GetService("Players"):GetChildren()) do
if game:GetService("Workspace"):FindFirstChild(v.Name) ~= nil then
if not has_value(PlayerNames, v.Name) then
table.insert(LinedPlayers, Drawing.new("Line"))
table.insert(TaggedPlayers, Drawing.new("Text"))
table.insert(PlayerNames, v.Name)
if v.Name ~= LocalPlayer.Name then
TaggedPlayers[i].Text = v.Name
TaggedPlayers[i].Size = 14.0
TaggedPlayers[i].Color = v.TeamColor.Color
TaggedPlayers[i].Outline = true
TaggedPlayers[i].Center = true

LinedPlayers[i].Thickness = 1.6
LinedPlayers[i].Color = v.TeamColor.Color

Loc = WorldToScreen(v.Character:FindFirstChild("HumanoidRootPart"), i)

LinedPlayers[i].From = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y - 2)
LinedPlayers[i].To = Loc
TaggedPlayers[i].Position = Loc
end
else
Loc = WorldToScreen(v.Character:FindFirstChild("HumanoidRootPart"), i)
LinedPlayers[i].From = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y - 2)
LinedPlayers[i].To = Loc
TaggedPlayers[i].Position = Loc
end
end
end
end

Init()

Players.PlayerAdded:connect(function(player)
Paused = false
removeESP(TaggedPlayers)
removeESP(LinedPlayers)
cleartb(LinedPlayers)
cleartb(TaggedPlayers)
cleartb(PlayerNames)
Paused = true
end)

Players.PlayerRemoving:connect(function(player)
Paused = false
removeESP(TaggedPlayers)
removeESP(LinedPlayers)
cleartb(LinedPlayers)
cleartb(TaggedPlayers)
cleartb(PlayerNames)
Paused = true
end)
    end

visuals:Toggle("ESP", false, function(t)
    pcall(function()
        Paused = t
        if slaveWork == false then
            *****()
            slaveWork = true
        end
    end)
end)

RunService.RenderStepped:connect(function()
    if Paused then
    LoadESP()
    end
end)


-------------------------------------------------------
local character = s:Tab("Character")

local Player = game:GetService'Players'.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

Player.CharacterAdded:Connect(function(Char)
  Character = Char
end)

local humanoid = Character.Humanoid

character:Label("Character") 

Lua online compiler

Write, Run & Share Lua code online using OneCompiler's Lua online compiler for free. It's one of the robust, feature-rich online compilers for Lua language, running the latest Lua version 5.4. Getting started with the OneCompiler's Lua editor is easy and fast. The editor shows sample boilerplate code when you choose language as Lua and start coding.

Taking inputs (stdin)

OneCompiler's Lua online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Lua program which takes name as input and prints hello message with your name.

name = io.read("*a")
print ("Hello ", name)

About Lua

Lua is a light weight embeddable scripting language which is built on top of C. It is used in almost all kind of applications like games, web applications, mobile applications, image processing etc. It's a very powerful, fast, easy to learn, open-source scripting language.

Syntax help

Variables

  • By default all the variables declared are global variables
  • If the variables are explicitly mentioned as local then they are local variables.
  • Lua is a dynamically typed language and hence only the values will have types not the variables.

Examples

-- global variables
a = 10

-- local variables

local x = 30
Value TypeDescription
numberRepresents numbers
stringRepresents text
nilDifferentiates values whether it has data or not
booleanValue can be either true or false
functionRepresents a sub-routine
userdataRepresents arbitary C data
threadRepresents independent threads of execution.
tableCan hold any value except nil

Loops

1. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while(condition)
do
--code
end

2. Repeat-Until:

Repeat-Until is also used to iterate a set of statements based on a condition. It is very similar to Do-While, it is mostly used when you need to execute the statements atleast once.

repeat
   --code
until( condition )

3. For:

For loop is used to iterate a set of statements based on a condition.

for init,max/min value, increment
do
   --code
end

Functions

Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increase re-usuability and modularity.

optional_function_scope function function_name( argument1, argument2, argument3........, argumentn)
--code
return params with comma seperated
end