
KeylessUniversal

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
-- 1. Main ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "CustomSpamGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui
-- 2. Main Frame (Window Container)
local mainFrame = Instance.new("Frame")
mainFrame.Name = "MainFrame"
mainFrame.Size = UDim2.new(0, 260, 0, 240) -- Adjusted height for the new button
mainFrame.Position = UDim2.new(0.5, -130, 0.5, -120)
mainFrame.BackgroundColor3 = Color3.fromRGB(24, 24, 28)
mainFrame.BorderSizePixel = 0
mainFrame.Parent = screenGui
local mainCorner = Instance.new("UICorner")
mainCorner.CornerRadius = UDim.new(0, 12)
mainCorner.Parent = mainFrame
local mainStroke = Instance.new("UIStroke")
mainStroke.Color = Color3.fromRGB(45, 45, 52)
mainStroke.Thickness = 1.5
mainStroke.Parent = mainFrame
-- 3. Top Title Bar (Drag Zone)
local titleBar = Instance.new("Frame")
titleBar.Name = "TitleBar"
titleBar.Size = UDim2.new(1, 0, 0, 36)
titleBar.BackgroundColor3 = Color3.fromRGB(32, 32, 38)
titleBar.BorderSizePixel = 0
titleBar.Parent = mainFrame
local titleCorner = Instance.new("UICorner")
titleCorner.CornerRadius = UDim.new(0, 12)
titleCorner.Parent = titleBar
local titleBarFix = Instance.new("Frame")
titleBarFix.Size = UDim2.new(1, 0, 0, 10)
titleBarFix.Position = UDim2.new(0, 0, 1, -10)
titleBarFix.BackgroundColor3 = Color3.fromRGB(32, 32, 38)
titleBarFix.BorderSizePixel = 0
titleBarFix.Parent = titleBar
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, -20, 1, 0)
titleLabel.Position = UDim2.new(0, 12, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "Control Panel"
titleLabel.TextColor3 = Color3.fromRGB(220, 220, 225)
titleLabel.TextSize = 14
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Parent = titleBar
-- 4. Custom Text Input Box
local textBox = Instance.new("TextBox")
textBox.Name = "InputBox"
textBox.Size = UDim2.new(1, -32, 0, 36)
textBox.Position = UDim2.new(0, 16, 0, 48)
textBox.BackgroundColor3 = Color3.fromRGB(36, 36, 42)
textBox.TextColor3 = Color3.fromRGB(255, 255, 255)
textBox.PlaceholderText = "Enter custom text..."
textBox.PlaceholderColor3 = Color3.fromRGB(120, 120, 130)
textBox.Text = "test"
textBox.TextSize = 14
textBox.Font = Enum.Font.Gotham
textBox.ClearTextOnFocus = false
textBox.Parent = mainFrame
local textCorner = Instance.new("UICorner")
textCorner.CornerRadius = UDim.new(0, 8)
textCorner.Parent = textBox
local textPadding = Instance.new("UIPadding")
textPadding.PaddingLeft = UDim.new(0, 10)
textPadding.PaddingRight = UDim.new(0, 10)
textPadding.Parent = textBox
-- 5. Start / Stop Toggle Button
local toggleButton = Instance.new("TextButton")
toggleButton.Name = "ToggleButton"
toggleButton.Size = UDim2.new(1, -32, 0, 40)
toggleButton.Position = UDim2.new(0, 16, 0, 96)
toggleButton.BackgroundColor3 = Color3.fromRGB(46, 204, 113) -- Green for Start
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.TextSize = 14
toggleButton.Font = Enum.Font.GothamBold
toggleButton.Text = "START"
toggleButton.AutoButtonColor = false
toggleButton.Parent = mainFrame
local toggleCorner = Instance.new("UICorner")
toggleCorner.CornerRadius = UDim.new(0, 8)
toggleCorner.Parent = toggleButton
-- 6. Clear Console Button
local clearButton = Instance.new("TextButton")
clearButton.Name = "ClearButton"
clearButton.Size = UDim2.new(1, -32, 0, 40)
clearButton.Position = UDim2.new(0, 16, 0, 144)
clearButton.BackgroundColor3 = Color3.fromRGB(52, 152, 219) -- Blue for Clear
clearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
clearButton.TextSize = 14
clearButton.Font = Enum.Font.GothamBold
clearButton.Text = "CLEAR CONSOLE"
clearButton.AutoButtonColor = false
clearButton.Parent = mainFrame
local clearCorner = Instance.new("UICorner")
clearCorner.CornerRadius = UDim.new(0, 8)
clearCorner.Parent = clearButton
-- 7. Dragging Logic (UserInputService)
local dragging = false
local dragInput, dragStart, startPos
local function update(input)
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
titleBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = mainFrame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
titleBar.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
update(input)
end
end)
-- 8. Button Logic
_G.spamThread = nil
-- Toggle Button Logic
toggleButton.MouseButton1Click:Connect(function()
if toggleButton.Text == "START" then
toggleButton.Text = "STOP"
toggleButton.BackgroundColor3 = Color3.fromRGB(231, 76, 60)
_G.spamThread = task.spawn(function()
while true do
local customText = textBox.Text ~= "" and textBox.Text or "test"
print(customText)
RunService.Heartbeat:Wait()
end
end)
else
toggleButton.Text = "START"
toggleButton.BackgroundColor3 = Color3.fromRGB(46, 204, 113)
if _G.spamThread then
task.cancel(_G.spamThread)
_G.spamThread = nil
print("spam stopped")
end
end
end)
-- Clear Console Button Logic
clearButton.MouseButton1Click:Connect(function()
print(string.rep("\n", 100) .. "[ Console Cleared ]")
end)No comments yet for this script.



