-- ПОСТРОЙ САМОЛЕТ - Авто Фарм с Умным Возвратом -- Автоматически запускает, летит вперед, возвращается при $1300 для максимизации прибыли local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local Players = game:GetService("Players") local Player = Players.LocalPlayer local PlayerGui = Player:WaitForChild("PlayerGui") -- Переменные персонажа (будут обновлены при респавне) local Character = Player.Character or Player.CharacterAdded:Wait() local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart") local Humanoid = Character:WaitForChild("Humanoid") -- Получение удаленных событий (для запуска/возврата) local Remotes = ReplicatedStorage:WaitForChild("Remotes", 10) local LaunchEvents = Remotes:WaitForChild("LaunchEvents", 10) local LaunchRemote = LaunchEvents:WaitForChild("Launch") local ReturnRemote = LaunchEvents:WaitForChild("Return") -- Простой GUI local ScreenGui = PlayerGui:FindFirstChild("SimpleFly") if ScreenGui then ScreenGui:Destroy() end ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "SimpleFly" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = PlayerGui local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 350, 0, 380) MainFrame.Position = UDim2.new(0, 10, 0.5, -190) MainFrame.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1) MainFrame.BorderSizePixel = 2 MainFrame.BorderColor3 = Color3.new(0, 1, 0) MainFrame.Active = true MainFrame.Draggable = true MainFrame.Parent = ScreenGui -- Заголовок local TitleLabel = Instance.new("TextLabel") TitleLabel.Size = UDim2.new(1, 0, 0, 35) TitleLabel.BackgroundColor3 = Color3.new(0, 0.5, 0) TitleLabel.Text = "✈️ АВТО ФАРМ ПОЛЕТ" TitleLabel.TextColor3 = Color3.new(1, 1, 1) TitleLabel.TextScaled = true TitleLabel.Font = Enum.Font.SourceSansBold TitleLabel.Parent = MainFrame -- Отображение денег local MoneyLabel = Instance.new("TextLabel") MoneyLabel.Size = UDim2.new(0.9, 0, 0, 30) MoneyLabel.Position = UDim2.new(0.05, 0, 0, 45) MoneyLabel.BackgroundColor3 = Color3.new(0.15, 0.15, 0.15) MoneyLabel.Text = "Заработано: $0 | Расстояние: 0" MoneyLabel.TextColor3 = Color3.new(1, 1, 0) MoneyLabel.TextScaled = true MoneyLabel.Font = Enum.Font.SourceSansBold MoneyLabel.Parent = MainFrame -- Переключатель авто фарма local AutoFarmToggle = Instance.new("TextButton") AutoFarmToggle.Size = UDim2.new(0.9, 0, 0, 40) AutoFarmToggle.Position = UDim2.new(0.05, 0, 0, 80) AutoFarmToggle.BackgroundColor3 = Color3.new(0.5, 0, 0) AutoFarmToggle.Text = "АВТО ФАРМ: ВЫКЛ" AutoFarmToggle.TextColor3 = Color3.new(1, 1, 1) AutoFarmToggle.TextScaled = true AutoFarmToggle.Font = Enum.Font.SourceSansBold AutoFarmToggle.Parent = MainFrame -- Переключатель полета local FlyToggle = Instance.new("TextButton") FlyToggle.Size = UDim2.new(0.9, 0, 0, 40) FlyToggle.Position = UDim2.new(0.05, 0, 0, 125) FlyToggle.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3) FlyToggle.Text = "ПОЛЕТ: ВЫКЛ" FlyToggle.TextColor3 = Color3.new(1, 0.3, 0.3) FlyToggle.TextScaled = true FlyToggle.Font = Enum.Font.SourceSansBold FlyToggle.Parent = MainFrame -- Ввод скорости local SpeedLabel = Instance.new("TextLabel") SpeedLabel.Size = UDim2.new(0.4, 0, 0, 30) SpeedLabel.Position = UDim2.new(0.05, 0, 0, 170) SpeedLabel.BackgroundTransparency = 1 SpeedLabel.Text = "Скорость:" SpeedLabel.TextColor3 = Color3.new(1, 1, 1) SpeedLabel.TextScaled = true SpeedLabel.Font = Enum.Font.SourceSans SpeedLabel.Parent = MainFrame local SpeedInput = Instance.new("TextBox") SpeedInput.Size = UDim2.new(0.5, 0, 0, 30) SpeedInput.Position = UDim2.new(0.45, 0, 0, 170) SpeedInput.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2) SpeedInput.Text = "5000" SpeedInput.TextColor3 = Color3.new(1, 1, 1) SpeedInput.TextScaled = true SpeedInput.Font = Enum.Font.SourceSans SpeedInput.Parent = MainFrame -- Кнопки вверх/вниз local UpButton = Instance.new("TextButton") UpButton.Size = UDim2.new(0.42, 0, 0, 35) UpButton.Position = UDim2.new(0.05, 0, 0, 210) UpButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.4) UpButton.Text = "⬆️ ВВЕРХ" UpButton.TextColor3 = Color3.new(1, 1, 1) UpButton.TextScaled = true UpButton.Font = Enum.Font.SourceSansBold UpButton.Parent = MainFrame local DownButton = Instance.new("TextButton") DownButton.Size = UDim2.new(0.42, 0, 0, 35) DownButton.Position = UDim2.new(0.53, 0, 0, 210) DownButton.BackgroundColor3 = Color3.new(0.4, 0.2, 0.2) DownButton.Text = "⬇️ ВНИЗ" DownButton.TextColor3 = Color3.new(1, 1, 1) DownButton.TextScaled = true DownButton.Font = Enum.Font.SourceSansBold DownButton.Parent = MainFrame -- Кнопки ручного запуска/возврата local LaunchButton = Instance.new("TextButton") LaunchButton.Size = UDim2.new(0.42, 0, 0, 35) LaunchButton.Position = UDim2.new(0.05, 0, 0, 250) LaunchButton.BackgroundColor3 = Color3.new(0, 0.4, 0.8) LaunchButton.Text = "🚀 ЗАПУСК" LaunchButton.TextColor3 = Color3.new(1, 1, 1) LaunchButton.TextScaled = true LaunchButton.Font = Enum.Font.SourceSansBold LaunchButton.Parent = MainFrame local ReturnButton = Instance.new("TextButton") ReturnButton.Size = UDim2.new(0.42, 0, 0, 35) ReturnButton.Position = UDim2.new(0.53, 0, 0, 250) ReturnButton.BackgroundColor3 = Color3.new(0.5, 0.3, 0) ReturnButton.Text = "💰 ВОЗВРАТ" ReturnButton.TextColor3 = Color3.new(1, 1, 1) ReturnButton.TextScaled = true ReturnButton.Font = Enum.Font.SourceSansBold ReturnButton.Parent = MainFrame -- Отображение статистики local StatsLabel = Instance.new("TextLabel") StatsLabel.Size = UDim2.new(0.9, 0, 0, 50) StatsLabel.Position = UDim2.new(0.05, 0, 0, 290) StatsLabel.BackgroundColor3 = Color3.new(0.15, 0.15, 0.15) StatsLabel.Text = "Запусков: 0 | Всего: $0\nСтатус: Готов" StatsLabel.TextColor3 = Color3.new(0.7, 1, 0.7) StatsLabel.TextScaled = true StatsLabel.Font = Enum.Font.SourceSans StatsLabel.Parent = MainFrame -- Переменные local flying = false local autoFarm = false local flyConnection = nil local monitorConnection = nil local flySpeed = 5000 local totalRuns = 0 local totalEarned = 0 local startMoney = 0 local currentMoney = 0 local isLaunched = false -- Функция обновления ссылок на персонажа local function updateCharacter() Character = Player.Character if Character then HumanoidRootPart = Character:WaitForChild("HumanoidRootPart") Humanoid = Character:WaitForChild("Humanoid") -- Включить кнопки после респавна FlyToggle.Active = true UpButton.Active = true DownButton.Active = true SpeedInput.Editable = true end end -- Получить текущие деньги (игра использует Cash, не Money) local function getCurrentMoney() local leaderstats = Player:WaitForChild("leaderstats", 5) if leaderstats then local cash = leaderstats:FindFirstChild("Cash") if cash then return tonumber(cash.Value) or 0 end end return 0 end -- Получить текущее расстояние local function getCurrentDistance() local leaderstats = Player:WaitForChild("leaderstats", 5) if leaderstats then local distance = leaderstats:FindFirstChild("Distance") if distance then return tonumber(distance.Value) or 0 end end return 0 end -- Рассчитать ожидаемые деньги от расстояния (формула игры) local function calculateCashFromDistance(distance) if distance <= 0 then return 0 end local cash = (distance ^ 0.9) * 0.1 return math.round(cash) end -- Очистка старых подключений local function cleanup() if flyConnection then flyConnection:Disconnect() flyConnection = nil end if monitorConnection then monitorConnection:Disconnect() monitorConnection = nil end -- Удалить любые BodyMovers if HumanoidRootPart and HumanoidRootPart.Parent then for _, obj in pairs(HumanoidRootPart:GetChildren()) do if obj:IsA("BodyVelocity") or obj:IsA("BodyPosition") or obj:IsA("BodyGyro") or obj:IsA("BodyMover") then obj:Destroy() end end end end -- Начать полет вперед (ПРОСТАЯ ВЕРСИЯ - просто телепорт) local function startFlying() if not HumanoidRootPart or not HumanoidRootPart.Parent then updateCharacter() if not HumanoidRootPart then return end end cleanup() -- Сначала очистка flying = true FlyToggle.Text = "ПОЛЕТ: ВКЛ" FlyToggle.TextColor3 = Color3.new(0.3, 1, 0.3) FlyToggle.BackgroundColor3 = Color3.new(0.1, 0.3, 0.1) -- Просто телепорт на целевое расстояние на экстремальной высоте -- 15000 расстояние = ~$600 HumanoidRootPart.CFrame = CFrame.new(15030, 9000000000, 0) -- 15000 + 30 (смещение старта) task.wait(0.5) -- Держать на экстремальной высоте, чтобы избежать проблем spawn(function() while flying do if HumanoidRootPart and HumanoidRootPart.Parent then -- Держать на экстремальной высоте if HumanoidRootPart.Position.Y < 9000000000 then HumanoidRootPart.CFrame = CFrame.new(HumanoidRootPart.Position.X, 9000000000, HumanoidRootPart.Position.Z) end end task.wait(0.1) end end) end -- Остановить полет local function stopFlying() flying = false FlyToggle.Text = "ПОЛЕТ: ВЫКЛ" FlyToggle.TextColor3 = Color3.new(1, 0.3, 0.3) FlyToggle.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3) cleanup() end -- Авто возврат при достижении оптимальных денег (НЕ НУЖНО С МОМЕНТАЛЬНЫМ ТЕЛЕПОРТОМ) local function checkMoneyAndReturn() -- Эта функция больше не нужна с методом мгновенного телепорта -- Оставляем пустой для совместимости end -- Начать цикл авто фарма (ВЕРСИЯ С МОМЕНТАЛЬНЫМ ТЕЛЕПОРТОМ) function startAutoFarmCycle() if not autoFarm then return end -- Обновить персонажа, если нужно if not HumanoidRootPart or not HumanoidRootPart.Parent then updateCharacter() end -- Записать стартовые деньги ПЕРЕД запуском startMoney = getCurrentMoney() currentMoney = startMoney local startDistance = getCurrentDistance() MoneyLabel.Text = "Деньги: $0 | Расстояние: 0" print(string.format("Начало - Деньги: $%d, Расстояние: %d", startMoney, startDistance)) -- Запуск LaunchRemote:FireServer() isLaunched = true StatsLabel.Text = string.format("Запусков: %d | Всего: $%d\nЗапуск...", totalRuns, totalEarned) task.wait(2) -- Ждать регистрации запуска -- МОМЕНТАЛЬНЫЙ ТЕЛЕПОРТ на 15000 расстояние на экстремальной высоте print("Телепорт на расстояние 15000...") HumanoidRootPart.CFrame = CFrame.new(15030, 9000000000, 0) -- X=15030 для 15000 расстояния task.wait(3) -- Ждать дольше для регистрации позиции -- Авто возврат print("Возврат...") ReturnRemote:FireServer() isLaunched = false task.wait(2) -- Ждать награды local finalCash = getCurrentMoney() local earnedThisRun = finalCash - startMoney if earnedThisRun > 0 then totalRuns = totalRuns + 1 totalEarned = totalEarned + earnedThisRun StatsLabel.Text = string.format("Запусков: %d | Всего: $%d\nЗаработано: $%d", totalRuns, totalEarned, earnedThisRun) MoneyLabel.Text = string.format("Последние заработанные: $%d", earnedThisRun) print(string.format("Запуск %d заработано: $%d", totalRuns, earnedThisRun)) else print("Денег не заработано - пробуем снова...") end -- Продолжить авто фарм if autoFarm then task.wait(1) startAutoFarmCycle() end end -- Обработчики кнопок AutoFarmToggle.MouseButton1Click:Connect(function() autoFarm = not autoFarm if autoFarm then AutoFarmToggle.Text = "АВТО ФАРМ: ВКЛ" AutoFarmToggle.BackgroundColor3 = Color3.new(0, 0.7, 0) AutoFarmToggle.TextColor3 = Color3.new(1, 1, 1) startAutoFarmCycle() else AutoFarmToggle.Text = "АВТО ФАРМ: ВЫКЛ" AutoFarmToggle.BackgroundColor3 = Color3.new(0.5, 0, 0) AutoFarmToggle.TextColor3 = Color3.new(1, 1, 1) stopFlying() isLaunched = false end end) LaunchButton.MouseButton1Click:Connect(function() if not HumanoidRootPart or not HumanoidRootPart.Parent then updateCharacter() end -- Получить деньги перед запуском startMoney = getCurrentMoney() currentMoney = startMoney print("Начальные деньги:", startMoney) LaunchRemote:FireServer() isLaunched = true MoneyLabel.Text = "Телепорт на 15000..." LaunchButton.Text = "✅ ЗАПУЩЕНО" task.wait(2) -- МОМЕНТАЛЬНЫЙ ТЕЛЕПОРТ на 15000 расстояние print("Телепорт на расстояние 15000...") HumanoidRootPart.CFrame = CFrame.new(15030, 9000000000, 0) spawn(function() task.wait(0.5) LaunchButton.Text = "🚀 ЗАПУСК" end) end) FlyToggle.MouseButton1Click:Connect(function() if not HumanoidRootPart or not HumanoidRootPart.Parent then updateCharacter() end if flying then stopFlying() else -- Метод мгновенного телепорта - скорость не нужна startFlying() end end) SpeedInput.FocusLost:Connect(function() flySpeed = tonumber(SpeedInput.Text) or 5000 end) UpButton.MouseButton1Click:Connect(function() if not HumanoidRootPart or not HumanoidRootPart.Parent then updateCharacter() end if HumanoidRootPart then -- Телепорт вверх на 50 стадов HumanoidRootPart.CFrame = HumanoidRootPart.CFrame + Vector3.new(0, 50, 0) end end) DownButton.MouseButton1Click:Connect(function() if not HumanoidRootPart or not HumanoidRootPart.Parent then updateCharacter() end if HumanoidRootPart then -- Не опускаться ниже 400, чтобы избежать ВСЕХ препятствий local newY = math.max(HumanoidRootPart.Position.Y - 30, 400) HumanoidRootPart.CFrame = CFrame.new( HumanoidRootPart.Position.X, newY, HumanoidRootPart.Position.Z ) end end) ReturnButton.MouseButton1Click:Connect(function() if not isLaunched then return end -- Получить финальное расстояние перед возвратом local finalX = HumanoidRootPart and HumanoidRootPart.Position.X or 0 local finalDistance = math.max(finalX - 30, 0) stopFlying() ReturnRemote:FireServer() -- Ждать обновления денег task.wait(1) local finalCash = getCurrentMoney() local earned = finalCash - startMoney if earned > 0 then totalRuns = totalRuns + 1 totalEarned = totalEarned + earned MoneyLabel.Text = string.format("Заработано: $%d | Расстояние: %d", earned, math.round(finalDistance)) StatsLabel.Text = string.format("Запусков: %d | Всего: $%d\nПоследние заработанные: $%d", totalRuns, totalEarned, earned) print(string.format("Запуск %d - Заработано: $%d, Расстояние: %d", totalRuns, earned, math.round(finalDistance))) else StatsLabel.Text = string.format("Запусков: %d | Всего: $%d\nДенег не заработано", totalRuns, totalEarned) end isLaunched = false ReturnButton.Text = "✅ ВОЗВРАЩЕНО" spawn(function() task.wait(1) ReturnButton.Text = "💰 ВОЗВРАТ" end) end) -- Мониторинг для обновлений отображения spawn(function() while true do if isLaunched and HumanoidRootPart then local currentX = HumanoidRootPart.Position.X local distance = math.max(currentX - 30, 0) local expectedCash = calculateCashFromDistance(distance) MoneyLabel.Text = string.format("Расстояние: %d | Ожидаемо: $%d", math.round(distance), expectedCash) end task.wait(0.5) end end) -- Периодическое обновление отображения денег spawn(function() while true do local cash = getCurrentMoney() local distance = getCurrentDistance() -- Обновлять отображение общих денег только когда не в полете if not isLaunched then local cashText = string.format("Всего Денег: $%d | Лучшее Расстояние: %d", cash, distance) -- Не перезаписывать отображение заработанных во время запусков end task.wait(1) end end) -- Обработка респавна персонажа Player.CharacterAdded:Connect(function(char) task.wait(1) -- Ждать загрузки персонажа updateCharacter() -- Сброс состояний flying = false isLaunched = false FlyToggle.Text = "ПОЛЕТ: ВЫКЛ" FlyToggle.TextColor3 = Color3.new(1, 0.3, 0.3) FlyToggle.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3) -- Продолжить авто фарм, если был включен if autoFarm then task.wait(2) startAutoFarmCycle() end end) -- Очистка при смерти персонажа if Humanoid then Humanoid.Died:Connect(function() cleanup() flying = false isLaunched = false end) end print("=== АВТО ФАРМ ПОЛЕТ ЗАГРУЖЕН ===") print("") print("Информация об игре:") print("• Формула денег: (расстояние^0.9) * 0.1") print("• Расстояние = X позиция - 30") print("• Телепорт на 15000 расстояние (~$600)") print("") print("Функции:") print("✅ Мгновенный телепорт на 15000 расстояние") print("✅ Экстремальная высота (9 миллиардов) для избежания всех препятствий") print("✅ ~$600 за запуск (безопаснее, чем на большие расстояния)") print("✅ Режим авто фарма для непрерывного фарминга") print("✅ Работает после респавна") print("") print("Как использовать:") print("1. Нажмите АВТО ФАРМ для запуска") print("2. Скрипт автоматически запускает, телепортирует и возвращает") print("3. Получает ~$600 за запуск надежно")