Client Sided Script Executor Made By Ai V2 Open Sourced
Key RequiredUniversal

Client Sided Script Executor Made By Ai V2 Open Sourced

Universal Scriptgc_idkgc_idk 403 views 66 executesUpdated Jan 3, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•245 lines (7704 chars)
-- Simple Roblox Script Runner V2 --
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

-- Create ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ScriptRunnerGUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

-- Main Frame
local mainFrame = Instance.new("Frame")
mainFrame.Name = "MainFrame"
mainFrame.Size = UDim2.new(0, 600, 0, 400)
mainFrame.Position = UDim2.new(0.5, -300, 0.5, -200)
mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
mainFrame.BorderSizePixel = 0
mainFrame.Parent = screenGui

-- Title Bar
local titleBar = Instance.new("Frame")
titleBar.Name = "TitleBar"
titleBar.Size = UDim2.new(1, 0, 0, 30)
titleBar.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
titleBar.BorderSizePixel = 0
titleBar.Parent = mainFrame

local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, -40, 1, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "Script Runner"
titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextSize = 16
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Parent = titleBar
titleLabel.Position = UDim2.new(0, 10, 0, 0)

-- Close Button
local closeButton = Instance.new("TextButton")
closeButton.Size = UDim2.new(0, 30, 0, 30)
closeButton.Position = UDim2.new(1, -30, 0, 0)
closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
closeButton.BorderSizePixel = 0
closeButton.Text = "X"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.Font = Enum.Font.GothamBold
closeButton.TextSize = 18
closeButton.Parent = titleBar

-- Script Input ScrollingFrame
local scriptScrollFrame = Instance.new("ScrollingFrame")
scriptScrollFrame.Name = "ScriptScrollFrame"
scriptScrollFrame.Size = UDim2.new(1, -20, 1, -110)
scriptScrollFrame.Position = UDim2.new(0, 10, 0, 40)
scriptScrollFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
scriptScrollFrame.BorderSizePixel = 0
scriptScrollFrame.ScrollBarThickness = 8
scriptScrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
scriptScrollFrame.Parent = mainFrame

-- Script Input TextBox
local scriptBox = Instance.new("TextBox")
scriptBox.Name = "ScriptBox"
scriptBox.Size = UDim2.new(1, -8, 1, 0)
scriptBox.Position = UDim2.new(0, 0, 0, 0)
scriptBox.BackgroundTransparency = 1
scriptBox.TextColor3 = Color3.fromRGB(255, 255, 255)
scriptBox.Font = Enum.Font.Code
scriptBox.TextSize = 14
scriptBox.Text = '-- Write your Lua code here\nprint("Hello, World!")\n\nlocal part = Instance.new("Part")\npart.Parent = workspace\npart.Position = Vector3.new(0, 10, 0)\npart.Size = Vector3.new(4, 1, 2)\npart.BrickColor = BrickColor.new("Bright red")\npart.Anchored = true'
scriptBox.TextXAlignment = Enum.TextXAlignment.Left
scriptBox.TextYAlignment = Enum.TextYAlignment.Top
scriptBox.TextWrapped = true
scriptBox.ClearTextOnFocus = false
scriptBox.MultiLine = true
scriptBox.Parent = scriptScrollFrame

-- Update canvas size when text changes
scriptBox:GetPropertyChangedSignal("Text"):Connect(function()
	local textSize = game:GetService("TextService"):GetTextSize(
		scriptBox.Text,
		scriptBox.TextSize,
		scriptBox.Font,
		Vector2.new(scriptBox.AbsoluteSize.X, math.huge)
	)
	scriptScrollFrame.CanvasSize = UDim2.new(0, 0, 0, textSize.Y + 10)
end)

-- Output ScrollingFrame
local outputScrollFrame = Instance.new("ScrollingFrame")
outputScrollFrame.Name = "OutputScrollFrame"
outputScrollFrame.Size = UDim2.new(1, -20, 0, 50)
outputScrollFrame.Position = UDim2.new(0, 10, 1, -90)
outputScrollFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
outputScrollFrame.BorderSizePixel = 0
outputScrollFrame.ScrollBarThickness = 6
outputScrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
outputScrollFrame.Parent = mainFrame

