Galaxy's Hub Library.lua
v1.0.2 Official Available

Galaxy's Hub Script Library

A new script library made by 2 developers.

Quick Documentation

Simple implementation straight to the point.

1 Installation & Loadstring

Load the library directly into your script securely using your preferred executor.

2 Basic Initialization

Call the main function to instantiate the necessary components.

main.lua
local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/Galaxy-BloxYT/Galaxy-s-Hub-Script-Library/refs/heads/main/Library%20engine"))()

Library Documentary

General Documentation

Booting the library

Lets start by getting the key system and a tab + title.

boot_sequence.lua
 -- get the loadstring from the "Get Started" tab. and put it as the first line.
local keySuccess = Library:InitKeySystem({
    UseKeySystem = true,
    Key = "TEST", -- change to your preferred key
    KeySystemTitle = "My Incredible Hub! | Key System", -- key system title
    SaveKey = true, -- to save the key
    FileName = "GalaxysHubLibKeyPlaceholder.key" -- where to save the key and read the key from 
})

if not keySuccess then return end

task.wait(0.70)

local Window = Library.CreateWindow("My Incredible Hub!") -- title
local Tab = Window:CreateTab("General")

Elements

Elements: Buttons, labels, sections...

elements.lua
Tab:AddButton("Placeholder Button", function()
    game.Players.LocalPlayer.Character.Humanoid.Health = 0
end)

Tab:AddLabel("Placeholder label")
Tab:AddSection("Placeholder section")

Interactive Elements

toggles, sliders, dropdowns, color selection, notifications with buttons (optional)...

interactive_elements.lua
local mainToggle = Tab:AddToggle("Placeholder Toggle", false, function(state)
    print("Toggle state:", state)
end)

Tab:AddColorSelection("Color Selection example", Color3.fromRGB(0, 100, 255), function(color)
    print("Color:", color)
end)

Tab:AddButton("Placeholder Button", function()
    game.Players.LocalPlayer.Character.Humanoid.Health = 0
end)

Tab:AddTextBox("Textbox", "Type here...", function(text, enterPressed)
    if enterPressed then
        print("Text:", text)
    end
end)

Tab:AddDropdown(
    "Placeholder Name 1", -- name
    {"Option 1", "Option 2", "Option3"}, -- options
    "Option 1", -- default
    false, -- MultipleChoice, put true and use table.concat(chosen, ", ")
    function(chosen)
        print("you choose:", chosen)
    end
)

Window:Notify("Hello, this is a placeholder notification!", "Description Example", false, { -- put to true to use the buttons...
    ["Noti. button example1"] = function() game.Players.LocalPlayer.Character.Humanoid.Health = 0 end,
    ["Noti. button example2"] = function() game.Players.LocalPlayer.Character.Humanoid.Health = 100 end
})

Tab:AddDropdown(
    "Placeholder Name 2 - MultipleChoice",               -- Dropdown's Name
    {"Option 1", "Option 2", "Option 3", "Option 4"}, -- Current available options
    {"Option 1", "Option 3"},                     -- Default Options
    true,                                -- MultipleChoice (true = more than one)
    function(chosen)
        print("Option selected:", table.concat(chosen, ", ")) -- do not delete the concat.
    end -- you shall use "= chosen" or "(chosen)" to change anything from your script. (like auto farms)
)