local VirtualInputManager = game:GetService("VirtualInputManager") local UserInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local isEnabled = false local lastHealth = humanoid.Health local isHoldingF = false local screenGui = Instance.new("ScreenGui", player.PlayerGui) screenGui.Name = "MacroStatusGui" screenGui.ResetOnSpawn = false local statusLabel = Instance.new("TextLabel", screenGui) statusLabel.Size = UDim2.new(0, 200, 0, 50) statusLabel.Position = UDim2.new(0.5, -100, 0, 20) statusLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0) statusLabel.BackgroundTransparency = 0.5 statusLabel.TextColor3 = Color3.fromRGB(255, 0, 0) -- Красный по дефолту (OFF) statusLabel.TextSize = 20 statusLabel.Font = Enum.Font.SourceSansBold statusLabel.Text = "MACRO: OFF [U]" -- Функция обновления интерфейса local function updateGui() if isEnabled then statusLabel.Text = "MACRO: ON [U]" statusLabel.TextColor3 = Color3.fromRGB(0, 255, 0) -- Зеленый else statusLabel.Text = "MACRO: OFF [U]" statusLabel.TextColor3 = Color3.fromRGB(255, 0, 0) -- Красный end end -- --- ЛОГИКА ВКЛЮЧЕНИЯ/ВЫКЛЮЧЕНИЯ --- UserInputService.InputBegan:Connect(function(input, gameProcessed) if not gameProcessed and input.KeyCode == Enum.KeyCode.U then isEnabled = not isEnabled if not isEnabled and isHoldingF then -- Если выключаем, отпускаем F isHoldingF = false VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.F, false, game) end updateGui() end end) task.spawn(function() while true do if isEnabled then VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0) task.wait(0.1) VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 0) task.wait(0.4) else task.wait(0.5) end end end) -- 2. Клавиша "1" (5 сек) task.spawn(function() while true do task.wait(5) if isEnabled then VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.One, false, game) task.wait(0.1) VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.One, false, game) end end end) -- 3. Авто-блок F при уроне (1.5 сек) task.spawn(function() while true do task.wait(1.5) if isEnabled and humanoid then local currentHealth = humanoid.Health if currentHealth < lastHealth then if not isHoldingF then isHoldingF = true VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.F, false, game) end else if isHoldingF then isHoldingF = false VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.F, false, game) end end lastHealth = currentHealth end end end) player.CharacterAdded:Connect(function(newChar) character = newChar humanoid = newChar:WaitForChild("Humanoid") lastHealth = humanoid.Health end)