auto clicker
Key RequiredUniversal

auto clicker

Universal ScriptGOOGLEEXPLOITSGOOGLEEXPLOITS 702 views 60.8K executesUpdated Aug 29, 2026
Unrated
00
Lua Script•176 lines (5496 chars)
-- ================================================
-- AUTO CLICKER
-- Line in the middle of the screen
-- Starts clicking at the center
-- ================================================

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local VirtualInputManager = game:GetService("VirtualInputManager")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

print("🖱️ Auto Clicker Loading...")

-- Clean old GUI
if playerGui:FindFirstChild("AutoClickerGUI") then
	playerGui.AutoClickerGUI:Destroy()
end

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AutoClickerGUI"
screenGui.ResetOnSpawn = false
screenGui.IgnoreGuiInset = true
screenGui.Parent = playerGui

-- ========== MIDDLE LINE ==========
local middleLine = Instance.new("Frame")
middleLine.Name = "MiddleLine"
middleLine.Size = UDim2.new(0, 4, 0.4, 0) -- vertical line
middleLine.Position = UDim2.new(0.5, -2, 0.3, 0)
middleLine.BackgroundColor3 = Color3.fromRGB(0, 255, 150)
middleLine.BorderSizePixel = 0
middleLine.Parent = screenGui

-- Small horizontal crosshair
local crossLine = Instance.new("Frame")
crossLine.Size = UDim2.new(0, 30, 0, 4)
crossLine.Position = UDim2.new(0.5, -15, 0.5, -2)
crossLine.BackgroundColor3 = Color3.fromRGB(0, 255, 150)
crossLine.BorderSizePixel = 0
crossLine.Parent = screenGui

-- ========== CONTROL PANEL ==========
local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 380, 0, 130)
mainFrame.Position = UDim2.new(0.5, -190, 0.05, 0)
mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
mainFrame.Active = true
mainFrame.Draggable = true
mainFrame.Parent = screenGui
Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 10)

-- Title
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 35)
title.BackgroundColor3 = Color3.fromRGB(50, 50, 65)
title.Text = "🖱️ Auto Clicker"
title.TextColor3 = Color3.new(1,1,1)
title.TextScaled = true
title.Font = Enum.Font.GothamBold
title.Parent = mainFrame
Instance.new("UICorner", title)

-- Close
local closeBtn = Instance.new("TextButton")
closeBtn.Size = UDim2.new(0, 30, 0, 30)
closeBtn.Position = UDim2.new(1, -35, 0, 2)
closeBtn.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
closeBtn.Text = "X"
closeBtn.TextColor3 = Color3.new(1,1,1)
closeBtn.TextScaled = true
closeBtn.Parent = mainFrame
Instance.new("UICorner", closeBtn)

-- Speed
local speedLabel = Instance.new("TextLabel")
speedLabel.Size = UDim2.new(0, 110, 0, 30)
speedLabel.Position = UDim2.new(0, 15, 0, 50)
speedLabel.BackgroundTransparency = 1
speedLabel.Text = "Speed (sec):"
speedLabel.TextColor3 = Color3.new(1,1,1)
speedLabel.TextScaled = true
speedLabel.Parent = mainFrame

local speedBox = Instance.new("TextBox")
speedBox.Size = UDim2.new(0, 90, 0, 30)
speedBox.Position = UDim2.new(0, 130, 0, 50)
speedBox.BackgroundColor3 = Color3.fromRGB(45, 45, 60)
speedBox.Text = "0.01"
speedBox.TextColor3 = Color3.new(1,1,1)
speedBox.TextScaled = true
speedBox.Parent = mainFrame
Instance.new("UICorner", speedBox)

-- Start / Stop Button
local playBtn = Instance.new("TextButton")
playBtn.Size = UDim2.new(0, 130, 0, 40)
playBtn.Position = UDim2.new(0, 15, 0, 90)
playBtn.BackgroundColor3 = Color3.fromRGB(0, 160, 80)
playBtn.Text = "START CLICKING"
playBtn.TextColor3 = Color3.new(1,1,1)
playBtn.TextScaled = true
playBtn.Font = Enum.Font.GothamBold
playBtn.Parent = mainFrame
Instance.new("UICorner", playBtn)

-- Status
local statusLabel = Instance.new("TextLabel")
statusLabel.Size = UDim2.new(0, 200, 0, 40)
statusLabel.Position = UDim2.new(0, 160, 0, 90)
statusLabel.BackgroundTransparency = 1
statusLabel.Text = "Stopped"
statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
statusLabel.TextScaled = true
statusLabel.Parent = mainFrame

-- Variables
local clicking = false
local clickConnection = nil

-- Toggle Clicking
local function toggleClicking()
	if clicking then
		clicking = false
		if clickConnection then
			clickConnection:Disconnect()
			clickConnection = nil
		end
		playBtn.Text = "START CLICKING"
		playBtn.BackgroundColor3 = Color3.fromRGB(0, 160, 80)
		statusLabel.Text = "Stopped"
		statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
		print("Auto Clicker Stopped")
	else
		clicking = true
		playBtn.Text = "STOP"
		playBtn.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
		statusLabel.Text = "Clicking at center..."
		statusLabel.TextColor3 = Color3.fromRGB(0, 255, 100)

		local speed = tonumber(speedBox.Text) or 0.01
		if speed < 0.0001 then speed = 0.0001 end

		print("Auto Clicker Started | Speed:", speed)

		clickConnection = RunService.Heartbeat:Connect(function()
			if not clicking then return end

			-- Click in the middle of the screen
			local camera = workspace.CurrentCamera
			local viewport = camera.ViewportSize
			local centerX = viewport.X / 2
			local centerY = viewport.Y / 2

			VirtualInputManager:SendMouseButtonEvent(centerX, centerY, 0, true, game, 0)
			VirtualInputManager:SendMouseButtonEvent(centerX, centerY, 0, false, game, 0)

			task.wait(speed)
		end)
	end
end

-- Connections
playBtn.MouseButton1Click:Connect(toggleClicking)

closeBtn.MouseButton1Click:Connect(function()
	clicking = false
	if clickConnection then clickConnection:Disconnect() end
	screenGui:Destroy()
end)

print("✅ Auto Clicker Ready!")
print("• Green line in the middle of the screen")
print("• Click START to begin auto clicking at the center")

Features & Information

Use it for clicker games.

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts