-- Locals local VirtualInputManager = game:GetService("VirtualInputManager") local ScreenGui = Instance.new("ScreenGui", game.CoreGui) -- GUI local ControlPanel = Instance.new("Frame", ScreenGui) ControlPanel.Size = UDim2.new(0, 60, 0, 120) ControlPanel.Position = UDim2.new(0, 20, 0.5, -60) ControlPanel.BackgroundColor3 = Color3.fromRGB(45, 45, 45) ControlPanel.Active = true ControlPanel.Draggable = true -- Play Button local PlayButton = Instance.new("TextButton", ControlPanel) PlayButton.Size = UDim2.new(1, 0, 0, 40) PlayButton.BackgroundTransparency = 1 PlayButton.Text = "▶" PlayButton.TextColor3 = Color3.fromRGB(0, 150, 255) PlayButton.TextSize = 30 PlayButton.Active = true -- Close local CloseButton = Instance.new("TextButton", ControlPanel) CloseButton.Size = UDim2.new(1, 0, 0, 40) CloseButton.Position = UDim2.new(0, 0, 0, 40) CloseButton.BackgroundTransparency = 1 CloseButton.Text = "X" CloseButton.TextColor3 = Color3.fromRGB(255, 50, 50) CloseButton.TextSize = 25 -- Drag local DragHandle = Instance.new("Frame", ControlPanel) DragHandle.Size = UDim2.new(1, 0, 0, 40) DragHandle.Position = UDim2.new(0, 0, 0, 80) DragHandle.BackgroundColor3 = Color3.fromRGB(0, 0, 0) --Target local TargetPoint = Instance.new("Frame", ScreenGui) TargetPoint.Size = UDim2.new(0, 40, 0, 40) TargetPoint.Position = UDim2.new(0.5, 0, 0.5, 0) TargetPoint.BackgroundColor3 = Color3.fromRGB(0, 150, 255) TargetPoint.Active = true TargetPoint.Draggable = true local Corner = Instance.new("UICorner", TargetPoint) Corner.CornerRadius = UDim.new(1, 0) -- Local _G.AutoClickerActive = false CloseButton.MouseButton1Click:Connect(function() ScreenGui:Destroy() end) PlayButton.MouseButton1Click:Connect(function() _G.AutoClickerActive = not _G.AutoClickerActive PlayButton.Text = _G.AutoClickerActive and "■" or "▶" end) -- functionality task.spawn(function() while true do if _G.AutoClickerActive then -- Вычисление центра как наиболее точной "ближайшей" точки local pos = TargetPoint.AbsolutePosition local size = TargetPoint.AbsoluteSize local centerX = pos.X + (size.X / 2) local centerY = pos.Y + (size.Y / 2) VirtualInputManager:SendMouseButtonEvent(centerX, centerY, 0, true, game, 0) VirtualInputManager:SendMouseButtonEvent(centerX, centerY, 0, false, game, 0) task.wait(0.0001) else task.wait(0.1) end end end)