local function createObject(objectType, properties) local obj = Instance.new(objectType) for prop, value in pairs(properties) do if prop ~= "Parent" then obj[prop] = value else obj.Parent = value end end return obj end local function createUI(titleText, descriptionText, correctKeyPrefix, keyLink) -- Remove existing UI if present if game.CoreGui:FindFirstChild("Rnd") then game.CoreGui.Rnd:Destroy() end -- Create ScreenGui local screenGui = createObject( "ScreenGui", { Name = "Rnd", Parent = game.CoreGui } ) -- Create main frame local frame = createObject( "Frame", { Parent = screenGui, Size = UDim2.new(0, 326, 0, 229), Position = UDim2.new(0.5, -163, 0.5, -114), BackgroundColor3 = Color3.fromRGB(30, 30, 30), BorderSizePixel = 0, BackgroundTransparency = 0.1 } ) createObject("UICorner", {Parent = frame}) local gradient = createObject( "UIGradient", { Parent = frame, Color = ColorSequence.new( { ColorSequenceKeypoint.new(0, Color3.fromRGB(63, 63, 63)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0)) } ), Rotation = 45 } ) -- Title Label local titleLabel = createObject( "TextLabel", { Parent = frame, Position = UDim2.new(0.064, 0, 0.082, 0), Size = UDim2.new(0, 187, 0, 18), Text = titleText or "Air Key", Font = Enum.Font.GothamBold, TextColor3 = Color3.fromRGB(255, 255, 255), TextSize = 16, TextXAlignment = Enum.TextXAlignment.Left, BackgroundTransparency = 1 } ) -- Description Label local descriptionLabel = createObject( "TextLabel", { Parent = frame, Position = UDim2.new(0.064, 0, 0.161, 0), Size = UDim2.new(0, 270, 0, 11), Text = descriptionText or "Enter the key to continue.", Font = Enum.Font.Gotham, TextColor3 = Color3.fromRGB(255, 255, 255), TextSize = 10, TextTransparency = 0.6, TextXAlignment = Enum.TextXAlignment.Left, BackgroundTransparency = 1 } ) -- TextBox for entering the key local keyTextBox = createObject( "TextBox", { Parent = frame, Position = UDim2.new(0.064, 0, 0.261, 0), Size = UDim2.new(0, 200, 0, 30), BackgroundColor3 = Color3.fromRGB(45, 45, 45), TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.Gotham, TextSize = 14, PlaceholderText = "Enter your key", ClearTextOnFocus = true, BorderSizePixel = 0 } ) createObject("UICorner", {Parent = keyTextBox}) -- Feedback box frame local feedbackBox = createObject( "Frame", { Parent = frame, Position = UDim2.new(0.064, 0, 0.561, 0), Size = UDim2.new(0, 200, 0, 30), BackgroundColor3 = Color3.fromRGB(45, 45, 45), BorderSizePixel = 0, BackgroundTransparency = 0.4 } ) createObject("UICorner", {Parent = feedbackBox}) -- Feedback text label local feedbackLabel = createObject( "TextLabel", { Parent = feedbackBox, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Text = "", Font = Enum.Font.Gotham, TextSize = 14, TextColor3 = Color3.fromRGB(255, 255, 255), TextXAlignment = Enum.TextXAlignment.Center, TextYAlignment = Enum.TextYAlignment.Center } ) -- Login Button local loginButton = createObject( "TextButton", { Parent = frame, Position = UDim2.new(0.064, 0, 0.401, 0), Size = UDim2.new(0, 63, 0, 21), BackgroundColor3 = Color3.fromRGB(91, 161, 78), Text = "LOGIN", Font = Enum.Font.GothamBold, TextColor3 = Color3.fromRGB(255, 255, 255), TextSize = 14, AutoButtonColor = false } ) loginButton.MouseEnter:Connect( function() loginButton.BackgroundColor3 = Color3.fromRGB(112, 182, 92) end ) loginButton.MouseLeave:Connect( function() loginButton.BackgroundColor3 = Color3.fromRGB(91, 161, 78) end ) -- Cancel Button local cancelButton = createObject( "TextButton", { Parent = frame, Position = UDim2.new(0.064, 0, 0.833, 0), Size = UDim2.new(0, 63, 0, 21), BackgroundColor3 = Color3.fromRGB(153, 88, 88), Text = "CANCEL", Font = Enum.Font.GothamBold, TextColor3 = Color3.fromRGB(255, 255, 255), TextSize = 14, AutoButtonColor = false } ) cancelButton.MouseEnter:Connect( function() cancelButton.BackgroundColor3 = Color3.fromRGB(180, 122, 122) end ) cancelButton.MouseLeave:Connect( function() cancelButton.BackgroundColor3 = Color3.fromRGB(153, 88, 88) end ) -- Get Key Button local getKeyButton = createObject( "TextButton", { Parent = frame, Position = UDim2.new(0.34, 0, 0.401, 0), Size = UDim2.new(0, 90, 0, 21), BackgroundColor3 = Color3.fromRGB(73, 113, 204), Text = "GET KEY", Font = Enum.Font.GothamBold, TextColor3 = Color3.fromRGB(255, 255, 255), TextSize = 14, AutoButtonColor = false } ) getKeyButton.MouseEnter:Connect( function() getKeyButton.BackgroundColor3 = Color3.fromRGB(103, 143, 234) end ) getKeyButton.MouseLeave:Connect( function() getKeyButton.BackgroundColor3 = Color3.fromRGB(73, 113, 204) end ) -- Clipboard Functionality local function copyToClipboard(link) if setclipboard then setclipboard(link) feedbackLabel.Text = "Key link copied to clipboard!" feedbackLabel.TextColor3 = Color3.fromRGB(0, 255, 0) else feedbackLabel.Text = "Clipboard copy not supported!" feedbackLabel.TextColor3 = Color3.fromRGB(255, 0, 0) end end getKeyButton.MouseButton1Click:Connect( function() if keyLink and keyLink ~= "" then copyToClipboard(keyLink) else feedbackLabel.Text = "No key link available!" feedbackLabel.TextColor3 = Color3.fromRGB(255, 0, 0) end end ) -- Validate Key Functionality local function validateKey(inputKey) if inputKey:sub(1, #correctKeyPrefix) == correctKeyPrefix then feedbackLabel.Text = "Correct key!" feedbackLabel.TextColor3 = Color3.fromRGB(0, 255, 0) local function createObject(className, properties) local obj = Instance.new(className) for prop, value in pairs(properties) do obj[prop] = value end return obj end -- ScreenGui local screenGui = createObject("ScreenGui", {Parent = game:GetService("CoreGui")}) -- Main UI Frame (Draggable) local mainFrame = createObject("Frame", { Parent = screenGui, BackgroundColor3 = Color3.fromRGB(20, 20, 20), Size = UDim2.new(0, 450, 0, 300), Position = UDim2.new(0.5, -225, 0.5, -150), -- Centered on the screen initially Active = true, -- Required for dragging Draggable = true -- Makes it draggable }) createObject("UICorner", {Parent = mainFrame, CornerRadius = UDim.new(0, 8)}) -- Close Button local closeButton = createObject("TextButton", { Parent = screenGui, BackgroundColor3 = Color3.fromRGB(35, 35, 35), Text = "CLOSE COLDHUB", Font = Enum.Font.SourceSansBold, TextSize = 18, TextColor3 = Color3.fromRGB(255, 255, 255), Size = UDim2.new(0, 130, 0, 30), Position = UDim2.new(1, -35, 0, 5), -- Top-right corner AnchorPoint = Vector2.new(1, 0) }) createObject("UICorner", {Parent = closeButton, CornerRadius = UDim.new(0, 8)}) -- Close the UI when the button is clicked closeButton.MouseButton1Click:Connect(function() if mainFrame.Visible then mainFrame.Visible = false closeButton.Text = "Open COLDHUB" else mainFrame.Visible = true closeButton.Text = "CLOSE COLDHUB" end end) closeButton.Active, closeButton.Draggable = true, true -- Header local header = createObject("TextLabel", { Parent = mainFrame, BackgroundColor3 = Color3.fromRGB(30, 30, 30), Text = "COLDHUB", Font = Enum.Font.SourceSansBold, TextSize = 20, TextColor3 = Color3.fromRGB(255, 255, 255), Size = UDim2.new(1, 0, 0, 40), Position = UDim2.new(0, 0, 0, 0) }) createObject("UICorner", {Parent = header, CornerRadius = UDim.new(0, 8)}) -- Sidebar for Tabs local buttonsFrame = createObject("Frame", { Parent = mainFrame, BackgroundColor3 = Color3.fromRGB(30, 30, 30), Size = UDim2.new(0, 100, 1, -40), Position = UDim2.new(0, 0, 0, 40) }) createObject("UICorner", {Parent = buttonsFrame, CornerRadius = UDim.new(0, 8)}) local buttonLayout = createObject("UIListLayout", { Parent = buttonsFrame, Padding = UDim.new(0, 5), SortOrder = Enum.SortOrder.LayoutOrder }) -- Main Content Area local contentFrame = createObject("Frame", { Parent = mainFrame, BackgroundColor3 = Color3.fromRGB(15, 15, 15), Size = UDim2.new(1, -110, 1, -50), Position = UDim2.new(0, 110, 0, 40) }) createObject("UICorner", {Parent = contentFrame, CornerRadius = UDim.new(0, 8)}) -- Section Label local sectionLabel = createObject("TextLabel", { Parent = contentFrame, BackgroundTransparency = 1, Text = "Home", Font = Enum.Font.SourceSansBold, TextSize = 18, TextColor3 = Color3.fromRGB(255, 255, 255), Size = UDim2.new(1, 0, 0, 30), Position = UDim2.new(0, 0, 0, 0) }) -- Sections for Tabs local sections = { Home = createObject("Frame", { Parent = contentFrame, BackgroundColor3 = Color3.fromRGB(15, 15, 15), Visible = true, Size = UDim2.new(1, 0, 1, -30), Position = UDim2.new(0, 0, 0, 30) }), Scripts = createObject("ScrollingFrame", { Parent = contentFrame, BackgroundColor3 = Color3.fromRGB(15, 15, 15), Visible = false, Size = UDim2.new(1, 0, 1, -30), Position = UDim2.new(0, 0, 0, 30), CanvasSize = UDim2.new(0, 0, 0, 0), ScrollBarThickness = 6 }), Credits = createObject("Frame", { Parent = contentFrame, BackgroundColor3 = Color3.fromRGB(15, 15, 15), Visible = false, Size = UDim2.new(1, 0, 1, -30), Position = UDim2.new(0, 0, 0, 30) }) } -- Tab Switching local function switchTab(tab) for name, section in pairs(sections) do section.Visible = (name == tab) end sectionLabel.Text = tab end -- Tab Buttons local function createTabButton(name) local button = createObject("TextButton", { Parent = buttonsFrame, Size = UDim2.new(1, 0, 0, 40), Text = name, TextColor3 = Color3.fromRGB(255, 255, 255), BackgroundColor3 = Color3.fromRGB(30, 30, 30), Font = Enum.Font.SourceSans, TextSize = 18 }) createObject("UICorner", {Parent = button, CornerRadius = UDim.new(0, 8)}) button.MouseButton1Click:Connect(function() switchTab(name) end) end createTabButton("Home") createTabButton("Scripts") createTabButton("Credits") -- Home Tab: Update Logs Section local updateLogs = createObject("TextLabel", { Parent = sections.Home, BackgroundTransparency = 1, Text = "Update Logs:\n\nšŸŽ‰ COLDHUB V2 Released\nV2.2-2 new scripts\n-3-40+ new scripts\n-new ui\n- Visit our Discord: https://discord.gg/wTRXCSSsnr", TextWrapped = true, Font = Enum.Font.SourceSans, TextSize = 16, TextColor3 = Color3.fromRGB(255, 255, 255), Size = UDim2.new(1, -10, 1, -10), Position = UDim2.new(0, 5, 0, 5) }) -- Credits Tab: Credits Label local creditsLabel = createObject("TextLabel", { Parent = sections.Credits, BackgroundTransparency = 1, Text = "Credits:\n\n- UI Design: Content_deleted\n- Scripting: Content_deleted\n - Feedback: Redxs_rblx\n HUGE Thanks to the NexusX team", TextWrapped = true, Font = Enum.Font.SourceSans, TextSize = 16, TextColor3 = Color3.fromRGB(255, 255, 255), Size = UDim2.new(1, -10, 1, -10), Position = UDim2.new(0, 5, 0, 5) }) -- Scripts Tab: Adding Buttons, Toggles, and Sliders local function createScriptButton(scriptName, url) local button = createObject("TextButton", { Parent = sections.Scripts, Size = UDim2.new(1, -20, 0, 40), Text = scriptName, TextColor3 = Color3.fromRGB(255, 255, 255), BackgroundColor3 = Color3.fromRGB(30, 30, 30), Font = Enum.Font.SourceSans, TextSize = 18, Position = UDim2.new(0, 10, 0, 10) }) createObject("UICorner", {Parent = button, CornerRadius = UDim.new(0, 8)}) button.MouseButton1Click:Connect(function() loadstring(game:HttpGet(url))() end) end -- Sample Script Buttons (add more as needed) createScriptButton("Fisch", "https://raw.githubusercontent.com/AhmadV99/Speed-Hub-X/main/Speed%20Hub%20X.lua") createScriptButton("Bedwars", "https://raw.githubusercontent.com/VapeVoidware/vapevoidware/main/NewMainScript.lua") -- Toggle Example (for example, enabling/disabling something) local toggleLabel = createObject("TextLabel", { Parent = sections.Scripts, BackgroundTransparency = 1, Text = "Enable Feature:", TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.SourceSans, TextSize = 16, Size = UDim2.new(0, 200, 0, 30), Position = UDim2.new(0, 10, 0, 100) }) local toggleSwitch = createObject("TextButton", { Parent = sections.Scripts, Size = UDim2.new(0, 50, 0, 30), Text = "OFF", TextColor3 = Color3.fromRGB(255, 255, 255), BackgroundColor3 = Color3.fromRGB(30, 30, 30), Font = Enum.Font.SourceSans, TextSize = 18, Position = UDim2.new(0, 200, 0, 100) }) toggleSwitch.MouseButton1Click:Connect(function() if toggleSwitch.Text == "OFF" then toggleSwitch.Text = "ON" else toggleSwitch.Text = "OFF" end end) -- Slider Example local sliderLabel = createObject("TextLabel", { Parent = sections.Scripts, BackgroundTransparency = 1, Text = "Adjust Speed:", TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.SourceSans, TextSize = 16, Size = UDim2.new(0, 200, 0, 30), Position = UDim2.new(0, 10, 0, 150) }) local slider = createObject("Frame", { Parent = sections.Scripts, Size = UDim2.new(0, 200, 0, 10), Position = UDim2.new(0, 10, 0, 180), BackgroundColor3 = Color3.fromRGB(50, 50, 50) }) createObject("UICorner", {Parent = slider, CornerRadius = UDim.new(0, 5)}) local sliderFill = createObject("Frame", { Parent = slider, Size = UDim2.new(0, 100, 1, 0), BackgroundColor3 = Color3.fromRGB(100, 200, 255) }) slider.MouseButton1Down:Connect(function(x, y) local pos = math.clamp(x - slider.AbsolutePosition.X, 0, slider.AbsoluteSize.X) sliderFill.Size = UDim2.new(0, pos, 1, 0) end) version = "[NexusX]Version-2.2[|]you are on the current and latest version of COLDHUB our discord-https://discord.gg/wTRXCSSsnr" print(version) local NotificationBindable = Instance.new("BindableFunction") NotificationBindable.OnInvoke = callback -- game.StarterGui:SetCore("SendNotification", { Title = "NEXUSX"; Text = "Welcome to COLDHUB"; Icon = "rbxassetid://4384403532"; Duration = 5; Callback = NotificationBindable; }) local function callback(Text) if Text == "Button1 text" then print ("Answer") elseif Text == ("Button2 text") then print ("Answer2") end end -- Call createUI to generate the UI createUI("NexusX Key System", "Enter the key to unlock access.", "COLDHUB_", "https://nexusx.neocities.org/Key-system")