
KeylessUniversal

-- Parent this LocalScript to StarterPlayerScripts
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
-- ScreenGui
local gui = Instance.new("ScreenGui")
gui.Name = "TabbedExecutorGUI"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
-- OPEN/CLOSE BUTTON
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(0, 120, 0, 30)
toggleButton.Position = UDim2.new(0, 10, 0, 10)
toggleButton.Text = "Open Executor"
toggleButton.BackgroundColor3 = Color3.fromRGB(50,50,50)
toggleButton.TextColor3 = Color3.fromRGB(255,255,255)
toggleButton.Parent = gui
-- MAIN FRAME
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 500, 0, 400)
frame.Position = UDim2.new(0.5, -250, 0.5, -200)
frame.BackgroundColor3 = Color3.fromRGB(40,40,40)
frame.Visible = false
frame.Parent = gui
-- DRAGGING (PC + Mobile)
frame.Active = true
frame.Draggable = true
local dragging, dragInput, dragStart, startPos
frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
frame.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - dragStart
frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
-- TITLE
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1,0,0,30)
title.Position = UDim2.new(0,0,0,0)
title.Text = "Mini Executor"
title.TextColor3 = Color3.fromRGB(255,255,255)
title.BackgroundColor3 = Color3.fromRGB(60,60,60)
title.Parent = frame
-- TAB BUTTONS CONTAINER
local tabContainer = Instance.new("Frame")
tabContainer.Size = UDim2.new(1,0,0,30)
tabContainer.Position = UDim2.new(0,0,0,30)
tabContainer.BackgroundTransparency = 1
tabContainer.Parent = frame
-- EXECUTOR TEXTBOX
local textbox = Instance.new("TextBox")
textbox.Size = UDim2.new(1, -20, 0, 250)
textbox.Position = UDim2.new(0, 10, 0, 70)
textbox.PlaceholderText = "-- Type Lua code here"
textbox.ClearTextOnFocus = false
textbox.MultiLine = true
textbox.TextWrapped = true
textbox.BackgroundColor3 = Color3.fromRGB(70,70,70)
textbox.TextColor3 = Color3.fromRGB(255,255,255)
textbox.TextXAlignment = Enum.TextXAlignment.Left
textbox.TextYAlignment = Enum.TextYAlignment.Top
textbox.Parent = frame
-- BUTTONS: Add Line / Run / Clear / New Tab
local addLineButton = Instance.new("TextButton")
addLineButton.Size = UDim2.new(0, 120, 0, 30)
addLineButton.Position = UDim2.new(0, 10, 1, -40)
addLineButton.Text = "Add Line"
addLineButton.BackgroundColor3 = Color3.fromRGB(90,90,90)
addLineButton.TextColor3 = Color3.fromRGB(255,255,255)
addLineButton.Parent = frame
local runButton = Instance.new("TextButton")
runButton.Size = UDim2.new(0, 120, 0, 30)
runButton.Position = UDim2.new(0.5, -60, 1, -40)
runButton.Text = "Run"
runButton.BackgroundColor3 = Color3.fromRGB(90,90,90)
runButton.TextColor3 = Color3.fromRGB(255,255,255)
runButton.Parent = frame
local clearButton = Instance.new("TextButton")
clearButton.Size = UDim2.new(0, 120, 0, 30)
clearButton.Position = UDim2.new(1, -130, 1, -40)
clearButton.Text = "Clear"
clearButton.BackgroundColor3 = Color3.fromRGB(90,90,90)
clearButton.TextColor3 = Color3.fromRGB(255,255,255)
clearButton.Parent = frame
local newTabButton = Instance.new("TextButton")
newTabButton.Size = UDim2.new(0, 50, 0, 30)
newTabButton.Position = UDim2.new(0, 0, 0, 0)
newTabButton.Text = "+"
newTabButton.BackgroundColor3 = Color3.fromRGB(100,100,100)
newTabButton.TextColor3 = Color3.fromRGB(255,255,255)
newTabButton.Parent = tabContainer
-- TAB DATA
local tabs = {}
local currentTab = nil
-- FUNCTION TO CREATE TAB
local function createTab(name)
local tab = {name=name, code=""}
local button = Instance.new("TextButton")
button.Size = UDim2.new(0, 100, 1, 0)
button.Position = UDim2.new(#tabs*0, #tabs*0, 0, 0)
button.Text = name
button.BackgroundColor3 = Color3.fromRGB(70,70,70)
button.TextColor3 = Color3.fromRGB(255,255,255)
button.Parent = tabContainer
tab.button = button
button.MouseButton1Click:Connect(function()
if currentTab then
currentTab.code = textbox.Text -- save current
end
currentTab = tab
textbox.Text = tab.code
end)
table.insert(tabs, tab)
-- Make first tab active
if #tabs == 1 then
currentTab = tab
textbox.Text = tab.code
end
end
-- INITIAL TAB
createTab("Script1")
-- NEW TAB BUTTON
newTabButton.MouseButton1Click:Connect(function()
createTab("Script"..(#tabs+1))
end)
-- ADD LINE BUTTON
addLineButton.MouseButton1Click:Connect(function()
if currentTab then
textbox.Text = textbox.Text.."\n"
textbox.CursorPosition = #textbox.Text + 1
end
end)
-- RUN BUTTON
runButton.MouseButton1Click:Connect(function()
if currentTab then
local code = textbox.Text
local success, err = pcall(function()
local func = loadstring(code)
if func then func() end
end)
if not success then warn("Error:", err) end
end
end)
-- CLEAR BUTTON
clearButton.MouseButton1Click:Connect(function()
if currentTab then
textbox.Text = ""
end
end)
-- OPEN/CLOSE
toggleButton.MouseButton1Click:Connect(function()
frame.Visible = not frame.Visible
toggleButton.Text = frame.Visible and "Close Executor" or "Open Executor"
end)
-- ENTER KEY adds newline
textbox.Focused:Connect(function()
local conn
conn = UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.Return then
textbox.Text = textbox.Text.."\n"
textbox.CursorPosition = #textbox.Text + 1
end
end)
textbox.FocusLost:Connect(function()
conn:Disconnect()
end)
end)No comments yet for this script.



