Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Made by FreshGamer723
- local player = game.Players.LocalPlayer
- local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- screenGui.Name = "AutoClickerGUI"
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 200, 0, 50)
- toggleButton.Position = UDim2.new(0.5, -100, 0.9, -25)
- toggleButton.Text = "Toggle Auto-Clicker: OFF"
- toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- toggleButton.Parent = screenGui
- local isAutoClickEnabled = false
- local replicatedStorage = game:GetService("ReplicatedStorage")
- local clickEvent = replicatedStorage:WaitForChild("Events"):WaitForChild("GarfieldClicked")
- local function toggleAutoClick()
- isAutoClickEnabled = not isAutoClickEnabled
- toggleButton.Text = "Toggle Auto-Clicker: " .. (isAutoClickEnabled and "ON" or "OFF")
- toggleButton.BackgroundColor3 = isAutoClickEnabled and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
- if isAutoClickEnabled then
- -- Start the auto-click loop
- spawn(function()
- while isAutoClickEnabled do
- wait() -- Adjust wait time if needed
- clickEvent:FireServer()
- end
- end)
- end
- end
- toggleButton.MouseButton1Click:Connect(toggleAutoClick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement