-- Create a ScreenGui local gui = Instance.new("ScreenGui") gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") -- Create a TextBox for script input local textBox = Instance.new("TextBox") textBox.Name = "ScriptTextBox" textBox.Size = UDim2.new(0.6, 0, 0.8, 0) textBox.Position = UDim2.new(0.2, 0, 0.1, 0) textBox.MultiLine = true textBox.TextWrapped = true textBox.Text = "-- Type your script here...\nprint('Hello, world!')" textBox.Parent = gui -- Create a ScrollingFrame to display the script local scrollingFrame = Instance.new("ScrollingFrame") scrollingFrame.Name = "ScrollingFrame" scrollingFrame.Size = UDim2.new(0.8, 0, 0.8, 0) scrollingFrame.Position = UDim2.new(0.1, 0, 0.1, 0) scrollingFrame.BackgroundColor3 = Color3.new(0, 0, 0) scrollingFrame.BorderColor3 = Color3.new(1, 1, 1) scrollingFrame.CanvasSize = UDim2.new(0, 0, 2, 0) -- Allow vertical scrolling scrollingFrame.Parent = textBox -- Create a TextLabel to display the script local textLabel = Instance.new("TextLabel") textLabel.Name = "ScriptTextLabel" textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = Color3.new(1, 1, 1) textLabel.TextSize = 18 textLabel.TextXAlignment = Enum.TextXAlignment.Left textLabel.TextYAlignment = Enum.TextYAlignment.Top textLabel.Text = textBox.Text textLabel.Parent = scrollingFrame -- Function to execute the script from the TextBox local function runScript() local scriptCode = textBox.Text loadstring(scriptCode)() end -- Function to update the TextLabel when TextBox text changes local function updateTextLabel() textLabel.Text = textBox.Text end textBox.Changed:Connect(updateTextLabel) -- Connect Enter key press to runScript function textBox.FocusLost:Connect(function(enterPressed) if enterPressed then runScript() end end)