Auto click and more keyless
Key Required

Auto click and more keyless

[🎉TRADING] Click A Cookie!rechellemae3rechellemae3 448 views 569 executesUpdated Oct 7, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•619 lines (17153 chars)
--// Cookie Hub v2
--// Categories: Auto Farm (Cookies, Roll, Rebirth) | Upgrades (Roll Speed, Luck)
--// Draggable window + draggable 🍪 button. RightShift also shows/hides the GUI.

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local player = Players.LocalPlayer

--// THEME
local Theme = {
	Background = Color3.fromRGB(18, 18, 24),
	TitleBar = Color3.fromRGB(26, 26, 36),
	Sidebar = Color3.fromRGB(22, 22, 30),
	Card = Color3.fromRGB(32, 32, 44),
	CardHover = Color3.fromRGB(40, 40, 54),
	Off = Color3.fromRGB(62, 62, 78),
	Text = Color3.fromRGB(242, 242, 248),
	SubText = Color3.fromRGB(150, 150, 170),
	Accent = Color3.fromRGB(235, 150, 60),
	Green = Color3.fromRGB(80, 210, 130),
}

--// FEATURES
--// Delay = seconds between each fire. Raise it if the game kicks you for going too fast.
local Categories = {
	{
		Name = "Auto Farm",
		Icon = "🌾",
		Features = {
			{
				Name = "Auto Cookies",
				Desc = "Clicks the cookie nonstop",
				Icon = "🍪",
				Color = Color3.fromRGB(235, 150, 60),
				Delay = 0.05,
				Action = function()
					game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("Click"):FireServer()
				end,
			},
			{
				Name = "Auto Roll Cookies",
				Desc = "Rolls over and over",
				Icon = "🎲",
				Color = Color3.fromRGB(160, 110, 255),
				Delay = 0.5,
				Action = function()
					local args = {
						"Roll"
					}
					game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("ConsoleRoll"):FireServer(unpack(args))
				end,
			},
			{
				Name = "Auto Rebirth",
				Desc = "Rebirths whenever you can",
				Icon = "🔄",
				Color = Color3.fromRGB(240, 90, 120),
				Delay = 1,
				Action = function()
					game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("Rebirth"):FireServer()
				end,
			},
		},
	},
	{
		Name = "Upgrades",
		Icon = "⬆️",
		Features = {
			{
				Name = "Auto Buy Roll Speed",
				Desc = "Buys max roll speed",
				Icon = "⚡",
				Color = Color3.fromRGB(250, 200, 60),
				Delay = 1,
				Action = function()
					local args = {
						"RollSpeed",
						"Max"
					}
					game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("BoardPurchase"):FireServer(unpack(args))
				end,
			},
			{
				Name = "Auto Buy Luck",
				Desc = "Buys a luck upgrade",
				Icon = "🍀",
				Color = Color3.fromRGB(80, 200, 120),
				Delay = 0.5,
				Action = function()
					local args = {
						"RollLuck",
						"One"
					}
					game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("BoardPurchase"):FireServer(unpack(args))
				end,
			},
		},
	},
}

--// GUI PARENT
local function getGuiParent()
	local ok, coreGui = pcall(function()
		return game:GetService("CoreGui")
	end)
	if ok and coreGui then
		local testOk = pcall(function()
			local t = Instance.new("Folder")
			t.Parent = coreGui
			t:Destroy()
		end)
		if testOk then
			return coreGui
		end
	end
	return player:WaitForChild("PlayerGui")
end

local guiParent = getGuiParent()

-- Remove an older copy if the script is executed twice
local old = guiParent:FindFirstChild("CookieHubGui")
if old then
	old:Destroy()
end

local alive = true

local gui = Instance.new("ScreenGui")
gui.Name = "CookieHubGui"
gui.ResetOnSpawn = false
gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
gui.Parent = guiParent

--// HELPERS
local function corner(obj, radius)
	local c = Instance.new("UICorner")
	c.CornerRadius = UDim.new(0, radius)
	c.Parent = obj
	return c
end

local function stroke(obj, color, thickness, transparency)
	local s = Instance.new("UIStroke")
	s.Color = color
	s.Thickness = thickness
	s.Transparency = transparency
	s.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
	s.Parent = obj
	return s
end

