UI library for Roblox executor scripts. You get a window with a sidebar, pages, toggles, sliders, a dashboard, themes, and config saving.
Library by samet. This copy is maintained at samuraa1/MentalityUI.
If you want a full script you can run, open Example.lua. This page is the short version.
local Library = loadstring(game:HttpGet(
"https://raw.githubusercontent.com/samuraa1/MentalityUI/main/Library.lua"
))()Themes and configs already exist inside the library. Load these two only if you want the extra sections (preset list, custom theme files, autoload):
local ThemeManager = loadstring(game:HttpGet(
"https://raw.githubusercontent.com/samuraa1/MentalityUI/main/ThemeManager.lua"
))()
local SaveManager = loadstring(game:HttpGet(
"https://raw.githubusercontent.com/samuraa1/MentalityUI/main/SaveManager.lua"
))()Build the window, add a page, add a section, add a toggle, then call Init. Init has to be last, after every page is created.
local Window = Library:Window({
Name = "My Hub",
SubName = "Game name",
Logo = "1234567890", -- asset id, numbers only
})
Window:Category("Main")
local Main = Window:Page({
Name = "Main",
Icon = "gamepad-2", -- Lucide name, "tabler:moon", or an asset id
})
local Section = Main:Section({
Name = "Features",
Icon = "zap",
Side = 1, -- 1 is the left column, 2 is the right
})
Section:Toggle({
Name = "Example",
Flag = "ExampleToggle", -- unique name, used by configs
Default = false,
Callback = function(on)
print(on)
end,
})
local KeybindList = Library:KeybindList("Keybinds") -- optional
Library:CreateSettingsPage(Window, KeybindList)
Window:Init()The logo next to the title is your image. Themes do not recolor it.
local Window = Library:Window({
Name = "My Hub",
SubName = "Subtitle under the title",
Logo = "1234567890",
-- Size = UDim2.fromOffset(940, 860), -- PC default. Mobile default is 520 x 420
-- MobileScale = 0.8,
})A search box sits above the sidebar. It matches tab names, toggles, buttons, sliders, labels, and text boxes. Section names, categories, keybinds, and dropdowns are skipped. A matching control keeps its tab and hides the other controls on that page. A matching tab still shows that whole tab. Empty search shows everything again. There is no API for it.
| Call | What it does |
|---|---|
Window:Category("Main") |
A label in the sidebar |
Window:TabDivider() |
A line between sidebar groups |
Window:Page({ Name, Icon }) |
A normal tab |
Window:DashboardPage({ ... }) |
The welcome tab |
Window:SetOpen(true/false) |
Show or hide the window |
Window:Toggle() |
Open if closed, close if open |
Window:Init() |
Call this once, at the end |
A dashboard is just another tab. AddCard jumps to a page you already created. Create the pages first, then the cards, then Init.
local Dash = Window:DashboardPage({
Name = "Dashboard",
Icon = "layout-dashboard",
WelcomeText = "WELCOME TO",
HubName = "MY HUB",
StatusText = "ready",
Badge = "PLAYER",
GameName = "GAME",
GameDescription = "One line about the game.",
Links = {
{ Icon = "copy", Tooltip = "Copy", Callback = function() end },
},
Stats = {
{ Name = "PING", Icon = "wifi", GetValue = function() return "0 ms" end },
},
Credits = {
{ Name = "Author", Role = "Dev" }, -- drawn above Quick Access
},
})
Dash:AddCard({
Name = "MAIN",
Description = "Open the main tab",
Icon = "gamepad-2",
Tab = MainPage,
})local Section = Page:Section({
Name = "Name",
Icon = "zap",
Side = 1,
})Toggle. Settings is an optional little panel that opens from the gear.
local Toggle = Section:Toggle({
Name = "Feature",
Flag = "Feature",
Default = false,
Tooltip = "Shows on hover",
Callback = function(on) end,
})
local Sub = Toggle:Settings(260)
Sub:Slider({
Name = "Extra",
Flag = "Extra",
Min = 0,
Max = 10,
Default = 5,
Callback = function(value) end,
})Slider, dropdown, list.
Section:Slider({
Name = "Speed",
Flag = "Speed",
Min = 0,
Max = 100,
Default = 16,
Decimals = 0,
Suffix = "",
Callback = function(value) end,
})
Section:Dropdown({
Name = "Mode",
Flag = "Mode",
Items = { "A", "B" },
Default = "A",
Search = true,
Callback = function(value) end,
})
Section:Dropdown({
Name = "Tags",
Flag = "Tags",
Items = { "One", "Two", "Three" },
Default = { "One" },
Multi = true, -- adds Select All and Select Nothing
Callback = function(list) end,
})
Section:Listbox({
Flag = "List",
Items = { "One", "Two" },
Default = "One",
Multi = false,
Callback = function(value) end,
})The slider fill and the knob use the current accent color.
The rest:
Section:Button({ Name, Icon, Callback })Section:Label("text")and then:Colorpicker({ ... })on that labelSection:Keybind({ Name, Flag, Default = Enum.KeyCode.RightShift, Callback })Section:Textbox({ Flag, Placeholder, Finished, Callback })Section:Divider()orSection:Divider("Label")
Flag is the save name. Two controls must not share one. You can read the current value any time from Library.Flags.YourFlag.
On a slider, click the number if you want to type it.
Finished = true on a textbox means the value updates when you press Enter. Finished = false updates on every key.
local KeybindList = Library:KeybindList("Keybinds")
local Settings = Library:CreateSettingsPage(Window, KeybindList)That page has the theme list, accent colors, font, transparency, DPI, the floating button, Anonymous Mode, the custom cursor, the menu key, and a config list (if the executor can read and write files).
Anonymous Mode hides the dashboard name and avatar and shows a hat-glasses icon in the accent color. The flag is AnonymousMode. Turning it off restores the display name and the thumbnail.
Pick Halloween in the theme list for the orange window. Pumpkins, ghosts, and a few other icons fall inside the window. Any other theme goes back to the normal dark look and the icons stop.
Plain names are Lucide icons, loaded through Molto. Other packs use a prefix:
tabler:moon, ph:house, heroicons:home, fluent:home, solar:bolt, material:home
A number, or rbxassetid://..., still works. The first time a pack is used it downloads that pack.
The sheet opens in the middle of the window and scales with it. The same text is stored in Samuraa1Hub/Changelogs. If the text has not changed, the next launch skips it. Force = true always opens it, which is what a "View changelogs" button should pass. Remember = false never writes the file.
Library:Changelog({
Title = "My Hub",
Text = [[Version: 1.0.0
+ Added a feature
- Removed an old toggle
[!] Fixed a nil path
[?] A note
[*] Updated the farm
[UI]
- Search is in the sidebar
]],
Force = true,
Buttons = {
{ Name = "Discord", Clipboard = "https://discord.gg/example" },
},
})Line tags: [+] add, [-] remove, [!] fix, [?] note, [*] update. A leading + is the same as add. Version: 1.0.0 and [Section] become headers.
You do not have to load ThemeManager or SaveManager. The settings page already has a theme dropdown and config buttons.
Use ThemeManager when you want a theme section with presets, a default theme on startup, and saving your own colors. Presets come from the library. From October 1 through November 15, Halloween is the startup theme until you save a different default. A saved theme file with the same name as a preset is the one that loads. LoadDefault is the same as applying that startup theme, and it does not apply twice.
local TM = loadstring(game:HttpGet(
"https://raw.githubusercontent.com/samuraa1/MentalityUI/main/ThemeManager.lua"
))()
TM:SetLibrary(Library)
TM:SetFolder("MyHubThemes")
TM:BuildThemeSection(Settings)Use SaveManager when you want a config section with autoload. If the page already has Configs from the settings page, this does not add a second one. LoadAutoloadConfig is the same call as LoadAutoload, and autoload runs once. IgnoreThemeSettings() keeps the current colors out of these config files. Flags that start with _ are not written into configs.
local SM = loadstring(game:HttpGet(
"https://raw.githubusercontent.com/samuraa1/MentalityUI/main/SaveManager.lua"
))()
SM:SetLibrary(Library)
SM:SetFolder("MyHubConfigs")
SM:BuildConfigSection(Settings)Set selected as autoload loads that config the next time the UI starts. Colors, keybinds, and multi-selects are saved with the rest.
Library:Notification({
Title = "Done",
Description = "Message",
Duration = 3,
Icon = "1234567890",
})Library:Unload() removes the windows, disconnects what the library created, and puts the normal mouse cursor back. Call it when your script stops.
| File | What it is |
|---|---|
Library.lua |
The UI |
ThemeManager.lua |
Extra theme section |
SaveManager.lua |
Extra config section |
Example.lua |
A full example |
README.md |
This page |
- MentalityUI — samet
- Scripts that use this library — their authors