-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] --// FORGEX HUB --// Mobile Roblox AI Development Assistant --// Single LocalScript Prototype --// Place inside StarterPlayerScripts local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local TextService = game:GetService("TextService") local Player = Players.LocalPlayer local PlayerGui = Player:WaitForChild("PlayerGui") ---------------------------------------------------------------- -- CONFIG ---------------------------------------------------------------- local CONFIG = { Name = "ForgeX Hub", Version = "1.0", Accent = Color3.fromRGB(90, 140, 255), Background = Color3.fromRGB(15, 17, 24), Panel = Color3.fromRGB(22, 25, 34), Panel2 = Color3.fromRGB(28, 32, 43), Text = Color3.fromRGB(240, 243, 250), Muted = Color3.fromRGB(150, 157, 175), Success = Color3.fromRGB(80, 220, 140), Error = Color3.fromRGB(255, 90, 100), } ---------------------------------------------------------------- -- STATE ---------------------------------------------------------------- local State = { CurrentTab = "AI", CurrentProject = "My Game", CurrentCode = "", History = {}, HistoryIndex = 0, Projects = { ["My Game"] = { Code = "-- ForgeX project\nprint('Hello from ForgeX!')", Components = {} } }, Messages = { { Role = "ForgeX", Text = "Welcome to ForgeX Hub. Tell me what you want to build." } } } ---------------------------------------------------------------- -- HELPERS ---------------------------------------------------------------- local function create(class, properties) local obj = Instance.new(class) for property, value in pairs(properties or {}) do obj[property] = value end return obj end local function corner(parent, radius) local c = create("UICorner", { CornerRadius = UDim.new(0, radius or 8) }) c.Parent = parent return c end local function stroke(parent, color, transparency) local s = create("UIStroke", { Color = color or Color3.fromRGB(50, 55, 70), Transparency = transparency or 0, Thickness = 1 }) s.Parent = parent return s end local function tween(object, properties, duration) TweenService:Create( object, TweenInfo.new(duration or .2, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), properties ):Play() end ---------------------------------------------------------------- -- GUI ---------------------------------------------------------------- local Gui = create("ScreenGui", { Name = "ForgeXHub", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 100 }) Gui.Parent = PlayerGui ---------------------------------------------------------------- -- MOBILE OPEN BUTTON ---------------------------------------------------------------- local OpenButton = create("TextButton", { Name = "ForgeXOpen", Parent = Gui, Size = UDim2.fromOffset(58, 58), Position = UDim2.new(0, 15, .5, -29), BackgroundColor3 = CONFIG.Accent, Text = "FX", TextColor3 = Color3.new(1,1,1), TextSize = 20, Font = Enum.Font.GothamBold, AutoButtonColor = false }) corner(OpenButton, 18) stroke(OpenButton, Color3.fromRGB(150,180,255), .3) ---------------------------------------------------------------- -- MAIN WINDOW ---------------------------------------------------------------- local Main = create("Frame", { Name = "ForgeX", Parent = Gui, Size = UDim2.new(.94, 0, .88, 0), Position = UDim2.new(.03, 0, .06, 0), BackgroundColor3 = CONFIG.Background, Visible = true }) corner(Main, 14) stroke(Main, Color3.fromRGB(55, 62, 80), .2) ---------------------------------------------------------------- -- TOP BAR ---------------------------------------------------------------- local Top = create("Frame", { Parent = Main, Size = UDim2.new(1, 0, 0, 55), BackgroundColor3 = CONFIG.Panel }) corner(Top, 14) local Title = create("TextLabel", { Parent = Top, BackgroundTransparency = 1, Position = UDim2.fromOffset(18, 0), Size = UDim2.new(.5, 0, 1, 0), Text = "⚡ ForgeX Hub", TextColor3 = CONFIG.Text, TextSize = 19, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left }) local Version = create("TextLabel", { Parent = Top, BackgroundTransparency = 1, Position = UDim2.new(.5, 0, 0, 0), Size = UDim2.new(.3, 0, 1, 0), Text = "AI BUILD ENVIRONMENT", TextColor3 = CONFIG.Muted, TextSize = 9, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left }) local Close = create("TextButton", { Parent = Top, AnchorPoint = Vector2.new(1, .5), Position = UDim2.new(1, -12, .5, 0), Size = UDim2.fromOffset(35, 35), BackgroundColor3 = Color3.fromRGB(45, 48, 60), Text = "×", TextColor3 = CONFIG.Text, TextSize = 22, Font = Enum.Font.GothamBold, AutoButtonColor = false }) corner(Close, 10) ---------------------------------------------------------------- -- SIDEBAR ---------------------------------------------------------------- local Sidebar = create("Frame", { Parent = Main, Position = UDim2.new(0, 0, 0, 55), Size = UDim2.new(0, 115, 1, -55), BackgroundColor3 = CONFIG.Panel }) local SidebarLayout = create("UIListLayout", { Parent = Sidebar, Padding = UDim.new(0, 6), SortOrder = Enum.SortOrder.LayoutOrder }) local SidebarPadding = create("UIPadding", { Parent = Sidebar, PaddingTop = UDim.new(0, 12), PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8) }) local Content = create("Frame", { Parent = Main, Position = UDim2.new(0, 115, 0, 55), Size = UDim2.new(1, -115, 1, -55), BackgroundTransparency = 1 }) ---------------------------------------------------------------- -- TAB SYSTEM ---------------------------------------------------------------- local Tabs = {} local function clearContent() for _, child in ipairs(Content:GetChildren()) do child:Destroy() end end local function createTabButton(name, icon) local button = create("TextButton", { Parent = Sidebar, Size = UDim2.new(1, 0, 0, 42), BackgroundColor3 = Color3.fromRGB(30, 34, 45), Text = icon .. " " .. name, TextColor3 = CONFIG.Muted, TextSize = 11, Font = Enum.Font.GothamMedium, AutoButtonColor = false }) corner(button, 9) button.MouseButton1Click:Connect(function() State.CurrentTab = name for tabName, tabButton in pairs(Tabs) do if tabName == name then tabButton.BackgroundColor3 = CONFIG.Accent tabButton.TextColor3 = Color3.new(1,1,1) else tabButton.BackgroundColor3 = Color3.fromRGB(30,34,45) tabButton.TextColor3 = CONFIG.Muted end end loadTab(name) end) Tabs[name] = button return button end createTabButton("AI", "🤖") createTabButton("Code", "⌘") createTabButton("Build", "◆") createTabButton("Projects", "▣") createTabButton("Settings", "⚙") ---------------------------------------------------------------- -- DRAGGABLE WINDOW ---------------------------------------------------------------- local dragging = false local dragStart local startPosition Top.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPosition = Main.Position end end) Top.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart Main.Position = UDim2.new( startPosition.X.Scale, startPosition.X.Offset + delta.X, startPosition.Y.Scale, startPosition.Y.Offset + delta.Y ) end end) ---------------------------------------------------------------- -- BUTTON CREATOR ---------------------------------------------------------------- local function button(parent, text, position, size) local b = create("TextButton", { Parent = parent, Position = position, Size = size, BackgroundColor3 = CONFIG.Panel2, Text = text, TextColor3 = CONFIG.Text, TextSize = 12, Font = Enum.Font.GothamMedium, AutoButtonColor = false }) corner(b, 8) stroke(b, Color3.fromRGB(55,60,75), .4) b.MouseEnter:Connect(function() tween(b, {BackgroundColor3 = CONFIG.Accent}, .12) end) b.MouseLeave:Connect(function() tween(b, {BackgroundColor3 = CONFIG.Panel2}, .12) end) return b end ---------------------------------------------------------------- -- CODE GENERATOR ---------------------------------------------------------------- local function generateSimulator() return [[ -- FORGEX GENERATED SIMULATOR -- Coins + Rebirths + Leaderstats local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local Coins = Instance.new("IntValue") Coins.Name = "Coins" Coins.Value = 0 Coins.Parent = leaderstats local Rebirths = Instance.new("IntValue") Rebirths.Name = "Rebirths" Rebirths.Value = 0 Rebirths.Parent = leaderstats end) local function AddCoins(player, amount) local stats = player:FindFirstChild("leaderstats") if stats then local coins = stats:FindFirstChild("Coins") if coins then coins.Value += amount end end end local function Rebirth(player) local stats = player:FindFirstChild("leaderstats") if not stats then return end local coins = stats.Coins local rebirths = stats.Rebirths local requirement = 1000 * (rebirths.Value + 1) if coins.Value >= requirement then coins.Value = 0 rebirths.Value += 1 end end ]] end local function generateObby() return [[ -- FORGEX GENERATED OBBY SYSTEM local Players = game:GetService("Players") local checkpoints = workspace:WaitForChild("Checkpoints") for _, checkpoint in ipairs(checkpoints:GetChildren()) do if checkpoint:IsA("BasePart") then checkpoint.Touched:Connect(function(hit) local character = hit.Parent local player = Players:GetPlayerFromCharacter(character) if player then player:SetAttribute("Checkpoint", checkpoint.Name) end end) end end ]] end local function generateTycoon() return [[ -- FORGEX GENERATED TYCOON CORE local Players = game:GetService("Players") local Tycoons = workspace:WaitForChild("Tycoons") for _, tycoon in ipairs(Tycoons:GetChildren()) do local owner = Instance.new("ObjectValue") owner.Name = "Owner" owner.Parent = tycoon end local function ClaimTycoon(player, tycoon) if tycoon.Owner.Value ~= nil then return false end tycoon.Owner.Value = player return true end ]] end local function generateFromPrompt(prompt) local lower = string.lower(prompt) if string.find(lower, "simulator") then return generateSimulator() elseif string.find(lower, "obby") then return generateObby() elseif string.find(lower, "tycoon") then return generateTycoon() else return [[ -- FORGEX GENERATED SCRIPT -- Request: -- ]] .. prompt .. [[ local function ForgeXGeneratedSystem() print("ForgeX created a system for:") print("]] .. prompt:gsub('"', '\\"') .. [[") end ForgeXGeneratedSystem() ]] end end ---------------------------------------------------------------- -- HISTORY ---------------------------------------------------------------- local function saveHistory() State.History = {} for _, item in ipairs({State.CurrentCode}) do table.insert(State.History, item) end State.HistoryIndex = #State.History end local function setCode(code) State.CurrentCode = code State.Projects[State.CurrentProject].Code = code saveHistory() end ---------------------------------------------------------------- -- AI TAB ---------------------------------------------------------------- function loadAITab() clearContent() local Header = create("TextLabel", { Parent = Content, Position = UDim2.fromOffset(18, 15), Size = UDim2.new(1, -36, 0, 35), BackgroundTransparency = 1, Text = "ForgeX AI Builder", TextColor3 = CONFIG.Text, TextSize = 20, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left }) local Sub = create("TextLabel", { Parent = Content, Position = UDim2.fromOffset(18, 48), Size = UDim2.new(1, -36, 0, 30), BackgroundTransparency = 1, Text = "Describe what you want ForgeX to build.", TextColor3 = CONFIG.Muted, TextSize = 11, Font = Enum.Font.Gotham }) local Chat = create("ScrollingFrame", { Parent = Content, Position = UDim2.fromOffset(18, 82), Size = UDim2.new(1, -36, 1, -170), BackgroundColor3 = CONFIG.Panel, BorderSizePixel = 0, ScrollBarThickness = 4, AutomaticCanvasSize = Enum.AutomaticSize.Y }) corner(Chat, 10) local ChatLayout = create("UIListLayout", { Parent = Chat, Padding = UDim.new(0, 8) }) local ChatPadding = create("UIPadding", { Parent = Chat, PaddingTop = UDim.new(0, 10), PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10) }) local function addMessage(role, text) local msg = create("TextLabel", { Parent = Chat, Size = UDim2.new(1, -10, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = role == "ForgeX" and Color3.fromRGB(29,34,48) or Color3.fromRGB(38,43,56), Text = role .. "\n" .. text, TextColor3 = CONFIG.Text, TextSize = 11, Font = Enum.Font.Gotham, TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top }) corner(msg, 8) create("UIPadding", { Parent = msg, PaddingTop = UDim.new(0, 9), PaddingBottom = UDim.new(0, 9), PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10) }) end for _, message in ipairs(State.Messages) do addMessage(message.Role, message.Text) end local Prompt = create("TextBox", { Parent = Content, Position = UDim2.new(0, 18, 1, -76), Size = UDim2.new(1, -115, 0, 55), BackgroundColor3 = CONFIG.Panel, PlaceholderText = "Tell ForgeX what to build...", PlaceholderColor3 = CONFIG.Muted, Text = "", TextColor3 = CONFIG.Text, TextSize = 12, Font = Enum.Font.Gotham, TextWrapped = true, ClearTextOnFocus = false }) corner(Prompt, 10) stroke(Prompt) local Send = button( Content, "BUILD", UDim2.new(1, -88, 1, -76), UDim2.fromOffset(70, 55) ) Send.MouseButton1Click:Connect(function() local request = Prompt.Text if request == "" then return end table.insert(State.Messages, { Role = "You", Text = request }) local generated = generateFromPrompt(request) setCode(generated) table.insert(State.Messages, { Role = "ForgeX", Text = "Build generated. Open the Code tab to inspect the generated Luau." }) Prompt.Text = "" loadAITab() end) end ---------------------------------------------------------------- -- CODE TAB ---------------------------------------------------------------- function loadCodeTab() clearContent() local Header = create("TextLabel", { Parent = Content, Position = UDim2.fromOffset(18, 15), Size = UDim2.new(1, -36, 0, 35), BackgroundTransparency = 1, Text = "Luau Code Editor", TextColor3 = CONFIG.Text, TextSize = 20, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left }) local Editor = create("TextBox", { Parent = Content, Position = UDim2.fromOffset(18, 60), Size = UDim2.new(1, -36, 1, -125), BackgroundColor3 = Color3.fromRGB(11,13,18), Text = State.CurrentCode, TextColor3 = Color3.fromRGB(220,225,235), PlaceholderText = "-- ForgeX generated code", PlaceholderColor3 = CONFIG.Muted, TextSize = 11, Font = Enum.Font.Code, TextWrapped = false, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top, ClearTextOnFocus = false, MultiLine = true }) corner(Editor, 10) stroke(Editor, Color3.fromRGB(50,55,70), .3) local Save = button( Content, "💾 SAVE", UDim2.fromOffset(18, -58), UDim2.fromOffset(90, 40) ) Save.Position = UDim2.new(0, 18, 1, -52) Save.MouseButton1Click:Connect(function() setCode(Editor.Text) end) local Copy = button( Content, "📋 COPY", UDim2.new(0, 118, 1, -52), UDim2.fromOffset(90, 40) ) Copy.MouseButton1Click:Connect(function() -- Roblox does not allow arbitrary clipboard access -- from normal game scripts. The code remains selectable. Copy.Text = "SELECT CODE" task.delay(1.2, function() if Copy then Copy.Text = "📋 COPY" end end) end) local Explain = button( Content, "💡 EXPLAIN", UDim2.new(0, 218, 1, -52), UDim2.fromOffset(100, 40) ) Explain.MouseButton1Click:Connect(function() State.CurrentTab = "AI" table.insert(State.Messages, { Role = "ForgeX", Text = "This project currently contains generated Luau. In a full AI-connected version, ForgeX would analyze each function and explain it." }) for name, tab in pairs(Tabs) do tab.BackgroundColor3 = name == "AI" and CONFIG.Accent or Color3.fromRGB(30,34,45) tab.TextColor3 = name == "AI" and Color3.new(1,1,1) or CONFIG.Muted end loadAITab() end) end ---------------------------------------------------------------- -- BUILD TAB ---------------------------------------------------------------- function loadBuildTab() clearContent() local Header = create("TextLabel", { Parent = Content, Position = UDim2.fromOffset(18, 15), Size = UDim2.new(1, -36, 0, 35), BackgroundTransparency = 1, Text = "Component Builder", TextColor3 = CONFIG.Text, TextSize = 20, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left }) local components = { {"🟦 Button", "Button"}, {"📦 Frame", "Frame"}, {"📝 TextBox", "TextBox"}, {"🏷 Label", "TextLabel"}, {"🛒 Shop", "Shop"}, {"🎒 Inventory", "Inventory"}, {"💰 Currency", "Currency"}, {"🔄 Rebirth", "Rebirth"}, } local y = 65 for _, data in ipairs(components) do local b = button( Content, data[1], UDim2.fromOffset(18, y), UDim2.new(1, -36, 0, 42) ) b.MouseButton1Click:Connect(function() local component = data[2] table.insert( State.Projects[State.CurrentProject].Components, component ) local addition = "\n\n-- ForgeX Component: " .. component .. "\n" if component == "Currency" then addition ..= [[ local Currency = Instance.new("IntValue") Currency.Name = "Coins" Currency.Value = 0 ]] elseif component == "Button" then addition ..= [[ local Button = Instance.new("TextButton") Button.Name = "ForgeXButton" Button.Text = "Click Me" ]] elseif component == "Shop" then addition ..= [[ -- Shop component -- Add your shop items here local Shop = {} Shop.Items = {} ]] elseif component == "Inventory" then addition ..= [[ -- Inventory component local Inventory = {} Inventory.Items = {} ]] elseif component == "Rebirth" then addition ..= [[ local function Rebirth(player) print("Rebirth requested for", player.Name) end ]] else addition ..= "-- " .. component .. " component created\n" end setCode(State.CurrentCode .. addition) end) y += 48 end end ---------------------------------------------------------------- -- PROJECTS TAB ---------------------------------------------------------------- function loadProjectsTab() clearContent() local Header = create("TextLabel", { Parent = Content, Position = UDim2.fromOffset(18, 15), Size = UDim2.new(1, -36, 0, 35), BackgroundTransparency = 1, Text = "Projects", TextColor3 = CONFIG.Text, TextSize = 20, Font = Enum.Font.GothamBold }) local NewProject = button( Content, "+ NEW PROJECT", UDim2.fromOffset(18, 60), UDim2.new(1, -36, 0, 45) ) NewProject.MouseButton1Click:Connect(function() local number = 1 while State.Projects["Project " .. number] do number += 1 end local name = "Project " .. number State.Projects[name] = { Code = "-- New ForgeX project\n", Components = {} } State.CurrentProject = name St