Neruvex
Documentation · 1.2.0-dev

Neruvex

A single-file Roblox interface library. Load it, get a window back, build with colon syntax.

Runtime
Roblox client
Distribution
One Lua file
Returns
A ready hub object
lua
local Neruvex = loadstring(game:HttpGet("https://neruvex.lol/neruvex.lua"))()
01

Loading

The script ends with return Hub.new(), so loadstring(...)() hands back a ready window object. The first window never needs .new().

01

Fetch

game:HttpGet downloads the raw source from your host.

02

Compile

loadstring turns the source into a callable chunk.

03

Receive

Calling the chunk returns the hub. Add tabs straight away.

Load methods

lua
local Neruvex = loadstring(game:HttpGet("https://neruvex.lol/neruvex.lua"))()

Requirements

Raw text host

Serve the file as plain text: raw GitHub, a raw paste URL or your own server. An HTML page URL fails to compile.

Client only

The library parents its UI to Players.LocalPlayer.PlayerGui and uses RenderStepped.

Executor only

loadstring and game:HttpGet do not exist in a normal LocalScript. Elsewhere, paste the file into a ModuleScript and use require, which returns the same object.

02

Quick start

Call window, add a tab, add a control. Use colon syntax on the hub, tabs and controls.

lua
local Neruvex = loadstring(game:HttpGet("https://neruvex.lol/neruvex.lua"))()

Neruvex:window("My Hub", "Preparing interface", true, "Sidebar")

local main = Neruvex:addtab("Main", nil, "home")

main:addbutton("Say hello", function()
  print("hello")
end, { Description = "Prints to the output" })

window() mounts the UI. If you skip it, adding the first tab mounts the UI on the next frame.

03

Full example

Every control type, a section, an event hook and a config export in one script.

lua
local Neruvex = loadstring(game:HttpGet("https://neruvex.lol/neruvex.lua"))()

Neruvex:window("My Hub", "Preparing interface", true, "Sidebar")
Neruvex:configure({
  Theme = "Violet",
  PillTitle = "My Hub",
  ToggleKey = "RightShift",
  Size = Vector2.new(560, 470),
})

local main = Neruvex:addtab("Main", nil, "home")
local visuals = Neruvex:addtab("Visuals", nil, "eye")

main:addtoggle("Enabled", false, function(value, control)
  print("enabled:", value)
end, { Flag = "enabled", Description = "Master switch" })

main:addslider("Speed", 0, 100, 16, function(value)
  print("speed:", value)
end, { Flag = "speed", Step = 1 })

main:adddropdown("Mode", { "Safe", "Normal", "Fast" }, "Normal", function(value)
  print("mode:", value)
end, { Flag = "mode" })

main:addinput("Name", "player", function(text)
  print("name:", text)
end, { Flag = "name", Placeholder = "Enter name" })

main:addkeybind("Action key", "F", function(active, control)
  print("action:", active)
end, { Mode = "Toggle" })

local progress = main:addprogress("Loading", 0)
progress:set(60)

local section = visuals:addsection("Advanced")
section:addtoggle("Outlines", true, function(v) print(v) end, { Flag = "outlines" })
section:addselect("Quality", { "Low", "Mid", "High" }, "Mid", function(v) print(v) end, {
  Flag = "quality",
  Descriptions = { Low = "Fastest", Mid = "Balanced", High = "Sharpest" },
})

Neruvex:on("loaded", function()
  Neruvex:notify("My Hub", "Interface ready", 4)
end)

print(Neruvex:exportconfig())
04

Window options

Set options with Neruvex:configure({ ... }), or pass the table to Neruvex.new({ ... }).

Options

KeyDefaultNotes
Title"Neruvex"

Window title and loading-screen heading.

Description"Preparing interface"

Loading-screen subtitle.

LoadingScreenfalse

window() sets this to true unless you pass false.

PillTitle"Neruvex Hub"

Text on the collapsed pill.

Logo"neruvex"

Icon preset name or asset ID.

Theme"Obsidian"

See themes and icons.

SizeVector2.new(560, 470)

Capped to 90% of screen width and 82% of screen height.

SidebarWidth136

Clamped between 120 and 240.

Collapsedfalse

Icon-only sidebar.

Layout"Sidebar"

"Sidebar" or "Tabs" for a horizontal bar.

Visibletrue

When false, the pill is shown instead of the panel.

Transparency0.08

Clamped between 0 and 0.8.

Blur0

Clamped between 0 and 56. Blurs the 3D scene, not the GUI.

ToggleKey"RightShift"

An Enum.KeyCode name.

Animatetrue

Animated gradients on themes that have them.

DisplayOrder90

The pill is +1, the loading screen +2.

Id"NeruvexLibrary<n>"

ScreenGui name. Only honoured in Neruvex.new.

ParentPlayerGui

Only honoured in Neruvex.new.

window(title, description, loadingScreen, layout)

A convenience wrapper over configure and mount. The loading screen runs for up to about four seconds and the main panel appears when it ends. Pass false as the third argument to skip it.

Additional windows

lua
local Second = Neruvex.new({ Id = "MySecondHub", Title = "Second" })
05

Tabs

Neruvex:addtab(title, position?, icon?)

Returns a tab. A nil position appends. The icon is a preset name or asset ID and defaults to "home".

tab:select()

Show this tab.

