Universal Script 📌
3.6k Views
43 Executions

Auto clickDetector

Universal Script 📌
TengeMan
TengeMan10 followers
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

You can fire every clickDetector on the game

View Raw
-- Create GUI Elements
local ScreenGui = Instance.new("ScreenGui")
local ToggleButton = Instance.new("TextButton")

-- Parent GUI to Player's ScreenGui
ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")

-- Setup Toggle Button
ToggleButton.Size = UDim2.new(0, 200, 0, 50)
ToggleButton.Position = UDim2.new(0.5, -100, 0.9, -25) -- Centered at the bottom
ToggleButton.Text = "Auto Click: OFF"
ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red for OFF
ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleButton.Parent = ScreenGui

-- Variables
local autoClickEnabled = false

-- Function to toggle Auto Click
ToggleButton.MouseButton1Click:Connect(function()
    autoClickEnabled = not autoClickEnabled
    if autoClickEnabled then
        ToggleButton.Text = "Auto Click: ON"
        ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green for ON
        startAutoClick()
    else
        ToggleButton.Text = "Auto Click: OFF"
        ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red for OFF
    end
end)

-- Function to start auto-clicking
function startAutoClick()
    spawn(function()
        while autoClickEnabled do
            for _, part in ipairs(workspace:GetDescendants()) do
                if part:IsA("ClickDetector") and part.Parent then
                    fireclickdetector(part)
                    wait(0.1) -- Adjust the delay as needed
                end


Comments

1
Log in to join the conversation. Login
nhip147231's profile picture
nhip1472312 years ago(edited)

Can i change the radius of autoclick

1

More universal scripts

See all
Script hub
16.3k
3.2k
Bumped 10 minutes ago
Key System
Paid
Script hub
16.9k
86.9k
Bumped 11 minutes ago
Script hub
134
26
Approved 2 hours ago