local function tween(obj, time, props, style, direction)
	local t = TweenService:Create(
		obj,
		TweenInfo.new(time, style or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out),
		props
	)
	t:Play()
	return t
end

-- Drag `target` by holding `handle` (mouse + touch). A tap without moving calls `onClick`.
local function makeDraggable(handle, target, onClick)
	local dragging = false
	local moved = false
	local dragStart, startPos

	handle.InputBegan:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1
			or input.UserInputType == Enum.UserInputType.Touch then
			dragging = true
			moved = false
			dragStart = input.Position
			startPos = target.Position

			input.Changed:Connect(function()
				if input.UserInputState == Enum.UserInputState.End then
					dragging = false
					if onClick and not moved then
						onClick()
					end
				end
			end)
		end
	end)

	UserInputService.InputChanged:Connect(function(input)
		if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement
			or input.UserInputType == Enum.UserInputType.Touch) then
			local delta = input.Position - dragStart
			if delta.Magnitude > 5 then
				moved = true
			end
			target.Position = UDim2.new(
				startPos.X.Scale, startPos.X.Offset + delta.X,
				startPos.Y.Scale, startPos.Y.Offset + delta.Y
			)
		end
	end)
end

--// MAIN WINDOW
local main = Instance.new("Frame")
main.Name = "Main"
main.Size = UDim2.fromOffset(380, 270)
main.Position = UDim2.new(0.5, -190, 0.5, -135)
main.BackgroundColor3 = Theme.Background
main.BorderSizePixel = 0
main.Parent = gui
corner(main, 12)
stroke(main, Color3.fromRGB(255, 255, 255), 1, 0.9)

local mainScale = Instance.new("UIScale")
mainScale.Scale = 1
mainScale.Parent = main

--// TITLE BAR
local titleBar = Instance.new("Frame")
titleBar.Name = "TitleBar"
titleBar.Size = UDim2.new(1, 0, 0, 42)
titleBar.BackgroundColor3 = Theme.TitleBar
titleBar.BorderSizePixel = 0
titleBar.Parent = main
corner(titleBar, 12)

local titleFix = Instance.new("Frame")
titleFix.Size = UDim2.new(1, 0, 0, 12)
titleFix.Position = UDim2.new(0, 0, 1, -12)
titleFix.BackgroundColor3 = Theme.TitleBar
titleFix.BorderSizePixel = 0
titleFix.Parent = titleBar

local titleLabel = Instance.new("TextLabel")
titleLabel.BackgroundTransparency = 1
titleLabel.Position = UDim2.fromOffset(14, 0)
titleLabel.Size = UDim2.new(0, 140, 1, 0)
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextSize = 16
titleLabel.TextColor3 = Theme.Text
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Text = "🍪 Cookie Hub"
titleLabel.Parent = titleBar

-- colored accent line under the title bar
local accentLine = Instance.new("Frame")
accentLine.Size = UDim2.new(1, 0, 0, 2)
accentLine.Position = UDim2.new(0, 0, 1, 0)
accentLine.BorderSizePixel = 0
accentLine.BackgroundColor3 = Color3.new(1, 1, 1)
accentLine.Parent = titleBar

local accentGradient = Instance.new("UIGradient")
accentGradient.Color = ColorSequence.new({
	ColorSequenceKeypoint.new(0, Color3.fromRGB(235, 150, 60)),
	ColorSequenceKeypoint.new(0.5, Color3.fromRGB(240, 90, 120)),
	ColorSequenceKeypoint.new(1, Color3.fromRGB(160, 110, 255)),
})
accentGradient.Parent = accentLine

local statusLabel = Instance.new("TextLabel")
statusLabel.BackgroundTransparency = 1
statusLabel.AnchorPoint = Vector2.new(1, 0.5)
statusLabel.Position = UDim2.new(1, -48, 0.5, 0)
statusLabel.Size = UDim2.fromOffset(90, 20)
statusLabel.Font = Enum.Font.GothamMedium
statusLabel.TextSize = 12
statusLabel.TextColor3 = Theme.SubText
statusLabel.TextXAlignment = Enum.TextXAlignment.Right
statusLabel.Text = "● 0 active"
statusLabel.Parent = titleBar

