Sample.hit UI Library
Professional Roblox UI Library with modern design and powerful features
Installation
Start by loading the library in your Roblox executor:
-- Sample.hit UI Library usage tutorial -- -- ui local library=loadstring(game:HttpGet("https://xor-1-45-25-0.getsample.lol"))() local flags = library.flags -- you can also call flags like this: flags["ur_flag"] = false or anything u want
Installation Notes
- Flags System: Access flags using
flags["flag_name"]syntax - Custom Values: Set flag values programmatically with
flags["ur_flag"] = false
Creating a Window
Create your main window with custom properties:
local window = library:window({ name = "sample", subname = ".hit", menulogo = "rbxassetid://107276976681956", size = UDim2.fromOffset(620, 650) })
Window Properties
- name: Main window title
- subname: Subtitle displayed below main title
- menulogo: Logo URL (supports both raw image links and rbxassetid)
- size: Window dimensions using
UDim2.fromOffset(width, height)
Creating Tabs
Organize your UI with tabs (remember to add a space at the beginning):
-- tabs local Main = window:tab({ name = " main" }) -- please for every tab you make leave a space as the first character local Visuals = window:tab({ name = " visuals" }) local Settings = window:tab({ name = " settings" })
Tab Creation Tips
- Space Required: Always start tab names with a space (
" main", not"main") - Organization: Group related features under appropriate tabs
- Naming: Use descriptive names for better user experience
Creating Sections
Group related elements in sections within tabs:
-- section local v1 = Main:section({name="aimbot"}) -- will create a section at the main tab
Section Properties
- name: Display name for the section
- Parent Tab: Section is created within the specified tab
- Organization: Group related UI elements together
Toggle
Create toggle switches for boolean options that can be turned on or off by the user.
v1:toggle({ name = "aimbot toggle", flag = "any_flag_fr_js_dont_use_same_flags_for_any_ui_elements", default = false, callback = function(Value) -- callback code here end })
Toggle Properties
- name: The display name shown to users for the toggle
- flag: Unique identifier for storing the toggle state (must be unique across all elements)
- default: Initial state of the toggle (
trueorfalse) - callback: Function that executes when the toggle state changes
Slider
Create sliders for numeric values with customizable range and precision.
v1:slider({ name = "fov size", flag = "blehblehluraph", suffix = "px", -- you can delete suffix if you want default = 150, min = 1, max = 1000, interval = 1, -- interval: 1 = goes 1 by 1 | interval: 0.4 = goes 0.4 by 0.4 callback = function(Value) -- callback code here end })
Slider Properties
- name: The display name shown to users for the slider
- flag: Unique identifier for storing the slider value
- suffix: Text displayed after the value (e.g., "px", "%", "°")
- default: Initial value of the slider
- min: Minimum value the slider can reach
- max: Maximum value the slider can reach
- interval: Step size for slider movement (1 = whole numbers, 0.1 = decimals)
- callback: Function that executes when slider value changes
Dropdown
Create dropdown menus for selecting from multiple predefined options or live players.
-- Standard dropdown with predefined items v1:dropdown({ name = "aimbot hitpart", flag = "676767676767", items = {"dih","boobs","sillyfade"}, multi = false, -- you can pick multiple options callback = function(Value) -- callback code here end }) -- Player dropdown (live players) v1:dropdown({ name = "target player", flag = "target_player", playerdropdown = true, -- ignores items and uses live players multi = false, callback = function(Value) -- callback with selected player end })
Dropdown Properties
- name: The display name shown to users for the dropdown
- flag: Unique identifier for storing the selected value
- items: Array of predefined options (ignored if playerdropdown is true)
- multi: Allow multiple selections (true/false)
- playerdropdown: Use live players instead of predefined items
- callback: Function that executes when selection changes
Textbox
Create text input fields for users to enter custom text or values.
v1:textbox({ name = "textbox name", flag = "my_textboxlol", callback = function(val) -- callback code here end })
Textbox Properties
- name: The display name shown to users for the textbox
- flag: Unique identifier for storing the textbox content
- callback: Function that executes when text is entered or changed
- val: The current text content of the textbox (passed to callback)
Color Picker
Create color pickers for selecting colors with hex values or Color3 objects.
v1:colorpicker({ name = "aimbot fov color", -- delete name for colorpicker to be on same line as toggle flag = "blehblehb4", color = Color3.fromHex("#ff8000"), callback = function(Value) -- callback code here end })
Color Picker Properties
- name: The display name (optional - remove to place on same line as toggle)
- flag: Unique identifier for storing the selected color
- color: Default color using
Color3.fromHex("#hexcode")format - callback: Function that executes when color selection changes
- Value: Returns the selected Color3 object to the callback
Keybind
Create keybinds for keyboard shortcuts. Can be placed on the same line as toggles for compact layouts.
-- Standard keybind with name v1:keybind({ name = "aimbot keybind", flag = "blehblehv3", default = nil, display = "aimbot", -- the name of the keybind in the keybindlist callback = function(bool) -- callback code here end }) -- *REMOVE ' name = "aimbot keybind", ' FOR THE KEYBIND TO BE ON THE SAME LINE AS THE TOGGLE* -- v1:keybind({ flag = "blehblehv3", default = nil, display = "aimbot", -- the name of the keybind in the keybindlist callback = function(bool) -- callback code here end })
Keybind Properties
- name: Display name (optional - remove to place on same line as toggle)
- flag: Unique identifier for storing the keybind
- default: Default key (use
Enum.KeyCode.RightControlfor Right Control, etc.) - display: Name shown in the keybind list
- callback: Function that executes when keybind is pressed
- bool: Boolean indicating if keybind is active (passed to callback)
Button
Create clickable buttons that execute functions when pressed.
v1:button({ name = "button name", callback = function() -- callback code here end })
Button Properties
- name: The display text shown on the button
- callback: Function that executes when the button is clicked
- Usage: Perfect for actions like saving settings, testing features, or triggering events
Notifications
Show temporary notification messages to users with customizable duration.
library:notification({text = "this is a test notification", duration = 3})
Notification Properties
- text: The message content to display in the notification
- duration: Time in seconds before notification disappears (3 = 3 seconds)
- Usage: Call using
library:notification()- not tied to specific sections - Position: Notifications appear in the top-right corner of the screen
Configuration System
The library includes a powerful configuration system for saving and loading settings with file management.
local configs = window:tab({ name = "settings" }) local config = configs:section({ name = "settings", side = "right" }) -- Create config config:button({ name = "create config", callback = function() writefile(dir .. flags["config_name_text_box"] .. ".cfg", library:get_config()) library:config_list_update() library:notification({text = "config successfully created", duration = 3}) end }) -- Load config config:button({ name = "load config", callback = function() library:load_config(readfile(dir .. flags["config_name_list"] .. ".cfg")) library:notification({text = "config loaded successfully", duration = 3}) end })
Configuration Features
- Save/Load: Store and retrieve complete UI configurations
- File Format: Uses
.cfgfiles for configuration storage - Directory: Configs stored in
library.directory .. "/configs/" - Management: Create, load, save, delete, and refresh configurations
- Notifications: Automatic feedback for config operations
Utility Functions
Built-in utility functions for common Roblox gameplay tasks like copying game information and rejoining.
-- Copy Job ID config:button({ name = "copy job id", callback = function() setclipboard(game.JobId) end }) -- Copy Game ID config:button({ name = "copy game id", callback = function() setclipboard(game.GameId) end }) -- Copy Join Script config:button({ name = "copy join script", callback = function() setclipboard( 'game:GetService("TeleportService"):TeleportToPlaceInstance(' .. game.PlaceId .. ', "' .. game.JobId .. '", game.Players.LocalPlayer)' ) end }) -- Rejoin config:button({ name = "rejoin", callback = function() game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId, game.Players.LocalPlayer) end })
Utility Functions
- Copy Job ID: Copies the current server instance ID to clipboard
- Copy Game ID: Copies the universe/place ID to clipboard
- Copy Join Script: Copies a complete teleport script to clipboard
- Rejoin: Instantly rejoins the current server
- Usage: All functions use
setclipboard()for easy sharing