
Key Required VerifiedUniversal

local repo = "https://raw.githubusercontent.com/deividcomsono/Obsidian/main/"
local Library = loadstring(game:HttpGet(repo .. "Library.lua"))()
local Toggles = Library.Toggles
Library.ForceCheckbox = false
Library.ShowToggleFrameInKeybinds = true
local Window = Library:CreateWindow({
Title = "Auto Farm",
Footer = "version: 1.0",
NotifySide = "Right",
ShowCustomCursor = true,
})
local Tabs = {
Main = Window:AddTab("Main", "user"),
}
local FarmGroupBox = Tabs.Main:AddLeftGroupbox("Auto Farm")
-- Переменные для управления
local isRunning = false
local isSnowmanEnabled = false
local cycleCount = 0
local snowmanCycleThreshold = 10
-- Переменная для хранения корутины
local farmConnection = nil
-- Переменные для auto rebirth
local rebirthConnection = nil
local isRebirthing = false
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
-- Функция для применения настроек скорости и прыжка (работает всегда)
local function applyPlayerStats()
local character = Player.Character
if character then
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.WalkSpeed = 100
humanoid.JumpPower = 70
end
end
end
-- Функция для обновления прогресса циклов
local function updateProgressDisplay()
print("Cycles: " .. cycleCount .. "/" .. snowmanCycleThreshold)
end
-- Функция для заполнения снеговика
local function fillSnowman()
if isSnowmanEnabled and isRunning then
local args = {
"addToSnowman"
}
game:GetService("ReplicatedStorage"):WaitForChild("Signals"):WaitForChild("addToSnowman"):FireServer(unpack(args))
print("Snowman filled! Cycle count reset.")
end
end
-- Функция для выполнения одного полного цикла сбора снега
local function executeSnowFarmCycle()
if not isRunning then return end
-- Первый скрипт 8 раз
for i = 1, 8 do
if not isRunning then break end
local args = {
workspace:WaitForChild("gameSnow"):WaitForChild("GAME_SNOW")
}
game:GetService("ReplicatedStorage"):WaitForChild("Signals"):WaitForChild("collectSnow"):FireServer(unpack(args))
task.wait(0.0001)
end
-- Второй скрипт 1 раз
if isRunning then
local args = {
"stopRoll"
}
game:GetService("ReplicatedStorage"):WaitForChild("Signals"):WaitForChild("snowballControllerFunc"):InvokeServer(unpack(args))
end
-- Увеличиваем счетчик циклов ТОЛЬКО ПОСЛЕ ЗАВЕРШЕНИЯ ПОЛНОГО ЦИКЛА
if isSnowmanEnabled and isRunning then
cycleCount = cycleCount + 1
updateProgressDisplay()
print("Snow collection cycle completed: " .. cycleCount .. "/" .. snowmanCycleThreshold)
-- Проверяем, достигли ли порога для заполнения снеговика (10 циклов)
if cycleCount >= snowmanCycleThreshold then
fillSnowman()
cycleCount = 0
updateProgressDisplay()
end
end
end
-- Основной цикл
local function mainLoop()
while isRunning do
executeSnowFarmCycle()
task.wait(0.0001)
end
end
-- Функция для включения/выключения основного фарма
local function toggleFarm()
isRunning = not isRunning
if isRunning then
farmConnection = task.spawn(mainLoop)
Library:Notify({
Title = "Auto Farm",
Description = "Автофарм включен",
Time = 3,
})
else
cycleCount = 0
updateProgressDisplay()
if farmConnection then
task.cancel(farmConnection)
farmConnection = nil
end
Library:Notify({
Title = "Auto Farm",
Description = "Автофарм выключен",
Time = 3,
})
end
end
-- Функция для включения/выключения снеговика
local function toggleSnowman()
isSnowmanEnabled = not isSnowmanEnabled
if isSnowmanEnabled then
cycleCount = 0
updateProgressDisplay()
print("Snowman filling enabled - will fill every " .. snowmanCycleThreshold .. " snow collection cycles")
Library:Notify({
Title = "Auto Snowman",
Description = "Авто-снеговик включен (каждые 10 циклов)",
Time = 3,
})
else
cycleCount = 0
updateProgressDisplay()
print("Snowman filling disabled")
Library:Notify({
Title = "Auto Snowman",
Description = "Авто-снеговик выключен",
Time = 3,
})
end
end
-- Функция для постоянного применения скорости и прыжка
local function maintainPlayerStats()
while true do
applyPlayerStats()
task.wait(1)
end
end
-- Обработчик появления нового персонажа
local function onCharacterAdded(character)
task.wait(1)
if character then
applyPlayerStats()
end
end
-- Функция для поиска snowmanBase по нику игрока
local function findPlayerSnowmanBase()
local localPlayer = game.Players.LocalPlayer
local playerName = localPlayer.DisplayName or localPlayer.Name
local snowmanBases = workspace:WaitForChild("snowmanBases")
local children = snowmanBases:GetChildren()
for i, base in ipairs(children) do
local success, sign = pcall(function()
return base:FindFirstChild("sign")
end)
if success and sign then
local sign2 = sign:FindFirstChild("sign")
if sign2 then
local surfaceGui = sign2:FindFirstChild("SurfaceGui")
if surfaceGui then
local top = surfaceGui:FindFirstChild("top")
if top and top:IsA("TextLabel") and top.Text:find(playerName) then
return base, i
end
end
end
end
end
return nil, nil
end
-- Функция для выполнения rebirth
local function doRebirth()
print("[Auto Rebirth] Функция запущена")
local localPlayer = game.Players.LocalPlayer
local localUserName = localPlayer.DisplayName or localPlayer.Name
local character = localPlayer.Character
if not character then
warn("[Auto Rebirth] Ошибка: персонаж игрока не найден")
return
end
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoidRootPart then
warn("[Auto Rebirth] Ошибка: HumanoidRootPart не найден")
return
end
-- Сохраняем исходную позицию игрока
local originalPosition = humanoidRootPart.Position
print("[Auto Rebirth] Имя игрока:", localUserName)
-- Ищем нужный snowmanGift по ownerName
local giftSpawns = workspace:FindFirstChild("giftSpawns")
if not giftSpawns then
warn("[Auto Rebirth] Ошибка: giftSpawns не найден")
return
end
print("[Auto Rebirth] giftSpawns найден, ищем snowmanGift...")
-- Проверяем все snowmanGift в giftSpawns
local snowmanGift = nil
local foundGifts = 0
for _, child in ipairs(giftSpawns:GetChildren()) do
if child.Name == "snowmanGift" then
foundGifts = foundGifts + 1
local ownerName = child:FindFirstChild("ownerName")
if ownerName then
print("[Auto Rebirth] Найден snowmanGift с ownerName:", ownerName.Value, "| Нужен:", localUserName)
if ownerName.Value == localUserName or ownerName.Value == localPlayer.Name then
snowmanGift = child
print("[Auto Rebirth] ✓ Найден нужный snowmanGift!")
break
end
else
print("[Auto Rebirth] snowmanGift найден, но ownerName отсутствует")
end
end
end
if foundGifts == 0 then
warn("[Auto Rebirth] Не найдено ни одного snowmanGift в giftSpawns")
end
-- Если нашли нужный snowmanGift, сразу переходим к proxGui
if snowmanGift then
print("[Auto Rebirth] Обрабатываем snowmanGift...")
local hitbox = snowmanGift:FindFirstChild("hitbox")
if hitbox then
print("[Auto Rebirth] hitbox найден")
local proxGui = hitbox:FindFirstChild("proxGui")
if proxGui then
print("[Auto Rebirth] proxGui найден, телепортируем игрока к proxGui...")
-- Получаем позицию proxGui
local proxGuiPosition
for _, part in ipairs(proxGui:GetDescendants()) do
if part:IsA("BasePart") then
proxGuiPosition = part.Position
break
end
end
if not proxGuiPosition then
proxGuiPosition = hitbox.Position
end
-- Телепортируем игрока к proxGui
humanoidRootPart.CFrame = CFrame.new(proxGuiPosition + Vector3.new(0, 3, 0))
print("[Auto Rebirth] Игрок телепортирован к proxGui")
-- Нажимаем E через VirtualInput в цикле, пока proxGui не пропадёт
print("[Auto Rebirth] Начинаем нажимать клавишу E в цикле...")
local VirtualInputManager = game:GetService("VirtualInputManager")
local maxWaitTime = 10
local waitTime = 0
local pressCount = 0
-- Проверяем, существует ли proxGui
while proxGui and proxGui.Parent do
-- Нажимаем E
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, game)
task.wait(0.05)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, game)
pressCount = pressCount + 1
task.wait(0.1)
waitTime = waitTime + 0.15
if waitTime >= maxWaitTime then
warn("[Auto Rebirth] Превышено время ожидания исчезновения proxGui (10 сек)")
break
end
end
print("[Auto Rebirth] proxGui исчез, нажатий E:", pressCount, "| время ожидания:", waitTime, "сек")
-- После исчезновения proxGui телепортируем обратно
print("[Auto Rebirth] Телепортируемся обратно...")
humanoidRootPart.CFrame = CFrame.new(originalPosition)
else
warn("[Auto Rebirth] Ошибка: proxGui не найден в hitbox")
end
else
warn("[Auto Rebirth] Ошибка: hitbox не найден в snowmanGift")
end
else
warn("[Auto Rebirth] snowmanGift с ownerName =", localUserName, "не найден, пропускаем этап подарка")
end
-- Только после того как snowmanGift пропал, выполняем остальной код
print("[Auto Rebirth] Ищем snowmanBase игрока...")
local base, index = findPlayerSnowmanBase()
if base then
print("[Auto Rebirth] snowmanBase найден, индекс:", index)
local rebirthControl = base:FindFirstChild("rebirthControl")
if rebirthControl then
print("[Auto Rebirth] rebirthControl найден")
local button = rebirthControl:FindFirstChild("BUTTON")
if button then
print("[Auto Rebirth] BUTTON найден")
local clickDetector = button:FindFirstChild("ClickDetector")
if clickDetector and clickDetector:IsA("ClickDetector") then
print("[Auto Rebirth] ClickDetector найден, активируем...")
pcall(function()
fireclickdetector(clickDetector)
print("[Auto Rebirth] ✓ ClickDetector активирован!")
end)
else
warn("[Auto Rebirth] Ошибка: ClickDetector не найден или неверный тип")
end
else
warn("[Auto Rebirth] Ошибка: BUTTON не найден")
end
else
warn("[Auto Rebirth] Ошибка: rebirthControl не найден")
end
else
warn("[Auto Rebirth] Ошибка: snowmanBase игрока не найден")
end
print("[Auto Rebirth] Функция завершена")
end
-- Функция auto rebirth
local function startAutoRebirth()
if isRebirthing then return end
isRebirthing = true
rebirthConnection = task.spawn(function()
while isRebirthing do
doRebirth()
task.wait(0.5)
if Library.Unloaded then
break
end
end
end)
end
-- Функция для остановки auto rebirth
local function stopAutoRebirth()
isRebirthing = false
if rebirthConnection then
task.cancel(rebirthConnection)
rebirthConnection = nil
end
end
-- Подключаем обработчики
Player.CharacterAdded:Connect(onCharacterAdded)
-- Запускаем постоянное применение скорости и прыжка
task.spawn(maintainPlayerStats)
-- Применяем настройки к текущему персонажу
if Player.Character then
onCharacterAdded(Player.Character)
else
Player.CharacterAdded:Wait()
task.wait(1)
applyPlayerStats()
end
-- Функция для безопасного выключения при выходе из игры
game:GetService("UserInputService").WindowFocusReleased:Connect(function()
if isRunning then
isRunning = false
cycleCount = 0
updateProgressDisplay()
end
end)
-- Также обрабатываем выход из игры
game:GetService("Players").PlayerRemoving:Connect(function(leavingPlayer)
if leavingPlayer == Player then
isRunning = false
end
end)
-- Добавляем toggle для auto farm
FarmGroupBox:AddToggle("AutoFarm", {
Text = "Auto Farm",
Tooltip = "Включает автоматический фарм снега",
Default = false,
Callback = function(Value)
toggleFarm()
end,
})
-- Добавляем toggle для auto snowman
FarmGroupBox:AddToggle("AutoSnowman", {
Text = "Auto Snowman",
Tooltip = "Включает автоматическое заполнение снеговика каждые 10 циклов",
Default = false,
Callback = function(Value)
toggleSnowman()
end,
})
-- Добавляем toggle для auto rebirth
FarmGroupBox:AddToggle("AutoRebirth", {
Text = "Auto Rebirth",
Tooltip = "Включает автоматический ребирт",
Default = false,
Callback = function(Value)
if Value then
startAutoRebirth()
Library:Notify({
Title = "Auto Rebirth",
Description = "Авторебирт включен",
Time = 3,
})
else
stopAutoRebirth()
Library:Notify({
Title = "Auto Rebirth",
Description = "Авторебирт выключен",
Time = 3,
})
end
end,
})
-- Останавливаем все функции при выгрузке библиотеки
Library:OnUnload(function()
isRunning = false
isRebirthing = false
if farmConnection then
task.cancel(farmConnection)
farmConnection = nil
end
if rebirthConnection then
task.cancel(rebirthConnection)
rebirthConnection = nil
end
end)
print("Snow Farm GUI loaded! Speed and jump are always active.")
very cool
one error, it collect snow when auto farm off and it stop collecting when auto farm is on
@lucaz this only happens when you press the Alt+Tab key combination, I don't know what it might be related to, but you can set the speed directly in the script code, as it's an open source script. Thanks for the comment.
also you should make the speed opitional
more like its not looping
make it in english