local closeBtn = Instance.new("TextButton")
closeBtn.Size = UDim2.fromOffset(28, 28)
closeBtn.AnchorPoint = Vector2.new(1, 0.5)
closeBtn.Position = UDim2.new(1, -8, 0.5, 0)
closeBtn.BackgroundColor3 = Color3.fromRGB(200, 70, 80)
closeBtn.Font = Enum.Font.GothamBold
closeBtn.TextSize = 14
closeBtn.TextColor3 = Color3.new(1, 1, 1)
closeBtn.Text = "X"
closeBtn.AutoButtonColor = true
closeBtn.Parent = titleBar
corner(closeBtn, 8)

makeDraggable(titleBar, main)

--// SIDEBAR
local sidebar = Instance.new("Frame")
sidebar.Name = "Sidebar"
sidebar.Position = UDim2.fromOffset(0, 44)
sidebar.Size = UDim2.new(0, 116, 1, -44)
sidebar.BackgroundColor3 = Theme.Sidebar
sidebar.BorderSizePixel = 0
sidebar.Parent = main
corner(sidebar, 12)

-- squares off the top corners and the right edge of the sidebar
local sidebarFixTop = Instance.new("Frame")
sidebarFixTop.Size = UDim2.new(1, 0, 0, 12)
sidebarFixTop.BackgroundColor3 = Theme.Sidebar
sidebarFixTop.BorderSizePixel = 0
sidebarFixTop.Parent = sidebar

local sidebarFixRight = Instance.new("Frame")
sidebarFixRight.Size = UDim2.new(0, 12, 1, 0)
sidebarFixRight.Position = UDim2.new(1, -12, 0, 0)
sidebarFixRight.BackgroundColor3 = Theme.Sidebar
sidebarFixRight.BorderSizePixel = 0
sidebarFixRight.Parent = sidebar

local tabHolder = Instance.new("Frame")
tabHolder.BackgroundTransparency = 1
tabHolder.Size = UDim2.new(1, 0, 1, -30)
tabHolder.Parent = sidebar

local tabLayout = Instance.new("UIListLayout")
tabLayout.Padding = UDim.new(0, 6)
tabLayout.SortOrder = Enum.SortOrder.LayoutOrder
tabLayout.Parent = tabHolder

local tabPad = Instance.new("UIPadding")
tabPad.PaddingTop = UDim.new(0, 12)
tabPad.PaddingLeft = UDim.new(0, 8)
tabPad.PaddingRight = UDim.new(0, 8)
tabPad.Parent = tabHolder

local hint = Instance.new("TextLabel")
hint.BackgroundTransparency = 1
hint.AnchorPoint = Vector2.new(0, 1)
hint.Position = UDim2.new(0, 0, 1, -6)
hint.Size = UDim2.new(1, 0, 0, 18)
hint.Font = Enum.Font.Gotham
hint.TextSize = 10
hint.TextColor3 = Theme.SubText
hint.Text = "RightShift = show/hide"
hint.Parent = sidebar

--// CONTENT AREA
local content = Instance.new("Frame")
content.Name = "Content"
content.Position = UDim2.fromOffset(116, 44)
content.Size = UDim2.new(1, -116, 1, -44)
content.BackgroundTransparency = 1
content.Parent = main

local pages = {}
local tabs = {}

local function selectCategory(name)
	for n, page in pairs(pages) do
		page.Visible = (n == name)
	end
	for n, tab in pairs(tabs) do
		local active = (n == name)
		tween(tab, 0.15, {
			BackgroundColor3 = active and Theme.Accent or Theme.Card,
			TextColor3 = active and Color3.new(1, 1, 1) or Theme.SubText,
		})
	end
end

