Auto Clicker

Not rlly a script but it can be used still

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local isClicking = false
local screenGui = Instance.new("ScreenGui")
local toggleButton = Instance.new("TextButton")
screenGui.Name = "AutoClickerGUI"
screenGui.Parent = player:WaitForChild("PlayerGui")
toggleButton.Name = "ToggleButton"
toggleButton.Size = UDim2.new(0, 200, 0, 50)
toggleButton.Position = UDim2.new(0.5, -100, 0.5, 0)
toggleButton.Text = "Start Auto-Clicking"
toggleButton.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.Font = Enum.Font.SourceSansBold
toggleButton.TextSize = 20
toggleButton.Parent = screenGui
toggleButton.MouseButton1Click:Connect(function()
  isClicking = not isClicking
  if isClicking then
toggleButton.Text = "Stop Auto-Clicking"
while isClicking do
wait(0.1) -- Interval between clicks
mouse:Click() -- Simulates a mouse click
end
  else
toggleButton.Text = "Start Auto-Clicking"
  end
end)