Nelqz Hub
Scripts & Utilities
Leon UI Library Docs
A lightweight Roblox UI library for script hubs, written in Luau. Everything here comes from the official example script. Repository ↗
Getting started
Load the library, then set the theme before you create a window.
local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/nelqz/leon-ui-library/refs/heads/main/leon-ui-library-open.luau"))()
Library.Theme.Accent = Color3.fromRGB(255, 255, 255)
Window
Library:CreateWindow({...}) returns the window object. Options used in the example:
Name: window titleKeybind: key that opens and closes it (Enum.KeyCode.RightShift)LauncherandLauncherText: show a launcher button with short textAutoOpen: open on loadBlur: blur the background while openSize: aUDim2, e.g.UDim2.fromScale(0.7, 0.75)
Tabs and sections
Window:CreateTab(name)creates a tabTab:CreateSection(name)adds a titled sectionTab:Select()switches to that tab
Elements
Create them on a tab, e.g. Main:CreateButton({...}). Each returns an object you can update later.
Label
CreateLabel(text) · Set(text)
Button
Name, Callback() · SetText(text)
Toggle
Name, Default, Callback(on) · Set(bool), Get()
Slider
Name, Min, Max, Step, Default, Suffix, Callback(value) · Set(n), Get()
Dropdown
Name, Options, Default, Callback(value) · SetOptions(list), Set(value), Get()
Input
Name, Default, Placeholder, Callback(text) · Set(text), Get()
Keybind
Name, Default, Callback() · Set(key), Get()
The example also calls Toggle:Set(false, true) and Slider:Set(25, true) with a second argument. It does not say what that does, so check the library source before relying on it.
Window controls
Window:Notify(text, seconds)shows a notificationWindow:SetBlur(on)toggles the blurWindow:SetOpen(open)opens or closes the windowWindow:Toggle()flips open and closedWindow:Destroy()removes the UI (good for an Unload button)
Full example
local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/nelqz/leon-ui-library/refs/heads/main/leon-ui-library-open.luau"))()
Library.Theme.Accent = Color3.fromRGB(255, 255, 255)
local Window = Library:CreateWindow({
Name = "My Hub",
Keybind = Enum.KeyCode.RightShift,
LauncherText = "MH",
Launcher = true,
AutoOpen = true,
Blur = true,
Size = UDim2.fromScale(0.7, 0.75),
})
local Main = Window:CreateTab("Main")
local Settings = Window:CreateTab("Settings")
Main:CreateSection("Elements")
local Label = Main:CreateLabel("Status: idle")
local Button = Main:CreateButton({
Name = "Click me",
Callback = function()
Label:Set("Status: clicked")
Window:Notify("Button clicked", 3)
end,
})
local Toggle = Main:CreateToggle({
Name = "Toggle",
Default = false,
Callback = function(on)
print("Toggle", on)
end,
})
local Slider = Main:CreateSlider({
Name = "Slider",
Min = 0,
Max = 100,
Step = 1,
Default = 50,
Suffix = "%",
Callback = function(value)
print("Slider", value)
end,
})
local Dropdown = Main:CreateDropdown({
Name = "Dropdown",
Options = { "One", "Two", "Three" },
Default = "One",
Callback = function(value)
print("Dropdown", value)
end,
})
local Input = Main:CreateInput({
Name = "Input",
Default = "",
Placeholder = "Type here...",
Callback = function(text)
print("Input", text)
end,
})
local Keybind = Main:CreateKeybind({
Name = "Keybind",
Default = Enum.KeyCode.F,
Callback = function()
print("Keybind pressed")
end,
})
Settings:CreateSection("Window")
Settings:CreateToggle({
Name = "Blur",
Default = true,
Callback = function(on)
Window:SetBlur(on)
end,
})
Settings:CreateButton({
Name = "Close window",
Callback = function()
Window:SetOpen(false)
end,
})
Settings:CreateButton({
Name = "Toggle window",
Callback = function()
Window:Toggle()
end,
})
Settings:CreateButton({
Name = "Go to Main tab",
Callback = function()
Main:Select()
end,
})
Settings:CreateButton({
Name = "Unload",
Callback = function()
Window:Destroy()
end,
})
Button:SetText("Click me!")
Toggle:Set(true)
Toggle:Set(false, true)
Slider:Set(75)
Slider:Set(25, true)
Dropdown:SetOptions({ "A", "B", "C" })
Dropdown:Set("B")
Input:Set("Hello")
Keybind:Set(Enum.KeyCode.G)
print(Toggle:Get(), Slider:Get(), Dropdown:Get(), Input:Get(), Keybind:Get())
Window:Notify("Loaded", 3)