local screenWidth, screenHeight = game:GetService("GuiService"):GetScreenSize().X, game:GetService("GuiService"):GetScreenSize().Y
local function create(className, properties)
local object = Instance.new(className)
for property, value in pairs(properties) do
object[property] = value
end
return object
end
local MainFrame = create("Frame", {
Name = "MainFrame",
Size = UDim2.new(0, 700, 0, 400),
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.new(0.5, 0, 0.5, 0),
BackgroundColor3 = Color3.fromRGB(30, 30, 30),
BorderSizePixel = 0,
})
local UIGradient = create("UIGradient", {
Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(30, 30, 30)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(18, 18, 18))
}),
Rotation = 0,
Parent = MainFrame
})
local UICorner = create("UICorner", {
CornerRadius = UDim.new(0, 8),
Parent = MainFrame
})
local TopBar = create("Frame", {
Name = "TopBar",
Size = UDim2.new(1, 0, 0, 40),
Position = UDim2.new(0, 0, 0, 0),
BackgroundColor3 = Color3.fromRGB(22, 22, 22),
BorderSizePixel = 0,
Parent = MainFrame
})
local TopBarUICorner = create("UICorner", {
CornerRadius = UDim.new(0, 8),
Parent = TopBar
})
local Title = create("TextLabel", {
Name = "Title",
Size = UDim2.new(1, -24, 1, 0),
Position = UDim2.new(0, 12, 0, 0),
BackgroundColor3 = Color3.new(1, 1, 1),
BackgroundTransparency = 1,
TextColor3 = Color3.fromRGB(240, 240, 240),
Font = Enum.Font.SourceSansBold,
FontSize = Enum.FontSize.Size18,
Text = "</> Executor",
TextAlignHorizontal = Enum.TextXAlignment.Left,
BorderSizePixel = 0,
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Center,
Parent = TopBar
})
local function createIconButton(icon, offset)
local button = create("TextButton", {
Size = UDim2.new(0, 28, 0, 28),
Position = UDim2.new(1, -12 - offset, 0, 6),
BackgroundColor3 = Color3.new(1, 1, 1),
BackgroundTransparency = 1,
TextColor3 = Color3.fromRGB(240, 240, 240), -- Adjust color as needed
Text = icon,
Font = Enum.Font.SourceSans,
FontSize = Enum.FontSize.Size28,
BorderSizePixel = 0,
Parent = TopBar
})
return button
end
local button1 = createIconButton("▶", 12)
button1.Name = "RunButton"
local button2 = createIconButton("🗑", 48)
button2.Name = "ClearButton"
local button3 = createIconButton("👤", 84)
button3.Name = "ProfileButton"
local button4 = createIconButton("⚙", 120)
button4.Name = "SettingsButton"
local CodeBox = create("TextBox", {
Name = "CodeBox",
Size = UDim2.new(1, -24, 1, -64),
Position = UDim2.new(0, 12, 0, 52),
BackgroundColor3 = Color3.fromRGB(20, 20, 20),
TextColor3 = Color3.fromRGB(230, 230, 230),
Font = Enum.Font.SourceCodePro,
FontSize = Enum.FontSize.Size16,
Text = "",
MultiLine = true,
ClearTextOnFocus = false,
BorderSizePixel = 0,
Parent = MainFrame
})
local CodeBoxUICorner = create("UICorner", {
CornerRadius = UDim.new(0, 6),
Parent = CodeBox
})
local Link = create("ImageButton", {
Name = "Link",
Size = UDim2.new(0, 24, 0, 24),
Position = UDim2.new(1, -32, 1, -32),
BackgroundTransparency = 1,
Image = "rbxassetid://6695655523", -- Replace with actual asset ID. This one is for example only
BorderSizePixel = 0,
Parent = MainFrame
})
-- Drag Functionality
local dragging = false
local dragInput
local dragStart
local function update(input)
local delta = input.Position - dragStart
MainFrame.Position = UDim2.new(0, MainFrame.Position.X.Offset + delta.X, 0, MainFrame.Position.Y.Offset + delta.Y)
end
TopBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
game:GetService("UserInputService").InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
update(input)
end
end)
end
end)
TopBar.InputEnded:Connect(function()
dragging = false
end)
-- Place the frame in StarterGui
MainFrame.Parent = script.Parent