> For the complete documentation index, see [llms.txt](https://jakep.gitbook.io/moonlegacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jakep.gitbook.io/moonlegacy/tutorials/create-a-working-gui-with-moonlib.md).

# Create a working GUI with MoonLIB!

## Step #1 | Load LIB and Create a TAB!

```lua
local library = loadstring(game:HttpGet('https://raw.githubusercontent.com/jakepscripts/moonlib/main/moonlibv1.lua'))() 
local main = library:CreateWindow("Tutorial", "#19cf83", 9160626035) -- // for the hex i chose green (use google color picker)

main:CreateTab("Home")
```

## Step #2 | Get em buttons.. (+ toggles)

```lua
local library = loadstring(game:HttpGet('https://raw.githubusercontent.com/jakepscripts/moonlib/main/moonlibv1.lua'))() 
local main = library:CreateWindow("Tutorial", "#19cf83", 9160626035)

main:CreateTab("Home")

main:CreateLabel("Label", "Home")

main:CreateButton("Button", "Home", function()
print('btn')
end)

main:CreateToggle("Toggle", "Home", function(togglestate)
    print(togglestate)
end)


```

## Step #3 | Sliders & Dropdowns

```lua
local library = loadstring(game:HttpGet('https://raw.githubusercontent.com/jakepscripts/moonlib/main/moonlibv1.lua'))() 
local main = library:CreateWindow("MoonLIB", "#19cf83", 9160626035)

main:CreateTab("Home")

main:CreateLabel("Label", "Home")

main:CreateToggle("Toggle", "Home", function(togglestate)
    print(togglestate)
 
end)


main:CreateButton("Button", "Home", function()
print('btn')
end)


main:CreateDropdown("Dropdown", "Home", {"Oranges", "Apples", "Grapes", "Cherrys"}, function(arg)
    print(arg)
 
end)


main:CreateSlider("Slider", "Home", 0, 100, function(sliderval)
print(sliderval)
end)
```

## BONUS: Step #4 | Create More Tabs/Labels

```lua
local library = loadstring(game:HttpGet('https://raw.githubusercontent.com/jakepscripts/moonlib/main/moonlibv1.lua'))() 
local main = library:CreateWindow("MoonLIB", "#19cf83", 9160626035)

main:CreateTab("Home") 
main:CreateTab("Tab")

-- // home tab
main:CreateLabel("Label", "Home")

main:CreateToggle("Toggle", "Home", function(togglestate)
    print(togglestate)
end)


main:CreateButton("Button", "Home", function()
print('btn')
end)


main:CreateDropdown("Dropdown", "Home", {"Oranges", "Apples", "Grapes", "Cherrys"}, function(arg)
    print(arg)
 
end)


main:CreateSlider("Slider", "Home", 0, 100, function(sliderval)
print(sliderval)
end)

main:CreateLabel("another label", "Home")

main:CreateButton("button again", "Home", function()
print('btn')
end)

-- // the tab's tab

main:CreateButton("another button", "Tab", function()
print('btn')
end)

main:CreateToggle("another toggle", "Tab", function(togglestate)
    print(togglestate)
end)

```