local function createCategory(name, icon, order)
	local tab = Instance.new("TextButton")
	tab.Size = UDim2.new(1, 0, 0, 34)
	tab.BackgroundColor3 = Theme.Card
	tab.LayoutOrder = order
	tab.Font = Enum.Font.GothamMedium
	tab.TextSize = 13
	tab.TextColor3 = Theme.SubText
	tab.Text = icon .. "  " .. name
	tab.AutoButtonColor = false
	tab.Parent = tabHolder
	corner(tab, 8)

	local page = Instance.new("ScrollingFrame")
	page.Name = name
	page.Size = UDim2.new(1, 0, 1, 0)
	page.BackgroundTransparency = 1
	page.BorderSizePixel = 0
	page.ScrollBarThickness = 3
	page.ScrollBarImageColor3 = Theme.Off
	page.CanvasSize = UDim2.new()
	page.AutomaticCanvasSize = Enum.AutomaticSize.Y
	page.Visible = false
	page.Parent = content

	local layout = Instance.new("UIListLayout")
	layout.Padding = UDim.new(0, 8)
	layout.SortOrder = Enum.SortOrder.LayoutOrder
	layout.Parent = page

	local pad = Instance.new("UIPadding")
	pad.PaddingTop = UDim.new(0, 12)
	pad.PaddingLeft = UDim.new(0, 10)
	pad.PaddingRight = UDim.new(0, 14)
	pad.PaddingBottom = UDim.new(0, 10)
	pad.Parent = page

	pages[name] = page
	tabs[name] = tab

	tab.MouseButton1Click:Connect(function()
		selectCategory(name)
	end)

	return page
end

--// STATUS COUNTER
local function refreshStatus()
	local count = 0
	for _, cat in ipairs(Categories) do
		for _, feature in ipairs(cat.Features) do
			if feature.Enabled then
				count = count + 1
			end
		end
	end
	statusLabel.Text = "● " .. count .. " active"
	statusLabel.TextColor3 = count > 0 and Theme.Green or Theme.SubText
end

--// FEATURE CARD (icon + name + description + switch)
local function createCard(parent, feature, order)
	feature.Enabled = false

	local card = Instance.new("Frame")
	card.Size = UDim2.new(1, 0, 0, 54)
	card.BackgroundColor3 = Theme.Card
	card.BorderSizePixel = 0
	card.LayoutOrder = order
	card.Parent = parent
	corner(card, 10)

	local cardStroke = stroke(card, feature.Color, 1.5, 1)

	local iconTile = Instance.new("Frame")
	iconTile.Size = UDim2.fromOffset(38, 38)
	iconTile.Position = UDim2.fromOffset(8, 8)
	iconTile.BackgroundColor3 = feature.Color:Lerp(Theme.Card, 0.7)
	iconTile.BorderSizePixel = 0
	iconTile.Parent = card
	corner(iconTile, 9)

	local iconLabel = Instance.new("TextLabel")
	iconLabel.BackgroundTransparency = 1
	iconLabel.Size = UDim2.new(1, 0, 1, 0)
	iconLabel.Font = Enum.Font.GothamBold
	iconLabel.TextSize = 20
	iconLabel.TextColor3 = Color3.new(1, 1, 1)
	iconLabel.Text = feature.Icon
	iconLabel.Parent = iconTile

	local nameLabel = Instance.new("TextLabel")
	nameLabel.BackgroundTransparency = 1
	nameLabel.Position = UDim2.fromOffset(56, 9)
	nameLabel.Size = UDim2.new(1, -124, 0, 18)
	nameLabel.Font = Enum.Font.GothamBold
	nameLabel.TextSize = 13
	nameLabel.TextColor3 = Theme.Text
	nameLabel.TextXAlignment = Enum.TextXAlignment.Left
	nameLabel.TextTruncate = Enum.TextTruncate.AtEnd
	nameLabel.Text = feature.Name
	nameLabel.Parent = card

	local descLabel = Instance.new("TextLabel")
	descLabel.BackgroundTransparency = 1
	descLabel.Position = UDim2.fromOffset(56, 28)
	descLabel.Size = UDim2.new(1, -124, 0, 16)
	descLabel.Font = Enum.Font.Gotham
	descLabel.TextSize = 11
	descLabel.TextColor3 = Theme.SubText
	descLabel.TextXAlignment = Enum.TextXAlignment.Left
	descLabel.TextTruncate = Enum.TextTruncate.AtEnd
	descLabel.Text = feature.Desc
	descLabel.Parent = card

	local switch = Instance.new("Frame")
	switch.Size = UDim2.fromOffset(44, 22)
	switch.AnchorPoint = Vector2.new(1, 0.5)
	switch.Position = UDim2.new(1, -10, 0.5, 0)
	switch.BackgroundColor3 = Theme.Off
	switch.BorderSizePixel = 0
	switch.Parent = card
	corner(switch, 11)

	local knob = Instance.new("Frame")
	knob.Size = UDim2.fromOffset(16, 16)
	knob.Position = UDim2.fromOffset(3, 3)
	knob.BackgroundColor3 = Color3.new(1, 1, 1)
	knob.BorderSizePixel = 0
	knob.Parent = switch
	corner(knob, 8)

	local function setEnabled(value)
		feature.Enabled = value
		tween(switch, 0.18, { BackgroundColor3 = value and feature.Color or Theme.Off })
		tween(knob, 0.18, {
			Position = value and UDim2.fromOffset(25, 3) or UDim2.fromOffset(3, 3),
		}, Enum.EasingStyle.Back)
		tween(cardStroke, 0.18, { Transparency = value and 0.35 or 1 })
		refreshStatus()
	end

	-- the whole card is clickable
	local hit = Instance.new("TextButton")
	hit.BackgroundTransparency = 1
	hit.Size = UDim2.new(1, 0, 1, 0)
	hit.Text = ""
	hit.AutoButtonColor = false
	hit.ZIndex = 5
	hit.Parent = card

	hit.MouseButton1Click:Connect(function()
		setEnabled(not feature.Enabled)
	end)
	hit.MouseEnter:Connect(function()
		tween(card, 0.12, { BackgroundColor3 = Theme.CardHover })
	end)
	hit.MouseLeave:Connect(function()
		tween(card, 0.12, { BackgroundColor3 = Theme.Card })
	end)

	return card
