local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local VirtualInputManager = game:GetService("VirtualInputManager") local localPlayer = Players.LocalPlayer local currentTarget = nil local followConnection = nil local lastTeleportTime = 0 local lastClickTime = 0 local teleportCooldown = 0.15 local clickCooldown = 0.1 local killCooldown = 1.5 -- Функция для автоматического взятия ножа (улучшенная) function equipKnife() if not localPlayer.Character then return false end local attempts = 0 local maxAttempts = 10 while attempts < maxAttempts do local backpack = localPlayer:FindFirstChild("Backpack") if backpack then -- Ищем нож разными способами local knife = backpack:FindFirstChild("Knife") or backpack:FindFirstChild("knife") or backpack:FindFirstChild("KnifeTool") or backpack:FindFirstChild("KnifeWeapon") -- Если не нашли по точному имени, ищем по частичному if not knife then for _, item in ipairs(backpack:GetChildren()) do if item:IsA("Tool") and (item.Name:lower():find("knife") or item.Name:lower():find("нож")) then knife = item break end end end if knife then -- Даем небольшую задержку для стабильности wait(0.3) knife.Parent = localPlayer.Character print("✓ Нож взят: " .. knife.Name) return true end end attempts += 1 wait(0.5) -- Ждем перед следующей попыткой end warn("Не удалось найти нож после " .. maxAttempts .. " попыток") return false end -- Создаем фарм-платформу в воздухе function createFarmPlatform() if workspace:FindFirstChild("FarmPlatform") then workspace:FindFirstChild("FarmPlatform"):Destroy() end local platform = Instance.new("Part") platform.Name = "FarmPlatform" platform.Size = Vector3.new(50, 5, 50) platform.Position = Vector3.new(0, 100, 0) platform.Anchored = true platform.CanCollide = true platform.Transparency = 0.5 platform.Color = Color3.fromRGB(0, 255, 0) platform.Material = Enum.Material.Neon platform.Parent = workspace local killTrigger = Instance.new("Part") killTrigger.Name = "KillTrigger" killTrigger.Size = Vector3.new(100, 2, 100) killTrigger.Position = Vector3.new(0, 97, 0) killTrigger.Anchored = true killTrigger.CanCollide = false killTrigger.Transparency = 1 killTrigger.Touched:Connect(function(hit) onKill(hit) end) killTrigger.Parent = workspace return platform end -- Функция для обработки убийств function onKill(hit) if hit and hit.Parent then local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid and humanoid.Health > 0 then humanoid.Health = 0 print("✓ Убийство засчитано!") teleportToPlatform() -- Задержка 1.5 секунды после убийства print("Ожидание " .. killCooldown .. " секунд...") wait(killCooldown) findNewTarget() end end end -- Мгновенная телепортация на фарм-платформу function teleportToPlatform() local myChar = localPlayer.Character if not myChar then return end local humanoidRootPart = myChar:FindFirstChild("HumanoidRootPart") if not humanoidRootPart then return end humanoidRootPart.CFrame = CFrame.new(0, 103, 0) print("Телепортация на фарм-платформу!") end -- Функция авто-клика function autoClick() local currentTime = tick() if currentTime - lastClickTime < clickCooldown then return end lastClickTime = currentTime -- Симулируем нажатие левой кнопки мыши pcall(function() VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 1) wait(0.05) VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 1) end) end -- Поиск нового живого игрока function findNewTarget() local players = Players:GetPlayers() local alivePlayers = {} for _, player in ipairs(players) do if player ~= localPlayer and player.Character then local humanoid = player.Character:FindFirstChild("Humanoid") if humanoid and humanoid.Health > 0 then table.insert(alivePlayers, player) end end end if #alivePlayers > 0 then local randomIndex = math.random(1, #alivePlayers) currentTarget = alivePlayers[randomIndex] print("Новая цель: " .. currentTarget.Name) return true else print("Нет живых игроков!") currentTarget = nil return false end end -- Быстрая телепортация вокруг текущей цели function teleportAroundTarget() if not currentTarget or not currentTarget.Character then if not findNewTarget() then return false end end local targetChar = currentTarget.Character local humanoidRootPart = targetChar:FindFirstChild("HumanoidRootPart") local humanoid = targetChar:FindFirstChild("Humanoid") local myChar = localPlayer.Character if not myChar then return false end local myRoot = myChar:FindFirstChild("HumanoidRootPart") if not myRoot then return false end -- Проверяем что цель жива if not humanoidRootPart or not humanoid or humanoid.Health <= 0 then -- Цель умерла, ищем новую if not findNewTarget() then return false end return true end local currentTime = tick() if currentTime - lastTeleportTime < teleportCooldown then return false end lastTeleportTime = currentTime local randomAngle = math.random(0, 360) local distance = math.random(3, 5) local offset = CFrame.Angles(0, math.rad(randomAngle), 0) local positionOffset = offset * Vector3.new(0, 0, distance) positionOffset = positionOffset + Vector3.new(0, math.random(1, 3), 0) local targetCFrame = humanoidRootPart.CFrame local newPosition = targetCFrame.Position + positionOffset -- Безопасная телепортация pcall(function() myRoot.CFrame = CFrame.new(newPosition, targetCFrame.Position) end) return true end -- Основная функция активации фарма function toggleFarm() if followConnection then followConnection:Disconnect() followConnection = nil currentTarget = nil print("Фарм остановлен.") else -- Проверяем что персонаж существует if not localPlayer.Character then warn("Нет персонажа! Дождитесь спавна.") return end createFarmPlatform() equipKnife() -- Берем нож при включении фарма if not findNewTarget() then warn("Нет живых игроков для атаки!") return end followConnection = RunService.Heartbeat:Connect(function() -- Телепортация вокруг цели teleportAroundTarget() -- Авто-клик (атака) autoClick() end) print("Фарм активирован!") print("✓ Авто-телепортация") print("✓ Авто-кликер") print("Текущая цель: " .. currentTarget.Name) end end -- ===== ИНИЦИАЛИЗАЦИЯ ===== createFarmPlatform() -- Слушаем смерть персонажа и берем нож при respawn localPlayer.CharacterAdded:Connect(function(character) print("Персонаж заспавнился, берем нож...") character:WaitForChild("Humanoid") wait(1.5) -- Даем больше времени на загрузку бэкпака equipKnife() -- Если фарм был активен, продолжаем if followConnection then wait(0.5) findNewTarget() end end) -- Бинд на клавишу F для включения/выключения фарма UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.F then toggleFarm() end end) -- Берем нож при запуске если персонаж уже есть if localPlayer.Character then wait(2) equipKnife() end print(" - AriOTR made dis")