tab:rename(title)

Change the title.

tab:seticon(icon)

Change the icon.

tab:moveto(position)

Reorder the tab.

tab:remove()

Remove the tab and all of its controls.

Neruvex:selecttab(ref)

Select by tab object, index or title.

Neruvex:gettabs()

A copy of the tab list.

06

Controls

Every add* call returns a control. The options table is always optional.

Constructors

CallCallback receives
tab:addbutton(title, fn, options)

(control)

tab:addlabel(title, options)

No callback.

tab:addparagraph(title, body, options)

No callback.

tab:addtoggle(title, value, fn, options)

(boolean, control)

tab:addinput(title, value, fn, options)

(string, control). Fires when focus is lost.

tab:addslider(title, min, max, value, fn, options)

(number, control). Snapped to Step.

tab:adddropdown(title, items, value, fn, options)

(item, control)

tab:addselect(title, items, value, fn, options)

(item, control). A segmented selector.

tab:addprogress(title, value, options)

A disabled 0 to 100 slider. Update it with :set().

tab:addkeybind(title, key, fn, options)

(active, control)

tab:addsection(title, options)

Returns a section. See below.

Options

KeyApplies toNotes
Descriptionall

Secondary text.

Flagall

Required for getvalues, getcontrol and config export and import.

Positionall

Insert index. Nil appends.

Visibleall

False hides the row.

Disabledall

True makes it non-interactive.

Stepslider

Increment. Defaults to 1.

Placeholderinput

Text shown when the field is empty.

Descriptionsselect

A table mapping each item to its description.

Modekeybind

"Press" (default), "Toggle" or "Hold".

Sections

addsection returns an object with the same add* methods. Controls created through it are grouped under a header that collapses when clicked. It also provides :setcollapsed(bool), :rename(title) and :remove().

07

Control methods

control:set(value, notify?)

Set the value. The callback fires only if the value changed and notify is not false.

control:get()

The current value.

control:onchange(fn)

Replace the callback.

control:reset(notify?)

Restore the initial value.

control:rename(title)

Change the title.

control:setdescription(text)

Change the description. Only works if one was set at creation.

control:setvisible(bool)

Show or hide the row.

control:setenabled(bool)

Enable or disable the control.

control:moveto(position)

Reorder within the tab.

control:setrange(min, max, step?)

Sliders only.

control:remove()

Destroy the row.

keybind:rebind(key)

Keybind controls only.

08

Hub methods

window(title, description, loadingScreen, layout)

Configure, mount and optionally run the loading screen.

configure(options)

Update window options.

mount(parent?)

Build the UI. Usually automatic.

setvisible(bool)

Show the panel (true) or the pill (false).

settheme(name)

Switch theme.

setpilltitle(text)

Change the pill text.

setlayout(name)

"Sidebar" or "Tabs".

setcollapsed(bool)

Collapse the sidebar.

notify(title, message, duration?)

Show a toast for 0.5 to 60 seconds, default 4. Returns an item with :close().

bindkey(keyCode, fn)

Register a global hotkey. Returns a connection.

search(query)

Filter control rows by title and description. Pass an empty string to clear.

opensettings()

Open the built-in interface settings tab. The gear icon does the same.

getcontrol(flag)

The control with that flag, or nil.

getvalues()

A table mapping each flag to its value.

registertheme(name, surface, accent)

Add a theme from two Color3 values.

registericon(name, id)

Add an icon preset.

onready(fn)

Runs once the UI is mounted.

destroy()

Remove all UI, connections and blur effects.

09

Events

Subscribe with on. It returns a connection you can disconnect.

lua
local connection = Neruvex:on("loaded", function(hub)
  print("ready")
end)

connection:Disconnect()
EventFires
"loaded"

When the loading screen finishes.

"configloaded"

After importconfig.

"destroy"

At the start of destroy().

10

Config

Export every flagged control to JSON, restore it later, or reset to defaults.

lua
local json = Neruvex:exportconfig()
Neruvex:importconfig(json, false)
Neruvex:resetconfig()
exportconfig()

A JSON string. Only controls with a Flag are saved, plus the theme and pill title.

importconfig(json, fire?)

Validates types and dropdown options and errors on a mismatch. Pass true to also fire callbacks.

resetconfig()

Return all controls to their defaults.

Persisting the string, for example with writefile in an executor, is up to you.

11

Themes and icons

Themes

Obsidian
Graphite
Carbon
Violet
Azure
Rose
Amber
Midnight
Sakura
Espresso
Aurora
Ember
Tidal
Prism

Animated themes. The full list is also available as Neruvex.Themes.

Icons

home
collection
eye
visuals
settings
sidebar
lock
neruvex

Any numeric asset ID or rbxassetid://ID also works. Unknown names raise an error. See Neruvex.Icons.

12

Notes

Callbacks

Run in task.spawn under pcall. Errors print as Neruvex callback: ... and never break the UI.

Initial values

adddropdown and addselect fall back to the first item if the initial value is not in the list. set() errors on unknown items.

Notifications

notify needs a mounted UI. Call it after window(), or inside an onready or loaded handler.

Toggle key

Ignored while a TextBox has focus. Change it in the settings tab or with configure({ ToggleKey = "..." }).

Re-running

Call Neruvex:destroy() before re-running your script to avoid duplicate windows, or give each window a unique Id.