-- Blocks UI demo. Put BlocksUI (ModuleScript) in ReplicatedStorage and this in StarterPlayerScripts. local Blocks = require(game:GetService("ReplicatedStorage"):WaitForChild("BlocksUI")) -- Blocks.ShowTouchButtons = true -- show the phone on-screen buttons on PC too, for testing local Window = Blocks:CreateWindow({ Title = "Blocks UI", SubTitle = "Blocky Studios", Theme = "Grass", -- Grass, Dirt, Stone, Diamond, Gold, Redstone, Emerald, Lapis, Amethyst, or a Color3 -- Icon = "rbxassetid://...", -- title bar + open button icon (defaults to the Blocky Studios block) -- Background = Color3.fromRGB(40, 60, 90), -- Color3, ColorSequence or an image id -- OpenButton = { MobileOnly = false }, -- the open button is touch-only by default; false hides it everywhere ToggleKey = Enum.KeyCode.RightShift, GamepadKey = Enum.KeyCode.ButtonSelect, -- controller / console button that shows and hides the window }) local Main = Window:AddTab({ Name = "Main", Icon = "Home" }) local Updates = Window:AddTab({ Name = "Updates", Icon = "Bell", Badge = "NEW" }) local Settings = Window:AddTab({ Name = "Settings", Icon = "Settings" }) Main:AddDiscord({ Invite = "discord.gg/yourinvite" }) -- put your invite here Main:AddSection("Basics", "Star") Main:AddButton({ Name = "Say hello", Callback = function() Blocks:Notify({ Title = "Hello!", Content = "Blocks UI is working.", Type = "Success" }) end, }) Main:AddToggle({ Name = "Show player names", Default = true, Flag = "ShowNames", Callback = function(on) print("Show names:", on) end, }) Main:AddSlider({ Name = "Music volume", Min = 0, Max = 100, Default = 60, Suffix = "%", Flag = "Volume", Callback = function(value) print("Volume:", value) end, }) Main:AddDropdown({ Name = "Graphics", Options = { "Low", "Medium", "High", "Ultra" }, Default = "High", Flag = "Graphics", Callback = function(choice) print("Graphics:", choice) end, }) Main:AddDropdown({ Name = "Favourite blocks", Options = { "Brick", "Plate", "Slope", "Tile", "Stud", "Wedge" }, Default = { "Brick" }, Multi = true, Flag = "Blocks", }) Main:AddSection("More", "Sword") Main:AddInput({ Name = "Nickname", Placeholder = "Enter a name", Flag = "Nick" }) Main:AddKeybind({ Name = "Sprint", Default = Enum.KeyCode.LeftShift, -- keyboard GamepadDefault = Enum.KeyCode.ButtonL3, -- controller / console TouchText = "RUN", -- on-screen button for phones and tablets (or TouchIcon = "Star") TouchMode = "Hold", -- Tap, Hold or Toggle (players can change it) TouchShape = "Round", -- Square, Round, Pill or Diamond (players can change it) Flag = "SprintKey", Callback = function(key) print("Sprint pressed with", key) end, Released = function() print("Sprint released") end, }) Main:AddKeybind({ Name = "Dash", Default = Enum.KeyCode.E, GamepadDefault = Enum.KeyCode.ButtonX, TouchIcon = "Sword", Flag = "DashKey", Callback = function(key) print("Dash with", key) end, }) Main:AddColorPicker({ Name = "Trail colour", Default = Color3.fromRGB(70, 220, 255), Flag = "Trail" }) local progress = Main:AddProgress({ Name = "Level progress", Max = 100, Default = 35 }) Main:AddButton({ Name = "Reset progress", Color = "Red", Callback = function() Window:Dialog({ Title = "Reset progress?", Content = "This sets the bar back to zero.", Buttons = { { Name = "Reset", Color = "Red", Callback = function() progress:Set(0) end, }, { Name = "Cancel" }, }, }) end, }) -- Updates tab Updates:AddCard({ Title = "Double coins weekend", Content = "Every block pays out twice until Monday", Icon = "Coin", Color = Color3.fromRGB(246, 170, 40), Button = { Name = "Claim", Callback = function() Blocks:Notify({ Title = "Claimed", Content = "Bonus is active.", Type = "Success" }) end, }, }) Updates:AddSection("Changelog", "Bell") Updates:AddUpdate({ Version = "v1.1.0", Title = "Icons and cards", Date = "17 Nov 2026", Changes = { "+ Built-in pixel icons for tabs and sections", "+ Gradient cards, Discord card and update popups", "* Faster intro with its own panel", "- Removed the dark intro backdrop", }, }) Updates:AddUpdate({ Version = "v1.0.0", Title = "First release", Date = "16 Nov 2026", Changes = { "Windows, tabs, 11 components, notifications and themes" }, }) -- Announcement popup. Save dontShowAgain yourself and pass it back as Hidden to remember it across sessions. Window:Popup({ Id = "update-1.1.0", Title = "We updated!", Icon = "Gift", Content = "Blocks UI v1.1.0 is here.", Changes = { "+ Pixel icons", "+ Gradient cards", "* Faster intro" }, ButtonText = "Nice", OnClose = function(dontShowAgain) print("Popup closed, don't show again:", dontShowAgain) end, }) Settings:AddSection("Theme", "Settings") Settings:AddDropdown({ Name = "Theme", Options = { "Grass", "Dirt", "Stone", "Diamond", "Gold", "Redstone", "Emerald", "Lapis", "Amethyst" }, Default = "Grass", Callback = function(name) Blocks:SetTheme(name) end, }) Settings:AddDropdown({ Name = "Background", Options = { "Stone", "Night", "Dirt", "Deep sea" }, Default = "Stone", Callback = function(name) local colours = { Night = Color3.fromRGB(34, 38, 66), Dirt = Color3.fromRGB(96, 70, 50), ["Deep sea"] = Color3.fromRGB(28, 70, 84), } Window:SetBackground(colours[name]) -- nil resets to the default stone end, }) Settings:AddSection("Controls", "Sword") Settings:AddKeybind({ Name = "Menu key", Default = Enum.KeyCode.RightShift, GamepadDefault = Enum.KeyCode.ButtonSelect, TouchButton = false, -- phones already have the open button Flag = "MenuKey", Changed = function(key, device) Window:SetToggleKey(key, device) end, }) Settings:AddButton({ Name = "Move on-screen buttons", Color = "Yellow", Callback = function() Window:EditLayout() -- drag every on-screen button, then Lock end, }) Settings:AddParagraph({ Title = "About", Content = "Blocks UI v" .. Blocks.Version .. " by Blocky Studios. Hide or show this window with RightShift, or the View button on a controller.", })