rbimgui-2
version 1.2
by Singularity
https://v3rmillion.net/member.php?action=profile&uid=947830
Singularity#5490
This is a guide on how to code your own user interface using the rbimgui-2 template!
Firstly of all, we need to include the ui-engine like so:
local engine =
loadstring(game:HttpGet("https://raw.githubusercontent.com/Singularity5490
/rbimgui-2/main/rbimgui-2.lua"))()
Create a new window:
Window
local window = engine.new()
<windowClass>function(<windowSettings>)
windowSettings:
name type default
text string “New Window”
size Vector2 Vector2.new(300, 200)
shadow number 10
transparency number 0.2
color Color3 Color3.fromRGB(41, 74,
122)
boardcolor Color3 Color3.fromRGB(21, 22, 23)
rounding number 5
animation number 0.1
position UDim2 UDim2.new(0, 100, 0, 100)
windowClass:
name type description
setPosition <void>function(UDim2) sets position of window
isopen boolean is the window open
close <void>function() close the window
open <void>function() open the window
new <tabClass>function(<tabSetti creates a tab on window and
ngs>) returns tabClass
Tab
tabSettings:
name type default
text string “New Tab”
tabClass:
name type description
show <void>function() opens the tab in the window
new <tabObjectClass>function(< creates a new tab object in
(string)tabObject>) the tab
Tab object
Under each tab, you can put a variety of different objects:
● Label
● Button
● Switch
● Slider
● Color picker
● Dropdown
● Dock
● Folder
Each does differnt things and has a different set of settings.
To create an object do:
tab.new(className, classSettings)
Label
Displays text on tab.
Label settings
name type default
text string “New Label”
color Color3 Color3.new(1, 1, 1)
Label return
name type description
self Instance object of the label
type string label
Destroy <void>function() destroys the object
setText <void>function(string) set text of label
setColor <void>function(Color3) set text color
Button
Fires an event when clicked.
Button settings
name type default
text string “New Button”
color Color3 windowSettings.color
rounding number windowSettings.rounding
Button return
name type description
Destroy <void>function() destroys object
type string button
options table bruh i don’t remembver
getColor <Color3>function() returns button color
self Instance button object
event Event event that will be fired
when clicked
setColor <void>function(Color3) set color of button
eventBlock boolean blocks event callbacks
when enabled
Switch
Fires an event when switch on/off with true/false
Switch settings
name type default
text string “New Switch”
on boolean false
color Color3 windowSettings.color
rounding number windowSettings.rounding
animation number windowSettings.animation
Switch return
name type description
self Instance gui object
type string switch
options table bruh i don’t remembver
set <void>function(boolean) set the switch to
<boolean>
on boolean whether or not is switched
getColor <Color3>function() returns switch color
switch <void>function() switches the switch (same
as clicking)
event Event fires with boolean when
switch is clicked
Destroy <void>function() destroys the object
setColor <void>function(Color3) sets the switch color
eventBlock boolean blocks event callbacks
when enabled
Slider
Slider from min to max value that fires event with number.
Slider options
name type default
text string “New Slider”
size number 150
min number 0
max number 100
value number 0
color Color3 windowSettings.color
rounding number windowSettings.rounding
animation number windowSettings.animation
barcolor Color3 bleached
windowSettings.color
Slider return
name type description
self Instance gui object
type string slider
options table idk
set <void>function(number) sets slider to number
event Event fires with number when
slided
getColor <Color3>function() returns slider color
value number current slider value
Destroy <void>function() destroys object
setColor <void>function(Color3) sets slider color
eventBlock boolean blocks event callbacks
when enabled
Color
Fires an event with Color3 of the chosen color.
Color settings
name type default
text string “New Color Picker”
color Color3 Color3.new(1, 0, 0)
Color return
name type description
visible boolean is the color picker window
visible
type string Color
close <void>function() close the color picker
window
event Event fires with Color3 when a
color is chosen
setPosition <void>function(UDim2) sets position of color
picker window
self Instance gui object
Destroy <void>function() destroys both gui object
and color picker window
set <void>function(Color3> sets color
isopen boolean is the window open?
open <void>function() open the window
get <Color3>function() get color
eventBlock boolean blocks event callbacks
when enabled
Dropdown
Fires an event with chosen object (string).
Dropdown settings
name type default
text string “New Dropdown”
size number 150
color Color3 Color3.fromRGB(32, 59,
97)
rounding number windowSettings.rounding
selectioncolor Color3 Color3.fromRGB(32, 59,
97)
Dropdown return
name type description
Destroy <void>function() destroys gui object and
dropdown window
type string dropdown
close <void>function() closes dropdown window
event Event fires with the chosen
dropdownObject (string)
search <void>function(string) puts (string) in the
dropdown window search
bar
self Instance gui object
visible boolean is the window visible
isopen boolean is the window open
open <void>function() opens dropdown window
new <dropdownObject>functio creates a new
n(name) dropdownObject class
with (name)
eventBlock boolean blocks event callbacks
when enabled
dropdownObject return
name type description
Destroy <void>function() destroy dropdown object
object Instance gui object in dropdown
window
Select <void>function() selects self
selected boolean is this object chosen?
name string name of the object that
appears in the dropdown
window
Dock
Can place tab objects horizontally. Works the exact same way as a tab. Just create a
new dock object and use .new(...) for it just like a tab.
Folder
Folder settings
name type defaut
text string “New Folder”
isopen boolean false
color Color3 windowSettings.color
rounding number windowSettings.rounding
animation number windowSettings.animation
Folder return
name type description
Destroy <void>function() destroys folder and all
objects inside
type string folder
options table idk
close <void>function() close the folder
open <void>function() open the folder
updated Event fires when object as
added to folder
self Instance gui object
getColor <Color3>function() get color of folder
switch <void>function() open/close the folder
new <Promise>function(type(s depending on what type
tring),settings(table)) you use, the return object
of this will have the same
as the objectClass
isopen boolean is folder open?
setColor <void>function(Color3) set folder color
folder.new(class, {...})
Above will return the same as the class will return.. for example if you write “button”,
it will put a button in the folder and return the objects of a button.
We will now code the following GUI using rbimgui-2:
local window = engine.new({ text = "rbimgui demo", color = Color3.new() })
window.open()
local tab = window.new({ text = "main" })
window.new({ text = "examples" })
window.new({ text = "credits" })
tab.show()
local dock1 = tab.new("dock")
local button = dock1.new("button")
button.event:Connect(function()
print("button pressed")
end)
dock1.new("slider", {
size = 100,
min = 100,
max = 200,
value = 120,
color = Color3.new(0.8, 0, 0),
}).event:Connect(function(x)
print("slider value: " .. x)
end)
local folder1 = tab.new("folder", { color = Color3.new(0, 0.6, 0.6) })
folder1.open()
local cp = folder1.new("color", { text = "color 1" })
cp.event:Connect(function(color)
print("color: ", color)
end)
local dropdown1 = folder1.new("dropdown", { text = "dropdown 1", color =
Color3.new(0, 0.6, 0) })
dropdown1.event:Connect(function(name)
print("chosen: " .. name)
endd)
for i = 1, 9 do
dropdown1.new("option " .. i)
end
folder1.new("dropdown", { rounding = 10 })
tab.new("label", { text = "hello world !" })