-- add us on roblox vincentplayz9356 local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local refreshRate = 0.1 local buttonSize = UDim2.new(0, 100, 0, 50) local buttonPosition = UDim2.new(0.5, -50, 0.9, -25) local ccamount = 0 local isEnabled = false local running = false local screenGui = Instance.new("ScreenGui") screenGui.Name = "AutoClickerGui" screenGui.Parent = game:GetService("CoreGui") local toggleButton = Instance.new("TextButton") toggleButton.Name = "ToggleButton" toggleButton.Size = buttonSize toggleButton.Position = buttonPosition toggleButton.AnchorPoint = Vector2.new(0.5, 0.5) toggleButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50) toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) toggleButton.Text = "OFF" toggleButton.Font = Enum.Font.SourceSansBold toggleButton.TextSize = 18 toggleButton.Parent = screenGui local function fireAllClickDetectors() if not running then return end ccamount = 0 for _, v in pairs(game:GetDescendants()) do if v:IsA("ClickDetector") then ccamount = ccamount + 1 fireclickdetector(v) end end task.wait(refreshRate) fireAllClickDetectors() end local function toggle() isEnabled = not isEnabled if isEnabled then toggleButton.BackgroundColor3 = Color3.fromRGB(50, 255, 50) toggleButton.Text = "ON" running = true fireAllClickDetectors() else toggleButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50) toggleButton.Text = "OFF" running = false end end toggleButton.Activated:Connect(toggle) local dragging local dragInput local dragStart local startPos local function update(input) local delta = input.Position - dragStart toggleButton.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end toggleButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = toggleButton.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) toggleButton.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 dragging and (input == dragInput) then update(input) end end)