local _, library = pcall(loadstring(game:HttpGet("https://raw.githubusercontent.com/TrixAde/Osmium/main/OsmiumLibrary.lua")))
library:CreateWindow(title: string) -> Window
local window = library:CreateWindow("Osmium UI Library")
Window:GetCurrentState() -> number
local state = window:GetCurrentState()
if state == library.WindowState.Destroyed then
print("Window closed")
end
Possibles values :
library.WindowState.Destroyed
: the window is closedlibrary.WindowState.Opened
: the window is openedlibrary.WindowState.Minimized
: the window is opened and minimized
Window:Destroy()
window:Destroy()
Window:CreateTab(name: string) -> Tab
local tab = window:CreateTab("Demo Tab")
Tab:CreateLabel(text?: string, description?: string) -> TextLabel
local label = tab:CreateLabel("Title Exemple","Description Exemple")
TextLabel:SetTitle(text?: string) -> TextLabel
label:SetTitle("Title")
TextLabel:SetDescription(text?: string) -> TextLabel
label:SetDescription("Description")
Tab:CreateToggle(text: string, default?: boolean, callback?: function (boolean)) -> Toggle
local toggle = tab:CreateToggle("Toggle Exemple", false, function (value)
print("Value changed to", value)
end)
Tab:CreateTextBox(text: string, callback?: function (string), placeholder?: string) -> TextBox
local textbox = tab:CreateTextbox("TextBox Exemple", function(value)
print("Value = ", value)
end, "Write Here")
Tab:CreateButton(text: string, callback?: function ()) -> Button
local button = tab:CreateButton("Button Exemple", function()
print("Clicked")
end)
Tab:CreateSlider(text: string, minvalue: number, maxvalue: number, callback?: function ()) -> Slider
local slider = tab:CreateSlider("Slider Exemple",0,100,function(arg)
print(arg)
end)
Tab:CreateDropdown(text: string, values?: table, callback?: function ()) -> Slider
local dropdown = tab:CreateDropdown("DropDown Exemple",{"Button 1","Button 2","Button 3"},function(val)
print(val)
end)