-- Output Box
local outputBox = Instance.new("TextLabel")
outputBox.Name = "OutputBox"
outputBox.Size = UDim2.new(1, -6, 1, 0)
outputBox.Position = UDim2.new(0, 0, 0, 0)
outputBox.BackgroundTransparency = 1
outputBox.TextColor3 = Color3.fromRGB(0, 255, 0)
outputBox.Font = Enum.Font.Code
outputBox.TextSize = 12
outputBox.Text = "Output will appear here..."
outputBox.TextXAlignment = Enum.TextXAlignment.Left
outputBox.TextYAlignment = Enum.TextYAlignment.Top
outputBox.TextWrapped = true
outputBox.Parent = outputScrollFrame

-- Function to update output canvas size
local function updateOutputSize()
	local textSize = game:GetService("TextService"):GetTextSize(
		outputBox.Text,
		outputBox.TextSize,
		outputBox.Font,
		Vector2.new(outputBox.AbsoluteSize.X, math.huge)
	)
	outputScrollFrame.CanvasSize = UDim2.new(0, 0, 0, math.max(textSize.Y + 10, 50))
end

-- Run Button
local runButton = Instance.new("TextButton")
runButton.Name = "RunButton"
runButton.Size = UDim2.new(0, 100, 0, 30)
runButton.Position = UDim2.new(0, 10, 1, -30)
runButton.BackgroundColor3 = Color3.fromRGB(50, 150, 50)
runButton.BorderSizePixel = 0
runButton.Text = "Run Script"
runButton.TextColor3 = Color3.fromRGB(255, 255, 255)
runButton.Font = Enum.Font.GothamBold
runButton.TextSize = 14
runButton.Parent = mainFrame

-- Clear Button
local clearButton = Instance.new("TextButton")
clearButton.Name = "ClearButton"
clearButton.Size = UDim2.new(0, 80, 0, 30)
clearButton.Position = UDim2.new(0, 120, 1, -30)
clearButton.BackgroundColor3 = Color3.fromRGB(150, 50, 50)
clearButton.BorderSizePixel = 0
clearButton.Text = "Clear"
clearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
clearButton.Font = Enum.Font.GothamBold
clearButton.TextSize = 14
clearButton.Parent = mainFrame

-- Make draggable
local dragging = false
local dragStart = nil
local startPos = nil

titleBar.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		dragging = true
		dragStart = input.Position
		startPos = mainFrame.Position
	end
end)

titleBar.InputChanged:Connect(function(input)
	if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
		local delta = input.Position - dragStart
		mainFrame.Position = UDim2.new(
			startPos.X.Scale,
			startPos.X.Offset + delta.X,
			startPos.Y.Scale,
			startPos.Y.Offset + delta.Y
		)
	end
end)

titleBar.InputEnded:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		dragging = false
	end
end)

-- Close functionality
closeButton.MouseButton1Click:Connect(function()
	screenGui:Destroy()
end)

-- Clear functionality
clearButton.MouseButton1Click:Connect(function()
	scriptBox.Text = ""
	outputBox.Text = "Output cleared."
	updateOutputSize()
end)

-- Run Script functionality
runButton.MouseButton1Click:Connect(function()
	local success, err = pcall(function()
		local scriptText = scriptBox.Text
		
		-- Override print to capture output
		local output = {}
		local oldPrint = print
		
		getfenv().print = function(...)
			local args = {...}
			local str = ""
			for i, v in ipairs(args) do
				str = str .. tostring(v)
				if i < #args then
					str = str .. " "
				end
			end
			table.insert(output, str)
			oldPrint(...)
		end
		
		-- Execute the script
		local func, loadErr = loadstring(scriptText)
		if func then
			func()
			outputBox.TextColor3 = Color3.fromRGB(0, 255, 0)
			if #output > 0 then
				outputBox.Text = table.concat(output, "\n")
			else
				outputBox.Text = "✓ Script executed successfully!"
			end
			updateOutputSize()
		else
			outputBox.TextColor3 = Color3.fromRGB(255, 100, 100)
			outputBox.Text = "Error: " .. tostring(loadErr)
			updateOutputSize()
		end
		
		-- Restore print
		getfenv().print = oldPrint
	end)
	
	if not success then
		outputBox.TextColor3 = Color3.fromRGB(255, 100, 100)
		outputBox.Text = "Error: " .. tostring(err)
		updateOutputSize()
	end
end)

Features & Information

Just a Simple Client Sided Script Runner/Executor Open Sourced
#ClientSided

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts