local Players = game:GetService("Players") local RS = game:GetService("ReplicatedStorage") local UIS = game:GetService("UserInputService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local function getKnit() local index = RS:FindFirstChild("Packages") and RS.Packages:FindFirstChild("_Index") if not index then return nil end for _, child in ipairs(index:GetChildren()) do if string.find(string.lower(child.Name), "knit", 1, true) then local knit = child:FindFirstChild("knit") if knit and knit:FindFirstChild("Services") then return knit end end end end local Knit = assert(getKnit(), "Knit not found") local function rem(service, folder, name) local s = Knit.Services:FindFirstChild(service) local f = s and s:FindFirstChild(folder) return f and f:FindFirstChild(name) end local AutoTrainStart = rem("AutoService", "RE", "AutoTrainStart") local AutoTrainStop = rem("AutoService", "RE", "AutoTrainStop") local StartTrain = rem("TrainService", "RE", "StartTrainEvent") local RunTrain = rem("TrainService", "RE", "RunTrain") local StopTrain = rem("TrainService", "RE", "StopTrainEvent") local UnlockTreadmill = rem("TrainService", "RE", "UnlockTreadmillEvent") local HatchRE = rem("EggHatchService", "RE", "Hatch") local RebirthRF = rem("RebirthService", "RF", "Rebirth") local SuperRebirthRF = rem("RebirthService", "RF", "SuperRebirth") local StartSpinRF = rem("SpinningWheelService", "RF", "StartSpin") local EquipBestPets = rem("PetService", "RE", "EquipBestPets") local UpgradeRE = rem("UpgradeService", "RE", "Upgrade") local ClaimDaily = rem("DailyRewardService", "RE", "ClaimDailyReward") local ClaimOnline = rem("OnlineRewardService", "RE", "ClaimOnlineReward") local ClaimQuest = rem("QuestService", "RE", "ClaimQuestReward") local GetWins = rem("FightService", "RE", "GetWinsEvent") local JoinContest = rem("FightService", "RE", "JoinContest") local StartContest = rem("FightService", "RE", "StartContest") local ClaimOfflineWins = rem("OfflineRaceService", "RE", "ClaimOfflineWinsEvent") local DashStart = rem("DashService", "RE", "StartDash") local function fire(remote, ...) if not remote then return end local n = select("#", ...) local args = { ... } pcall(function() if remote:IsA("RemoteFunction") then remote:InvokeServer(table.unpack(args, 1, n)) else remote:FireServer(table.unpack(args, 1, n)) end end) end local function firePrompt(prompt) if not prompt or not prompt:IsA("ProximityPrompt") then return end pcall(function() local d, h, e = prompt.MaxActivationDistance, prompt.HoldDuration, prompt.Enabled prompt.Enabled = true prompt.MaxActivationDistance = 999 prompt.HoldDuration = 0 if fireproximityprompt then local ok = pcall(fireproximityprompt, prompt) if not ok then pcall(fireproximityprompt, prompt, 1) end end prompt.MaxActivationDistance, prompt.HoldDuration, prompt.Enabled = d, h, e end) end local function parseNumber(text) if not text then return nil end text = tostring(text) -- 1.2K / 3M / 1B local num, suffix = string.match(text, "([%d%.%,]+)%s*([KkMmBbTt]?)") if not num then num = string.match(text, "([%d%,%.]+)") end if not num then return nil end num = string.gsub(num, ",", "") local n = tonumber(num) if not n then return nil end suffix = string.upper(suffix or "") if suffix == "K" then n *= 1e3 elseif suffix == "M" then n *= 1e6 elseif suffix == "B" then n *= 1e9 elseif suffix == "T" then n *= 1e12 end return n end local function collectTexts(root) local texts = {} if not root then return texts end for _, d in ipairs(root:GetDescendants()) do if d:IsA("TextLabel") or d:IsA("TextBox") or d:IsA("TextButton") then local t = d.Text if t and t ~= "" and #t < 80 then texts[#texts + 1] = t end end end return texts end local function matchStatName(statName, want) local n = string.lower(statName or "") local w = string.lower(want or "") -- leaderstats часто: "⚡️Power", "🏆Wins" return string.find(n, w, 1, true) ~= nil end local function getStat(...) local names = { ... } local ls = player:FindFirstChild("leaderstats") if ls then for _, name in ipairs(names) do local exact = ls:FindFirstChild(name) if exact and exact:IsA("ValueBase") then return tonumber(exact.Value) or 0 end end for _, v in ipairs(ls:GetChildren()) do if v:IsA("ValueBase") then for _, name in ipairs(names) do if matchStatName(v.Name, name) then return tonumber(v.Value) or 0 end end end end end for _, name in ipairs(names) do local v = player:FindFirstChild(name) if v and v:IsA("ValueBase") then return tonumber(v.Value) or 0 end end for _, name in ipairs(names) do local v = player:FindFirstChild(name, true) if v and v:IsA("ValueBase") then return tonumber(v.Value) or 0 end end for _, gui in ipairs(playerGui:GetDescendants()) do if gui:IsA("TextLabel") or gui:IsA("TextButton") then local n = string.lower(gui.Name) for _, name in ipairs(names) do if string.find(n, string.lower(name), 1, true) then local val = parseNumber(gui.Text) if val then return val end end end end end return 0 end local function getWins() return getStat("Wins", "Win", "TotalWins", "wins") end local function getEnergy() -- dump: leaderstats ⚡️Power return getStat("Power", "Energy", "Strength", "Train", "power", "energy", "strength") end -- "240K Required" / "50 Required" — основная цена в Dog Race local function parseRequired(text) if not text then return nil end local lower = string.lower(tostring(text)) if not string.find(lower, "required", 1, true) then return nil end return parseNumber(text) end local function findLabelText(root, labelName) if not root then return nil end local label = root:FindFirstChild(labelName, true) if label and (label:IsA("TextLabel") or label:IsA("TextBox") or label:IsA("TextButton")) then return label.Text end return nil end local function getArea() local areas = workspace:FindFirstChild("Areas") if not areas then return nil end return areas:FindFirstChild("Area_1") or areas:GetChildren()[1] end local function isDonatableName(name) local n = string.lower(name or "") return string.find(n, "_r_", 1, true) or string.match(n, "egg_r_%d") or string.match(n, "^dog_0%d%d$") -- Dog_001 / Dog_002 robux shop or string.find(n, "robux", 1, true) or string.find(n, "gamepass", 1, true) or string.find(n, "product", 1, true) or string.find(n, "premium", 1, true) end local function hasRobuxText(root) for _, t in ipairs(collectTexts(root)) do local lower = string.lower(t) if string.find(lower, "robux", 1, true) or string.find(lower, "") or string.find(lower, "r%$") or string.find(lower, "") then return true end end if root:GetAttribute("ProductId") or root:GetAttribute("GamePassId") then return true end for _, d in ipairs(root:GetDescendants()) do if d:GetAttribute("ProductId") or d:GetAttribute("GamePassId") then return true end end return false end -- dump: Desc = "50 Required" / Buy Desc = "199" (robux, без Required) local function isRobuxDog(dog) if isDonatableName(dog.Name) or hasRobuxText(dog) then return true end local hasBuy, hasUnlock, hasRequired for _, p in ipairs(dog:GetDescendants()) do if p:IsA("ProximityPrompt") then local a = string.lower(p.ActionText or "") if a == "buy" then hasBuy = true end if a == "unlock" then hasUnlock = true end end end local desc = findLabelText(dog, "Desc") if desc and parseRequired(desc) then hasRequired = true end if not hasRequired then for _, t in ipairs(collectTexts(dog)) do if parseRequired(t) then hasRequired = true break end end end -- Buy без Required = робуксы (Dog_001/002) if hasBuy and not hasUnlock and not hasRequired then return true end return false end local function extractWinsCost(root) -- сначала Desc / RequiredLabel for _, name in ipairs({ "Desc", "RequiredLabel", "CostLabel", "PriceLabel", "WinsLabel" }) do local t = findLabelText(root, name) local n = parseRequired(t) if n then return n end end for _, t in ipairs(collectTexts(root)) do local n = parseRequired(t) if n then return n end end for _, key in ipairs({ "Wins", "WinCost", "Cost", "Price", "RequiredWins", "UnlockWins" }) do local a = root:GetAttribute(key) if typeof(a) == "number" then return a end local v = root:FindFirstChild(key, true) if v and v:IsA("ValueBase") then return tonumber(v.Value) end end return nil end -- dump: RequiredLabel = "240K Required" (не BoostLabel "+20 Power") local function extractEnergyReq(root) local reqLabel = findLabelText(root, "RequiredLabel") local n = parseRequired(reqLabel) if n ~= nil then return n end for _, key in ipairs({ "Energy", "RequiredEnergy", "MinEnergy", "Strength", "RequiredStrength", "Power", "Required" }) do local a = root:GetAttribute(key) if typeof(a) == "number" then return a end local v = root:FindFirstChild(key, true) if v and v:IsA("ValueBase") then return tonumber(v.Value) end end for _, t in ipairs(collectTexts(root)) do local r = parseRequired(t) if r ~= nil then return r end end local tier = tonumber(string.match(root.Name, "_(%d+)$")) return tier end local function findPrompt(root, action) local want = string.lower(action or "") for _, p in ipairs(root:GetDescendants()) do if p:IsA("ProximityPrompt") then local a = string.lower(p.ActionText or "") if a == want or string.find(a, want, 1, true) then return p end end end return nil end -- ===== CONFIG ===== local cfg = { AutoTrain = false, AutoHatch = false, AutoRebirth = false, AutoSuperRebirth = false, AutoSpin = false, AutoBuyDogs = false, AutoUnlockDogs = false, AutoBuyPartners = false, AutoUnlockPartners = false, AutoEquipBest = false, AutoUpgrade = false, AutoHarvest = false, AutoClaimRewards = false, AutoDash = false, AutoRaceWin = false, SelectedEgg = nil, -- name TrainDelay = 0.45, HatchDelay = 0.7, RebirthDelay = 2, SpinDelay = 5, BuyDelay = 0.5, EquipDelay = 12, UpgradeDelay = 1, HarvestDelay = 0.5, ClaimDelay = 5, DashDelay = 1, RaceDelay = 0.15, HatchAmount = 1, } local eggCache = {} -- { {name=, cost=, model=} } local statusText = "..." local running, threads = {}, {} local function startLoop(key, fn) if threads[key] then return end running[key] = true threads[key] = task.spawn(function() while running[key] do local ok, err = pcall(fn) if not ok then warn("[DogRace]", key, err) end end threads[key] = nil end) end local function setFeature(key, on, fn) cfg[key] = on if on then startLoop(key, fn) else running[key] = false if key == "AutoTrain" then fire(AutoTrainStop) fire(StopTrain) end end end local function getHRP() local c = player.Character return c and c:FindFirstChild("HumanoidRootPart") end -- лучший treadmill под энергию local function getBestTreadmill() local area = getArea() local folder = area and area:FindFirstChild("Treadmills") if not folder then return nil end local energy = getEnergy() local best, bestScore for _, tm in ipairs(folder:GetChildren()) do local req = extractEnergyReq(tm) local prompt = tm:FindFirstChildWhichIsA("ProximityPrompt", true) if prompt then local score if typeof(req) == "number" then if req <= energy then score = req end else local tier = tonumber(string.match(tm.Name, "_(%d+)$")) or 1 if prompt.Enabled ~= false then score = tier end end if score and (not bestScore or score > bestScore) then best, bestScore = tm, score end end end -- fallback: первый enabled if not best then for _, tm in ipairs(folder:GetChildren()) do local prompt = tm:FindFirstChildWhichIsA("ProximityPrompt", true) if prompt and prompt.Enabled ~= false then return tm end end end return best end local function refreshEggs() eggCache = {} local seen = {} local function addEgg(egg) if not egg or seen[egg] then return end if isDonatableName(egg.Name) or hasRobuxText(egg) then return end seen[egg] = true local cost = extractWinsCost(egg) or 0 eggCache[#eggCache + 1] = { id = egg.Name, name = egg.Name, cost = cost, model = egg, } end local area = getArea() -- world eggs (цены в UI) if area then local worldEggs = area:FindFirstChild("Eggs") or area:FindFirstChild("Egg") if worldEggs then for _, egg in ipairs(worldEggs:GetChildren()) do addEgg(egg) end end -- иногда яйца лежат прямо в Area for _, child in ipairs(area:GetChildren()) do if string.find(string.lower(child.Name), "egg", 1, true) and child:IsA("Model") then addEgg(child) end end end -- RS templates local rsEggs = RS:FindFirstChild("Eggs") if rsEggs then for _, egg in ipairs(rsEggs:GetChildren()) do if egg:IsA("Model") or egg:IsA("Folder") then addEgg(egg) end end end table.sort(eggCache, function(a, b) return (a.cost or 0) < (b.cost or 0) end) if not cfg.SelectedEgg and eggCache[1] then cfg.SelectedEgg = eggCache[1].id end end local function getSelectedEgg() for _, e in ipairs(eggCache) do if e.id == cfg.SelectedEgg then return e end end return eggCache[1] end -- dump: Unlock + "N Required" = wins dog; Buy + "199" = robux local function getBestAffordableDog() local area = getArea() local base = area and area:FindFirstChild("DogBase") if not base then return nil end local wins = getWins() local best, bestCost, bestPrompt for _, dog in ipairs(base:GetChildren()) do if isRobuxDog(dog) then -- skip donate else local unlock = findPrompt(dog, "unlock") local buy = findPrompt(dog, "buy") local prompt = unlock or buy if prompt then local cost = extractWinsCost(dog) if cost and cost <= wins then if not bestCost or cost > bestCost then best, bestCost, bestPrompt = dog, cost, prompt end end end end end return best, bestCost, bestPrompt end -- dump: Workspace.Areas.Area_1.FightParts.FightFinishPart local function findFinishParts() local list = {} local seen = {} local function add(part) if part and part:IsA("BasePart") and not seen[part] then seen[part] = true list[#list + 1] = part end end local area = getArea() if area then local fight = area:FindFirstChild("FightParts") local finish = fight and fight:FindFirstChild("FightFinishPart") add(finish) if fight then for _, p in ipairs(fight:GetDescendants()) do if p:IsA("BasePart") and string.find(string.lower(p.Name), "finish", 1, true) then add(p) end end end end local keys = { "fightfinish", "finish", "goal", "endline", "end_line", "winpad", "endpoint", "raceend", "finishline" } for _, obj in ipairs(workspace:GetDescendants()) do if obj:IsA("BasePart") then local n = string.lower(obj.Name) for _, k in ipairs(keys) do if string.find(n, k, 1, true) then add(obj) break end end end end return list end -- ===== LOOPS ===== local function loopTrain() local tm = getBestTreadmill() if tm then statusText = "Train: " .. tm.Name .. " | Power=" .. tostring(getEnergy()) local prompt = tm:FindFirstChildWhichIsA("ProximityPrompt", true) -- TP к дорожке чтобы сервер принял local hrp = getHRP() local part = tm:FindFirstChildWhichIsA("BasePart", true) if hrp and part then pcall(function() hrp.CFrame = part.CFrame * CFrame.new(0, 3, 0) end) end firePrompt(prompt) -- remotes с именем treadmill fire(StartTrain, tm.Name) fire(StartTrain) fire(RunTrain, tm.Name) fire(RunTrain) fire(AutoTrainStart, tm.Name) fire(AutoTrainStart) else statusText = "Train: no treadmill" fire(AutoTrainStart) end task.wait(cfg.TrainDelay) end local function loopHatch() refreshEggs() local egg = getSelectedEgg() if not egg then statusText = "Hatch: no egg" task.wait(1) return end local wins = getWins() if egg.cost and egg.cost > 0 and wins < egg.cost then statusText = string.format("Hatch: need %s wins (have %s)", tostring(egg.cost), tostring(wins)) task.wait(1) return end statusText = string.format("Hatch: %s (%s wins)", egg.name, tostring(egg.cost or "?")) -- TP к яйцу local hrp = getHRP() local part = egg.model and egg.model:FindFirstChildWhichIsA("BasePart", true) if hrp and part then pcall(function() hrp.CFrame = part.CFrame * CFrame.new(0, 3, 0) end) end local prompt = egg.model and egg.model:FindFirstChildWhichIsA("ProximityPrompt", true) firePrompt(prompt) fire(HatchRE, egg.id, cfg.HatchAmount) fire(HatchRE, egg.name, cfg.HatchAmount) fire(HatchRE, egg.id) fire(HatchRE, egg.name) task.wait(cfg.HatchDelay) end local function loopBuyDogs() local dog, cost, prompt = getBestAffordableDog() if not dog then statusText = "BuyDog: nothing affordable | wins=" .. tostring(getWins()) task.wait(1) return end statusText = string.format("BuyDog: %s cost=%s wins=%s", dog.Name, tostring(cost or "?"), tostring(getWins())) local hrp = getHRP() local part = dog:FindFirstChildWhichIsA("BasePart", true) if hrp and part then pcall(function() hrp.CFrame = part.CFrame * CFrame.new(0, 3, 0) end) task.wait(0.05) end if prompt then firePrompt(prompt) else firePrompt(findPrompt(dog, "unlock") or findPrompt(dog, "buy")) end task.wait(cfg.BuyDelay) end local function loopUnlockDogs() -- тот же лучший Unlock за wins loopBuyDogs() end local function loopBuyPartners() local area = getArea() local base = area and area:FindFirstChild("PartnerBase") local wins = getWins() if base then for _, partner in ipairs(base:GetChildren()) do if not isDonatableName(partner.Name) and not hasRobuxText(partner) then local cost = extractWinsCost(partner) if not cost or cost <= wins then for _, p in ipairs(partner:GetDescendants()) do if p:IsA("ProximityPrompt") and string.lower(p.ActionText or "") == "buy" then firePrompt(p) end end end end end end task.wait(cfg.BuyDelay) end local function loopUnlockPartners() local area = getArea() local base = area and area:FindFirstChild("PartnerBase") local wins = getWins() if base then for _, partner in ipairs(base:GetChildren()) do if not isDonatableName(partner.Name) and not hasRobuxText(partner) then local cost = extractWinsCost(partner) if not cost or cost <= wins then for _, p in ipairs(partner:GetDescendants()) do if p:IsA("ProximityPrompt") and string.lower(p.ActionText or "") == "unlock" then firePrompt(p) end end end end end end task.wait(cfg.BuyDelay) end local function loopEquipBest() fire(EquipBestPets) task.wait(cfg.EquipDelay) end local function loopRebirth() fire(RebirthRF) task.wait(cfg.RebirthDelay) end local function loopSuperRebirth() fire(SuperRebirthRF) task.wait(cfg.RebirthDelay) end local function loopSpin() fire(StartSpinRF) local area = getArea() local wheel = area and area:FindFirstChild("Items") and area.Items:FindFirstChild("SpinWheel") if wheel then for _, p in ipairs(wheel:GetDescendants()) do if p:IsA("ProximityPrompt") then firePrompt(p) end end end task.wait(cfg.SpinDelay) end local function loopUpgrade() fire(UpgradeRE) fire(UpgradeRE, 1) task.wait(cfg.UpgradeDelay) end local function loopHarvest() local scene = workspace:FindFirstChild("FruitShopScene") if scene then for _, p in ipairs(scene:GetDescendants()) do if p:IsA("ProximityPrompt") and string.lower(p.ActionText or "") == "harvest" then firePrompt(p) end end end task.wait(cfg.HarvestDelay) end local function loopClaim() fire(ClaimDaily) fire(ClaimOnline) fire(ClaimQuest) fire(ClaimOfflineWins) task.wait(cfg.ClaimDelay) end local function loopDash() fire(DashStart) task.wait(cfg.DashDelay) end local finishCache = {} local function loopRaceWin() fire(JoinContest) fire(StartContest) fire(GetWins) fire(ClaimOfflineWins) if #finishCache == 0 then finishCache = findFinishParts() end local hrp = getHRP() if hrp and #finishCache > 0 then -- прыгаем по всем кандидатам финиша for _, part in ipairs(finishCache) do if not running.AutoRaceWin then break end if part.Parent then pcall(function() hrp.AssemblyLinearVelocity = Vector3.zero hrp.CFrame = part.CFrame + Vector3.new(0, 4, 0) end) -- прыжок local hum = player.Character and player.Character:FindFirstChildOfClass("Humanoid") if hum then pcall(function() hum:ChangeState(Enum.HumanoidStateType.Jumping) end) end task.wait(cfg.RaceDelay) end end statusText = "RaceWin: TP finish x" .. #finishCache else -- fallback: летим вперёд по LookVector очень далеко if hrp then pcall(function() hrp.CFrame = hrp.CFrame + hrp.CFrame.LookVector * 500 + Vector3.new(0, 5, 0) end) statusText = "RaceWin: boost forward (no finish found)" else statusText = "RaceWin: no HRP" end task.wait(0.5) end end -- ===== UI ===== local gui = Instance.new("ScreenGui") gui.Name = "DogRaceAutoUI" gui.ResetOnSpawn = false gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling gui.Parent = playerGui local ROOT_W, ROOT_H = 580, 540 local root = Instance.new("Frame") root.Size = UDim2.fromOffset(ROOT_W, ROOT_H) root.Position = UDim2.new(0.5, -ROOT_W / 2, 0.5, -ROOT_H / 2) root.BackgroundColor3 = Color3.fromRGB(18, 18, 22) root.BorderSizePixel = 0 root.Active = true root.Parent = gui Instance.new("UICorner", root).CornerRadius = UDim.new(0, 12) Instance.new("UIStroke", root).Color = Color3.fromRGB(45, 45, 55) local header = Instance.new("Frame") header.Size = UDim2.new(1, 0, 0, 48) header.BackgroundColor3 = Color3.fromRGB(24, 24, 30) header.BorderSizePixel = 0 header.Parent = root Instance.new("UICorner", header).CornerRadius = UDim.new(0, 12) local headerFix = Instance.new("Frame") headerFix.Size = UDim2.new(1, 0, 0, 16) headerFix.Position = UDim2.new(0, 0, 1, -16) headerFix.BackgroundColor3 = Color3.fromRGB(24, 24, 30) headerFix.BorderSizePixel = 0 headerFix.Parent = header local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -20, 0, 22) title.Position = UDim2.fromOffset(14, 6) title.BackgroundTransparency = 1 title.Font = Enum.Font.GothamBold title.TextSize = 18 title.TextXAlignment = Enum.TextXAlignment.Left title.TextColor3 = Color3.fromRGB(240, 240, 245) title.Text = "Dog Race Auto" title.Parent = header local subtitle = Instance.new("TextLabel") subtitle.Size = UDim2.new(1, -20, 0, 16) subtitle.Position = UDim2.fromOffset(14, 28) subtitle.BackgroundTransparency = 1 subtitle.Font = Enum.Font.Gotham subtitle.TextSize = 11 subtitle.TextXAlignment = Enum.TextXAlignment.Left subtitle.TextColor3 = Color3.fromRGB(130, 130, 145) subtitle.Text = "..." subtitle.Parent = header local sidebar = Instance.new("Frame") sidebar.Size = UDim2.new(0, 140, 1, -56) sidebar.Position = UDim2.fromOffset(8, 52) sidebar.BackgroundColor3 = Color3.fromRGB(24, 24, 30) sidebar.BorderSizePixel = 0 sidebar.Parent = root Instance.new("UICorner", sidebar).CornerRadius = UDim.new(0, 8) Instance.new("UIListLayout", sidebar).Padding = UDim.new(0, 4) local sidePad = Instance.new("UIPadding", sidebar) sidePad.PaddingTop = UDim.new(0, 8) sidePad.PaddingLeft = UDim.new(0, 8) sidePad.PaddingRight = UDim.new(0, 8) local content = Instance.new("Frame") content.Size = UDim2.new(1, -164, 1, -60) content.Position = UDim2.fromOffset(156, 52) content.BackgroundColor3 = Color3.fromRGB(24, 24, 30) content.BorderSizePixel = 0 content.Parent = root Instance.new("UICorner", content).CornerRadius = UDim.new(0, 8) local pages, tabButtons = {}, {} local function makePage(name) local page = Instance.new("ScrollingFrame") page.Size = UDim2.new(1, -12, 1, -12) page.Position = UDim2.fromOffset(6, 6) page.BackgroundTransparency = 1 page.BorderSizePixel = 0 page.ScrollBarThickness = 4 page.AutomaticCanvasSize = Enum.AutomaticSize.Y page.CanvasSize = UDim2.new() page.Visible = false page.Parent = content Instance.new("UIListLayout", page).Padding = UDim.new(0, 5) local pad = Instance.new("UIPadding", page) pad.PaddingTop = UDim.new(0, 4) pad.PaddingBottom = UDim.new(0, 8) pad.PaddingLeft = UDim.new(0, 4) pad.PaddingRight = UDim.new(0, 4) pages[name] = page return page end local function selectTab(name) for n, page in pairs(pages) do page.Visible = n == name end for n, btn in pairs(tabButtons) do local on = n == name btn.BackgroundColor3 = on and Color3.fromRGB(70, 180, 100) or Color3.fromRGB(34, 34, 42) btn.TextColor3 = on and Color3.fromRGB(20, 20, 24) or Color3.fromRGB(210, 210, 220) end end local function addTab(name, order) local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, 0, 0, 34) btn.BackgroundColor3 = Color3.fromRGB(34, 34, 42) btn.Font = Enum.Font.GothamMedium btn.TextSize = 13 btn.TextColor3 = Color3.fromRGB(210, 210, 220) btn.Text = name btn.AutoButtonColor = false btn.LayoutOrder = order btn.Parent = sidebar Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6) tabButtons[name] = btn btn.MouseButton1Click:Connect(function() selectTab(name) end) makePage(name) end local function section(page, text) local l = Instance.new("TextLabel") l.Size = UDim2.new(1, -4, 0, 20) l.BackgroundTransparency = 1 l.Font = Enum.Font.GothamMedium l.TextSize = 12 l.TextXAlignment = Enum.TextXAlignment.Left l.TextColor3 = Color3.fromRGB(120, 120, 135) l.Text = text l.Parent = page end local function row(page, h) local f = Instance.new("Frame") f.Size = UDim2.new(1, -4, 0, h or 30) f.BackgroundColor3 = Color3.fromRGB(32, 32, 40) f.BorderSizePixel = 0 f.Parent = page Instance.new("UICorner", f).CornerRadius = UDim.new(0, 6) return f end local function makeToggle(parent, text, get, set) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -56, 1, 0) label.Position = UDim2.fromOffset(10, 0) label.BackgroundTransparency = 1 label.Font = Enum.Font.Gotham label.TextSize = 13 label.TextXAlignment = Enum.TextXAlignment.Left label.TextColor3 = Color3.fromRGB(220, 220, 230) label.Text = text label.Parent = parent local btn = Instance.new("TextButton") btn.Size = UDim2.fromOffset(38, 20) btn.Position = UDim2.new(1, -46, 0.5, -10) btn.BackgroundColor3 = Color3.fromRGB(55, 55, 65) btn.Text = "" btn.AutoButtonColor = false btn.Parent = parent Instance.new("UICorner", btn).CornerRadius = UDim.new(1, 0) local knob = Instance.new("Frame") knob.Size = UDim2.fromOffset(16, 16) knob.Position = UDim2.fromOffset(2, 2) knob.BackgroundColor3 = Color3.fromRGB(245, 245, 250) knob.BorderSizePixel = 0 knob.Parent = btn Instance.new("UICorner", knob).CornerRadius = UDim.new(1, 0) local function refresh() local on = get() btn.BackgroundColor3 = on and Color3.fromRGB(70, 180, 100) or Color3.fromRGB(55, 55, 65) knob.Position = on and UDim2.fromOffset(20, 2) or UDim2.fromOffset(2, 2) end btn.MouseButton1Click:Connect(function() set(not get()) refresh() end) refresh() end local function feature(page, label, key, fn) local r = row(page, 32) makeToggle(r, label, function() return cfg[key] end, function(on) setFeature(key, on, fn) end) end local function numBox(page, labelText, get, set) local r = row(page, 32) local label = Instance.new("TextLabel") label.Size = UDim2.new(0.55, 0, 1, 0) label.Position = UDim2.fromOffset(10, 0) label.BackgroundTransparency = 1 label.Font = Enum.Font.Gotham label.TextSize = 13 label.TextXAlignment = Enum.TextXAlignment.Left label.TextColor3 = Color3.fromRGB(210, 210, 220) label.Text = labelText label.Parent = r local box = Instance.new("TextBox") box.Size = UDim2.new(0.4, -12, 0, 22) box.Position = UDim2.new(0.58, 0, 0.5, -11) box.BackgroundColor3 = Color3.fromRGB(42, 42, 52) box.Font = Enum.Font.Gotham box.TextSize = 13 box.TextColor3 = Color3.fromRGB(235, 235, 240) box.Text = tostring(get()) box.ClearTextOnFocus = false box.Parent = r Instance.new("UICorner", box).CornerRadius = UDim.new(0, 5) box.FocusLost:Connect(function() local n = tonumber(box.Text) if n then set(n) end box.Text = tostring(get()) end) end addTab("Main", 1) addTab("Train", 2) addTab("Hatch", 3) addTab("Dogs", 4) addTab("Race", 5) addTab("More", 6) local main, train, hatch, dogs, race, more = pages.Main, pages.Train, pages.Hatch, pages.Dogs, pages.Race, pages.More section(main, "QUICK") feature(main, "Auto Train (energy match)", "AutoTrain", loopTrain) feature(main, "Auto Hatch", "AutoHatch", loopHatch) feature(main, "Auto Buy Dogs (wins)", "AutoBuyDogs", loopBuyDogs) feature(main, "Auto Race Win (TP finish)", "AutoRaceWin", loopRaceWin) feature(main, "Auto Rebirth", "AutoRebirth", loopRebirth) feature(main, "Auto Spin", "AutoSpin", loopSpin) feature(main, "Auto Equip Best", "AutoEquipBest", loopEquipBest) section(train, "TRAIN") feature(train, "Auto Train (best treadmill for energy)", "AutoTrain", loopTrain) numBox(train, "Train delay", function() return cfg.TrainDelay end, function(v) cfg.TrainDelay = math.max(0.05, v) end) feature(train, "Auto Dash", "AutoDash", loopDash) -- Hatch page eggs rebuilt dynamically local hatchListFrame local function rebuildEggButtons() refreshEggs() -- clear old egg rows (keep section/feature/num by tagging) for _, child in ipairs(hatch:GetChildren()) do if child:GetAttribute("EggRow") then child:Destroy() end end for _, egg in ipairs(eggCache) do local r = row(hatch, 30) r:SetAttribute("EggRow", true) local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, -8, 1, -4) btn.Position = UDim2.fromOffset(4, 2) btn.BackgroundColor3 = Color3.fromRGB(42, 42, 52) btn.Font = Enum.Font.Gotham btn.TextSize = 12 btn.TextColor3 = Color3.fromRGB(220, 220, 230) btn.TextXAlignment = Enum.TextXAlignment.Left btn.Text = string.format(" %s — %s wins", egg.name, tostring(egg.cost or "?")) btn.AutoButtonColor = false btn.Parent = r Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6) local function paint() local on = cfg.SelectedEgg == egg.id btn.BackgroundColor3 = on and Color3.fromRGB(70, 180, 100) or Color3.fromRGB(42, 42, 52) btn.TextColor3 = on and Color3.fromRGB(20, 20, 24) or Color3.fromRGB(220, 220, 230) end btn.MouseButton1Click:Connect(function() cfg.SelectedEgg = egg.id for _, ch in ipairs(hatch:GetChildren()) do if ch:GetAttribute("EggRow") then local b = ch:FindFirstChildOfClass("TextButton") if b then -- crude: rebuild paint via comparing SelectedEgg in text is hard; just rebuild end end end rebuildEggButtons() end) paint() end if #eggCache == 0 then local r = row(hatch, 40) r:SetAttribute("EggRow", true) local l = Instance.new("TextLabel") l.Size = UDim2.new(1, -10, 1, 0) l.Position = UDim2.fromOffset(8, 0) l.BackgroundTransparency = 1 l.Font = Enum.Font.Gotham l.TextSize = 12 l.TextColor3 = Color3.fromRGB(160, 160, 170) l.TextXAlignment = Enum.TextXAlignment.Left l.Text = "Яйца не найдены / только донат. Запусти DogRaceDump.lua" l.Parent = r end end section(hatch, "HATCH") feature(hatch, "Auto Hatch (selected egg)", "AutoHatch", loopHatch) numBox(hatch, "Hatch amount", function() return cfg.HatchAmount end, function(v) cfg.HatchAmount = math.max(1, math.floor(v)) end) numBox(hatch, "Hatch delay", function() return cfg.HatchDelay end, function(v) cfg.HatchDelay = math.max(0.1, v) end) section(hatch, "EGGS (wins cost, no robux)") local refreshBtn = Instance.new("TextButton") refreshBtn.Size = UDim2.new(1, -4, 0, 28) refreshBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 62) refreshBtn.Font = Enum.Font.GothamMedium refreshBtn.TextSize = 12 refreshBtn.TextColor3 = Color3.fromRGB(230, 230, 240) refreshBtn.Text = "Refresh eggs" refreshBtn.AutoButtonColor = false refreshBtn.Parent = hatch Instance.new("UICorner", refreshBtn).CornerRadius = UDim.new(0, 6) refreshBtn.MouseButton1Click:Connect(rebuildEggButtons) section(dogs, "DOGS (wins only)") feature(dogs, "Auto Buy best affordable dog", "AutoBuyDogs", loopBuyDogs) feature(dogs, "Auto Unlock/Equip dogs", "AutoUnlockDogs", loopUnlockDogs) feature(dogs, "Auto Buy partners", "AutoBuyPartners", loopBuyPartners) feature(dogs, "Auto Unlock partners", "AutoUnlockPartners", loopUnlockPartners) feature(dogs, "Auto Equip Best Pets", "AutoEquipBest", loopEquipBest) numBox(dogs, "Buy delay", function() return cfg.BuyDelay end, function(v) cfg.BuyDelay = math.max(0.1, v) end) section(race, "RACE WINS") feature(race, "Auto Race Win (TP to finish)", "AutoRaceWin", loopRaceWin) numBox(race, "TP interval", function() return cfg.RaceDelay end, function(v) cfg.RaceDelay = math.max(0.05, v) end) local tip = Instance.new("TextLabel") tip.Size = UDim2.new(1, -4, 0, 60) tip.BackgroundTransparency = 1 tip.Font = Enum.Font.Gotham tip.TextSize = 11 tip.TextWrapped = true tip.TextXAlignment = Enum.TextXAlignment.Left tip.TextYAlignment = Enum.TextYAlignment.Top tip.TextColor3 = Color3.fromRGB(140, 140, 155) tip.Text = "Ищет Finish/Goal/End на карте и телепортит туда во время забега. Если финиш не найден — рывок вперёд. Запусти забег вручную или через JoinContest." tip.Parent = race section(more, "MORE") feature(more, "Auto Rebirth", "AutoRebirth", loopRebirth) feature(more, "Auto Super Rebirth", "AutoSuperRebirth", loopSuperRebirth) feature(more, "Auto Spin", "AutoSpin", loopSpin) feature(more, "Auto Upgrade", "AutoUpgrade", loopUpgrade) feature(more, "Auto Harvest", "AutoHarvest", loopHarvest) feature(more, "Auto Claim Rewards", "AutoClaimRewards", loopClaim) rebuildEggButtons() selectTab("Main") task.spawn(function() while gui.Parent do subtitle.Text = string.format( "Wins: %s | Energy/Str: %s | %s", tostring(getWins()), tostring(getEnergy()), statusText ) task.wait(0.5) end end) local dragging, dragStart, startPos header.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = root.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UIS.InputChanged:Connect(function(input) if not dragging then return end if input.UserInputType ~= Enum.UserInputType.MouseMovement and input.UserInputType ~= Enum.UserInputType.Touch then return end local d = input.Position - dragStart root.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y) end) print("[DogRace Auto v2] energy-train / wins-dogs / eggs+cost / race TP")