Join Discord

UI Library Documentation

The official UI framework for all Roblox Enhanced scripts - providing a consistent, modern interface for every script published on the platform.

Overview

The Roblox Enhanced UI Library is the official UI framework for all Roblox Enhanced scripts. Every script published on our platform must use this library to ensure consistency and quality across all user interfaces. It provides a modern, sleek design with easy-to-use components for building complex user interfaces.

Getting Started

Load the library at the top of your script:

Lua
if not EnhancedUI then EnhancedUI = loadstring(game:HttpGet("https://renhanced.deitsuki.fr/uilib"))() end

Create a window:

Lua
local window = EnhancedUI.Window.new({title = "My Menu"})

Create tabs and add components:

Lua
local mainTab = window:CreateTab({name = "Main"})
local button = mainTab:CreateButton({text = "Click Me", callback = function() print("Button clicked!") end})

Window Class

The Window class represents the main UI window.

Window.new({title})

Creates a new window with the specified title.

Parameters: title (string) — The title of the window Returns: Window object

window:CreateTab({name})

Creates a new tab in the window.

Parameters: name (string) — The name of the tab Returns: Tab object

window:ChangeTab(name)

Switches to the specified tab.

Parameters: name (string) — The name of the tab to switch to

window:SendNotification({text, duration})

Displays a notification message.

Parameters: text (string) — The notification message text duration (number) — How long to display it (seconds)

window:Toggle()

Toggles the visibility of the window.

window:Destroy()

Destroys the window and cleans up resources.

Tab Class

The Tab class represents a tab within a window, containing various UI components.

tab:CreateTitle({text})

Creates a title element.

Parameters: text (string) — The title text Methods: :SetText(newText) — Sets the title text

tab:CreateText({text})

Creates a text element.

Parameters: text (string) — The text to display Methods: :SetText(newText) — Updates the text

tab:CreateButton({text, callback})

Creates a button.

Parameters: text (string) — Button label callback (function) — Called on click Methods: :SetText(newText), :SetCallback(fn), :Trigger()

tab:CreateToggle({text, callback, default})

Creates a toggle switch.

Parameters: text (string), callback (function), default (boolean) Methods: :Set(state), :Get(), :SetText(t), :SetCallback(fn)

tab:CreateInput({text, callback, default})

Creates a text input field.

Parameters: text (string), callback (function), default (string) Methods: :Set(content), :Get(), :SetText(placeholder), :SetCallback(fn)

tab:CreateDropdown({text, items, default, callback})

Creates a dropdown selection.

Parameters: text (string), items (table), default (string), callback (function) Methods: :Set(item), :Get(), :SetItems(items, idx), :SetText(t), :SetCallback(fn)

tab:CreateMultiSelect({text, items, default, callback})

Creates a multi-select dropdown.

Parameters: text (string), items (table), default (table), callback (function) Methods: :Set(item, selected), :Get(), :SetItems(items, selected), :SetText(t), :SetCallback(fn)

All components expose a :Destroy() method to remove them from the UI.

Components

Detailed reference for each UI component with examples.

Button

A clickable element that fires a callback when pressed.

  • SetText(newText) — Sets the button label
  • SetCallback(fn) — Replaces the click handler
  • Trigger() — Fires the callback programmatically
  • Destroy() — Removes the button
Lua
local button = tab:CreateButton({text = "Activate", callback = function()
    print("Button activated!")
end})
button:SetText("Deactivate")  -- Change text later

Toggle

A switch for enabling or disabling a feature.

  • Set(newValue) — Sets the toggle state
  • Get() — Returns current state (boolean)
  • SetText(newText) — Updates the label
  • SetCallback(fn) — Replaces the change handler
  • Destroy() — Removes the toggle
Lua
local toggle = tab:CreateToggle({text = "Auto Farm", default = false, callback = function(state)
    if state then startFarming() else stopFarming() end
end})
print("Current state: " .. tostring(toggle:Get()))  -- false

Input

A text field for user string entry.

  • Set(newContent) — Sets the field value
  • Get() — Returns the current text
  • SetText(placeholder) — Updates the placeholder
  • SetCallback(fn) — Replaces the change handler
  • Destroy() — Removes the input
Lua
local input = tab:CreateInput({text = "Enter username", default = "Player123", callback = function(text)
    print("Username entered: " .. text)
end})
input:Set("NewPlayer")  -- Change value programmatically

Dropdown

A single-selection dropdown menu.

  • Set(newItem) — Selects an item by value or index
  • Get() — Returns {value, index}
  • SetItems(newItems, idx) — Replaces the item list
  • SetText(newText) — Updates the label
  • SetCallback(fn) — Replaces the change handler
  • Destroy() — Removes the dropdown
Lua
local dropdown = tab:CreateDropdown({text = "Difficulty", items = {"Easy", "Medium", "Hard"}, default = 1, callback = function(selected, index)
    print("Selected: " .. selected .. " at index " .. index)
end})
dropdown:Set("Hard")  -- Select "Hard"
print(dropdown:Get().value .. ", " .. dropdown:Get().index)  -- Hard, 3

Multi-Select

A dropdown allowing multiple simultaneous selections.

  • Set(itemText, isSelected) — Sets an item's selection state
  • Get() — Returns a table of all selected items
  • SetItems(newItems, selected) — Replaces the item list
  • SetText(newText) — Updates the label
  • SetCallback(fn) — Replaces the change handler
  • Destroy() — Removes the multi-select
Lua
local multiselect = tab:CreateMultiSelect({text = "Features", items = {"Auto", "ESP", "Speed"}, default = {"ESP"}, callback = function(item, selected, allSelected)
    print(item, "is now", selected and "selected" or "deselected")
    print("All selected:", allSelected)
end})
local selected = multiselect:Get()  -- Table of selected items

Title and Text

Display-only elements for labelling sections or showing information.

  • SetText(newText) — Updates the displayed text
  • Destroy() — Removes the element
Lua
local title = tab:CreateTitle({text = "Settings Panel"})
local text  = tab:CreateText({text = "Adjust your preferences below."})
title:SetText("Advanced Settings")  -- Update title later

Notifications

The notification system displays temporary messages in the bottom-right corner of the screen.

Lua
window:SendNotification({text = "This is a notification!", duration = 5})

Examples

Basic Window with Button

Lua
if not EnhancedUI then EnhancedUI = loadstring(game:HttpGet("https://renhanced.deitsuki.fr/uilib"))() end

local window = EnhancedUI.Window.new({title = "My Script"})
local mainTab = window:CreateTab({name = "Main"})

local clickCount = 0
local button = mainTab:CreateButton({text = "Click Me", callback = function()
    clickCount = clickCount + 1
    button:SetText("Clicked " .. clickCount .. " times")
end})

Toggle and Input

Lua
local toggle = mainTab:CreateToggle({text = "Enable Feature", callback = function(state)
    print("Feature enabled:", state)
end, default = false})

local input = mainTab:CreateInput({text = "Enter name", callback = function(text)
    print("Name entered:", text)
end, default = "Default Name"})

Dropdown Selection

Lua
local options = {"Option 1", "Option 2", "Option 3"}
local dropdown = mainTab:CreateDropdown({text = "Choose Option", items = options, default = 1, callback = function(selected, index)
    print("Selected:", selected, "Index:", index)
end})

Multi-Select

Lua
local items = {"Item A", "Item B", "Item C"}
local multiselect = mainTab:CreateMultiSelect({text = "Select Items", items = items, callback = function(item, selected, allSelected)
    print(item, "is now", selected and "selected" or "deselected")
end})

Notification

Lua
window:SendNotification({text = "Script loaded successfully!"})