Your first window
Build a window with sections, controls and callbacks.
Four steps, then a script that uses all of them.
Create the window
Ember.new returns the window. Sections and controls attach to it.
local Ember = loadstring(game:HttpGet('https://rbx.lol/ember.lua'))()
local win = Ember.new({
Title = "Bloxburg Helper",
Subtitle = "v2.1",
Size = Vector2.new(720, 470),
Keybind = Enum.KeyCode.RightControl,
})Title and Subtitle show in the top-left. Keybind hides and shows the
window; it defaults to RightShift. Size defaults to 700 x 452. Every
option is listed under Ember.new.
Add sections
A section is a tab in the left rail. It takes a name and an icon name, and returns the page you put controls on.
local main = win:Section("Main", "home")
local visuals = win:Section("Visuals", "eye")The first section you create is the one shown when the window opens.
Put controls on the section
Controls are methods on the section. Each takes one table of options.
main:Title({ Text = "Movement", Icon = "compass" })
main:Toggle({
Text = "Infinite jump",
Description = "Jump again while already in the air.",
Default = false,
})
main:Slider({
Text = "Walk speed",
Min = 16,
Max = 250,
Default = 16,
Suffix = " studs/s",
})
main:Button({ Text = "Reset speed", ButtonText = "Reset" })Text is the label on the left of the row. Description adds a smaller second
line. There are thirteen controls, and the keys
they all accept are listed under
options every control shares.
Wire up callbacks
Callback runs when the value changes. It gets the new value as its only
argument. A button's callback gets nothing.
main:Toggle({
Text = "Infinite jump",
Callback = function(on)
infiniteJump = on
end,
})Every control that holds a value also returns a handle. Keep it to read or change the value later.
local speed = main:Slider({ Text = "Walk speed", Min = 16, Max = 250, Default = 16 })
print(speed:Get()) --> 16
speed:Set(120) -- moves the knob and fires the callback
speed:Set(120, true) -- moves the knob, skips the callbackPutting it together#
local Ember = loadstring(game:HttpGet('https://rbx.lol/ember.lua'))()
local player = game:GetService("Players").LocalPlayer
local Lighting = game:GetService("Lighting")
local win = Ember.new({
Title = "Bloxburg Helper",
Subtitle = "v2.1",
Keybind = Enum.KeyCode.RightControl,
})
local main = win:Section("Main", "home")
local visuals = win:Section("Visuals", "eye")
main:Title({ Text = "Movement", Icon = "compass" })
local speed = main:Slider({
Text = "Walk speed",
Min = 16,
Max = 250,
Default = 16,
Suffix = " studs/s",
Callback = function(value)
local char = player.Character
local human = char and char:FindFirstChildOfClass("Humanoid")
if human then human.WalkSpeed = value end
end,
})
main:Button({
Text = "Reset speed",
ButtonText = "Reset",
Callback = function() speed:Set(16) end,
})
visuals:Toggle({
Text = "Fullbright",
Description = "Raises the lighting so nothing is dark.",
Default = false,
Callback = function(on)
Lighting.Brightness = on and 3 or 1
end,
})Press RightControl to hide and show it.
Next#
All thirteen controls and the options they share.
Saving settingsOne option per control, and the value survives between sessions.
Lifecycle and cleanupDestroying a window, surviving a respawn, and undoing effects on close.
Full showcaseA much bigger script with every control wired to something in-game.