Create a working GUI with MoonLIB!

Using MoonLIB create an awesome script!

Step #1 | Load LIB and Create a TAB!

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)

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

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

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)

Last updated