end

--// BUILD CATEGORIES + CARDS + LOOPS
for catIndex, category in ipairs(Categories) do
	local page = createCategory(category.Name, category.Icon, catIndex)

	for featureIndex, feature in ipairs(category.Features) do
		createCard(page, feature, featureIndex)

		-- one loop per feature, runs only while it's switched on
		task.spawn(function()
			while alive do
				if feature.Enabled then
					pcall(feature.Action)
					task.wait(feature.Delay)
				else
					task.wait(0.2)
				end
			end
		end)
	end
end

selectCategory(Categories[1].Name)

--// OPEN / CLOSE ANIMATION
local isOpen = true

local function setOpen(open)
	isOpen = open
	if open then
		main.Visible = true
		mainScale.Scale = 0.85
		tween(mainScale, 0.25, { Scale = 1 }, Enum.EasingStyle.Back)
	else
		tween(mainScale, 0.15, { Scale = 0.85 })
		task.delay(0.15, function()
			if not isOpen then
				main.Visible = false
			end
		end)
	end
end

--// FLOATING TOGGLE BUTTON (draggable, tap to open/close)
local toggleBtn = Instance.new("TextButton")
toggleBtn.Name = "ToggleButton"
toggleBtn.Size = UDim2.fromOffset(48, 48)
toggleBtn.Position = UDim2.new(0, 20, 0.5, -24)
toggleBtn.BackgroundColor3 = Theme.Accent
toggleBtn.Font = Enum.Font.GothamBold
toggleBtn.TextSize = 24
toggleBtn.TextColor3 = Color3.new(1, 1, 1)
toggleBtn.Text = "🍪"
toggleBtn.AutoButtonColor = false
toggleBtn.Parent = gui
corner(toggleBtn, 24)
stroke(toggleBtn, Color3.new(1, 1, 1), 2, 0.5)

local toggleGradient = Instance.new("UIGradient")
toggleGradient.Color = ColorSequence.new({
	ColorSequenceKeypoint.new(0, Color3.fromRGB(245, 170, 70)),
	ColorSequenceKeypoint.new(1, Color3.fromRGB(240, 90, 120)),
})
toggleGradient.Rotation = 45
toggleGradient.Parent = toggleBtn

makeDraggable(toggleBtn, toggleBtn, function()
	setOpen(not isOpen)
end)

-- RightShift also shows/hides the GUI (PC)
local keyConn = UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then
		return
	end
	if input.KeyCode == Enum.KeyCode.RightShift then
		setOpen(not isOpen)
	end
end)

--// CLOSE (stops every loop and removes the GUI)
closeBtn.MouseButton1Click:Connect(function()
	alive = false
	for _, category in ipairs(Categories) do
		for _, feature in ipairs(category.Features) do
			feature.Enabled = false
		end
	end
	keyConn:Disconnect()
	gui:Destroy()
end)

Features & Information

Auto click and bunch more keyless

Community Comments (1)

railmila2railmila2Oct 12, 2026

good script