Browse
Script Types
Tools
Community
Reach players with keyless, universal, or place-specific scripts.


This Dog Race script was created to automate training, races, pets, and rebirth progression. Dog Race is built around training to become stronger, racing for prizes, and hatching pets. Auto Train handles the Energy Match, while Auto Race Win teleports to the finish so Wins can be earned with less manual racing. (roblox.com)
Auto Train (Energy Match) repeatedly handles the supported training interaction used to build your race power.
Training is one of Dog Race's core mechanics—the official game description specifically tells players to train to become stronger before racing.
This makes Auto Train useful when you need more Energy before attempting races but do not want to repeat the same training action manually.
Auto Race Win (TP Finish) teleports your character to the race finish instead of making you complete the track normally.
Dog Race rewards players for racing and winning prizes, so this function can shorten the repeated race portion of progression.
It does not guarantee that every race will register the teleport as a valid win after future game updates.
Auto Hatch repeatedly opens supported eggs so you can build your dog collection without manually hatching each one.
Auto Equip Best automatically selects the strongest available dogs recognized by the script, saving you from comparing and equipping them individually.
The normal game already includes pet hatching as one of its main progression systems.
Auto Buy Dogs (Wins) automatically spends available Wins on supported dog purchases.
This pairs naturally with Auto Race Win:
Race wins generate the required currency.
Auto Buy Dogs spends available Wins.
Auto Hatch processes supported eggs.
Auto Equip Best updates your equipped setup.
Auto Train prepares you for further progression.
Auto Rebirth performs a supported rebirth automatically once its requirements are met, reducing the need to stop the farming loop and rebirth manually.
Auto Spin repeatedly uses the game's supported spin system whenever spins are available.
These options are intended for longer progression sessions where you want training, races, pets, and reset mechanics handled from the same script.
Yes. The script was created by the BobloScript.com team.
It is:
No key
Open source
There is no external key-system step, and the source code can be inspected before execution.
Open Dog Race and wait for your data to load.
Copy the BobloScript.com script.
Open a compatible Roblox executor.
Paste the code and press Execute.
Start with Auto Train.
Enable Auto Race Win when you want races automated.
Add Auto Buy Dogs, Auto Hatch, and Auto Equip Best for pet progression.
Enable Auto Spin and Auto Rebirth when those systems are available.
Game updates can change training, race finishes, eggs, Wins, or rebirth systems, so individual functions may require an update even when the rest of the script still loads.
1local Players = game:GetService("Players")2local RS = game:GetService("ReplicatedStorage")3local UIS = game:GetService("UserInputService")45local player = Players.LocalPlayer6local playerGui = player:WaitForChild("PlayerGui")78local function getKnit()9 local index = RS:FindFirstChild("Packages") and RS.Packages:FindFirstChild("_Index")10 if not index then return nil end11 for _, child in ipairs(index:GetChildren()) do12 if string.find(string.lower(child.Name), "knit", 1, true) then13 local knit = child:FindFirstChild("knit")14 if knit and knit:FindFirstChild("Services") then return knit end15 end16 end17end1819local Knit = assert(getKnit(), "Knit not found")2021local function rem(service, folder, name)22 local s = Knit.Services:FindFirstChild(service)23 local f = s and s:FindFirstChild(folder)24 return f and f:FindFirstChild(name)25end2627local AutoTrainStart = rem("AutoService", "RE", "AutoTrainStart")28local AutoTrainStop = rem("AutoService", "RE", "AutoTrainStop")29local StartTrain = rem("TrainService", "RE", "StartTrainEvent")30local RunTrain = rem("TrainService", "RE", "RunTrain")31local StopTrain = rem("TrainService", "RE", "StopTrainEvent")32local UnlockTreadmill = rem("TrainService", "RE", "UnlockTreadmillEvent")33local HatchRE = rem("EggHatchService", "RE", "Hatch")34local RebirthRF = rem("RebirthService", "RF", "Rebirth")35local SuperRebirthRF = rem("RebirthService", "RF", "SuperRebirth")36local StartSpinRF = rem("SpinningWheelService", "RF", "StartSpin")37local EquipBestPets = rem("PetService", "RE", "EquipBestPets")38local UpgradeRE = rem("UpgradeService", "RE", "Upgrade")39local ClaimDaily = rem("DailyRewardService", "RE", "ClaimDailyReward")40local ClaimOnline = rem("OnlineRewardService", "RE", "ClaimOnlineReward")41local ClaimQuest = rem("QuestService", "RE", "ClaimQuestReward")42local GetWins = rem("FightService", "RE", "GetWinsEvent")43local JoinContest = rem("FightService", "RE", "JoinContest")44local StartContest = rem("FightService", "RE", "StartContest")45local ClaimOfflineWins = rem("OfflineRaceService", "RE", "ClaimOfflineWinsEvent")46local DashStart = rem("DashService", "RE", "StartDash")4748local function fire(remote, ...)49 if not remote then return end50 local n = select("#", ...)51 local args = { ... }52 pcall(function()53 if remote:IsA("RemoteFunction") then54 remote:InvokeServer(table.unpack(args, 1, n))55 else56 remote:FireServer(table.unpack(args, 1, n))57 end58 end)59end6061local function firePrompt(prompt)62 if not prompt or not prompt:IsA("ProximityPrompt") then return end63 pcall(function()64 local d, h, e = prompt.MaxActivationDistance, prompt.HoldDuration, prompt.Enabled65 prompt.Enabled = true66 prompt.MaxActivationDistance = 99967 prompt.HoldDuration = 068 if fireproximityprompt then69 local ok = pcall(fireproximityprompt, prompt)70 if not ok then pcall(fireproximityprompt, prompt, 1) end71 end72 prompt.MaxActivationDistance, prompt.HoldDuration, prompt.Enabled = d, h, e73 end)74end7576local function parseNumber(text)77 if not text then return nil end78 text = tostring(text)79 -- 1.2K / 3M / 1B80 local num, suffix = string.match(text, "([%d%.%,]+)%s*([KkMmBbTt]?)")81 if not num then82 num = string.match(text, "([%d%,%.]+)")83 end84 if not num then return nil end85 num = string.gsub(num, ",", "")86 local n = tonumber(num)87 if not n then return nil end88 suffix = string.upper(suffix or "")89 if suffix == "K" then n *= 1e390 elseif suffix == "M" then n *= 1e691 elseif suffix == "B" then n *= 1e992 elseif suffix == "T" then n *= 1e1293 end94 return n95end9697local function collectTexts(root)98 local texts = {}99 if not root then return texts end100 for _, d in ipairs(root:GetDescendants()) do101 if d:IsA("TextLabel") or d:IsA("TextBox") or d:IsA("TextButton") then102 local t = d.Text103 if t and t ~= "" and #t < 80 then104 texts[#texts + 1] = t105 end106 end107 end108 return texts109end110111local function matchStatName(statName, want)112 local n = string.lower(statName or "")113 local w = string.lower(want or "")114 -- leaderstats часто: "⚡️Power", "🏆Wins"115 return string.find(n, w, 1, true) ~= nil116end117118local function getStat(...)119 local names = { ... }120 local ls = player:FindFirstChild("leaderstats")121 if ls then122 for _, name in ipairs(names) do123 local exact = ls:FindFirstChild(name)124 if exact and exact:IsA("ValueBase") then125 return tonumber(exact.Value) or 0126 end127 end128 for _, v in ipairs(ls:GetChildren()) do129 if v:IsA("ValueBase") then130 for _, name in ipairs(names) do131 if matchStatName(v.Name, name) then132 return tonumber(v.Value) or 0133 end134 end135 end136 end137 end138 for _, name in ipairs(names) do139 local v = player:FindFirstChild(name)140 if v and v:IsA("ValueBase") then return tonumber(v.Value) or 0 end141 end142 for _, name in ipairs(names) do143 local v = player:FindFirstChild(name, true)144 if v and v:IsA("ValueBase") then return tonumber(v.Value) or 0 end145 end146 for _, gui in ipairs(playerGui:GetDescendants()) do147 if gui:IsA("TextLabel") or gui:IsA("TextButton") then148 local n = string.lower(gui.Name)149 for _, name in ipairs(names) do150 if string.find(n, string.lower(name), 1, true) then151 local val = parseNumber(gui.Text)152 if val then return val end153 end154 end155 end156 end157 return 0158end159160local function getWins()161 return getStat("Wins", "Win", "TotalWins", "wins")162end163164local function getEnergy()165 -- dump: leaderstats ⚡️Power166 return getStat("Power", "Energy", "Strength", "Train", "power", "energy", "strength")167end168169-- "240K Required" / "50 Required" — основная цена в Dog Race170local function parseRequired(text)171 if not text then return nil end172 local lower = string.lower(tostring(text))173 if not string.find(lower, "required", 1, true) then return nil end174 return parseNumber(text)175end176177local function findLabelText(root, labelName)178 if not root then return nil end179 local label = root:FindFirstChild(labelName, true)180 if label and (label:IsA("TextLabel") or label:IsA("TextBox") or label:IsA("TextButton")) then181 return label.Text182 end183 return nil184end185186local function getArea()187 local areas = workspace:FindFirstChild("Areas")188 if not areas then return nil end189 return areas:FindFirstChild("Area_1") or areas:GetChildren()[1]190end191192local function isDonatableName(name)193 local n = string.lower(name or "")194 return string.find(n, "_r_", 1, true)195 or string.match(n, "egg_r_%d")196 or string.match(n, "^dog_0%d%d$") -- Dog_001 / Dog_002 robux shop197 or string.find(n, "robux", 1, true)198 or string.find(n, "gamepass", 1, true)199 or string.find(n, "product", 1, true)200 or string.find(n, "premium", 1, true)201end202203local function hasRobuxText(root)204 for _, t in ipairs(collectTexts(root)) do205 local lower = string.lower(t)206 if string.find(lower, "robux", 1, true)207 or string.find(lower, "")208 or string.find(lower, "r%$")209 or string.find(lower, "")210 then211 return true212 end213 end214 if root:GetAttribute("ProductId") or root:GetAttribute("GamePassId") then215 return true216 end217 for _, d in ipairs(root:GetDescendants()) do218 if d:GetAttribute("ProductId") or d:GetAttribute("GamePassId") then219 return true220 end221 end222 return false223end224225-- dump: Desc = "50 Required" / Buy Desc = "199" (robux, без Required)226local function isRobuxDog(dog)227 if isDonatableName(dog.Name) or hasRobuxText(dog) then return true end228 local hasBuy, hasUnlock, hasRequired229 for _, p in ipairs(dog:GetDescendants()) do230 if p:IsA("ProximityPrompt") then231 local a = string.lower(p.ActionText or "")232 if a == "buy" then hasBuy = true end233 if a == "unlock" then hasUnlock = true end234 end235 end236 local desc = findLabelText(dog, "Desc")237 if desc and parseRequired(desc) then hasRequired = true end238 if not hasRequired then239 for _, t in ipairs(collectTexts(dog)) do240 if parseRequired(t) then241 hasRequired = true242 break243 end244 end245 end246 -- Buy без Required = робуксы (Dog_001/002)247 if hasBuy and not hasUnlock and not hasRequired then248 return true249 end250 return false251end252253local function extractWinsCost(root)254 -- сначала Desc / RequiredLabel255 for _, name in ipairs({ "Desc", "RequiredLabel", "CostLabel", "PriceLabel", "WinsLabel" }) do256 local t = findLabelText(root, name)257 local n = parseRequired(t)258 if n then return n end259 end260 for _, t in ipairs(collectTexts(root)) do261 local n = parseRequired(t)262 if n then return n end263 end264 for _, key in ipairs({ "Wins", "WinCost", "Cost", "Price", "RequiredWins", "UnlockWins" }) do265 local a = root:GetAttribute(key)266 if typeof(a) == "number" then return a end267 local v = root:FindFirstChild(key, true)268 if v and v:IsA("ValueBase") then return tonumber(v.Value) end269 end270 return nil271end272273-- dump: RequiredLabel = "240K Required" (не BoostLabel "+20 Power")274local function extractEnergyReq(root)275 local reqLabel = findLabelText(root, "RequiredLabel")276 local n = parseRequired(reqLabel)277 if n ~= nil then return n end278279 for _, key in ipairs({ "Energy", "RequiredEnergy", "MinEnergy", "Strength", "RequiredStrength", "Power", "Required" }) do280 local a = root:GetAttribute(key)281 if typeof(a) == "number" then return a end282 local v = root:FindFirstChild(key, true)283 if v and v:IsA("ValueBase") then return tonumber(v.Value) end284 end285 for _, t in ipairs(collectTexts(root)) do286 local r = parseRequired(t)287 if r ~= nil then return r end288 end289 local tier = tonumber(string.match(root.Name, "_(%d+)$"))290 return tier291end292293local function findPrompt(root, action)294 local want = string.lower(action or "")295 for _, p in ipairs(root:GetDescendants()) do296 if p:IsA("ProximityPrompt") then297 local a = string.lower(p.ActionText or "")298 if a == want or string.find(a, want, 1, true) then299 return p300 end301 end302 end303 return nil304end305306-- ===== CONFIG =====307local cfg = {308 AutoTrain = false,309 AutoHatch = false,310 AutoRebirth = false,311 AutoSuperRebirth = false,312 AutoSpin = false,313 AutoBuyDogs = false,314 AutoUnlockDogs = false,315 AutoBuyPartners = false,316 AutoUnlockPartners = false,317 AutoEquipBest = false,318 AutoUpgrade = false,319 AutoHarvest = false,320 AutoClaimRewards = false,321 AutoDash = false,322 AutoRaceWin = false,323324 SelectedEgg = nil, -- name325 TrainDelay = 0.45,326 HatchDelay = 0.7,327 RebirthDelay = 2,328 SpinDelay = 5,329 BuyDelay = 0.5,330 EquipDelay = 12,331 UpgradeDelay = 1,332 HarvestDelay = 0.5,333 ClaimDelay = 5,334 DashDelay = 1,335 RaceDelay = 0.15,336 HatchAmount = 1,337}338339local eggCache = {} -- { {name=, cost=, model=} }340local statusText = "..."341342local running, threads = {}, {}343344local function startLoop(key, fn)345 if threads[key] then return end346 running[key] = true347 threads[key] = task.spawn(function()348 while running[key] do349 local ok, err = pcall(fn)350 if not ok then warn("[DogRace]", key, err) end351 end352 threads[key] = nil353 end)354end355356local function setFeature(key, on, fn)357 cfg[key] = on358 if on then359 startLoop(key, fn)360 else361 running[key] = false362 if key == "AutoTrain" then363 fire(AutoTrainStop)364 fire(StopTrain)365 end366 end367end368369local function getHRP()370 local c = player.Character371 return c and c:FindFirstChild("HumanoidRootPart")372end373374-- лучший treadmill под энергию375local function getBestTreadmill()376 local area = getArea()377 local folder = area and area:FindFirstChild("Treadmills")378 if not folder then return nil end379380 local energy = getEnergy()381 local best, bestScore382383 for _, tm in ipairs(folder:GetChildren()) do384 local req = extractEnergyReq(tm)385 local prompt = tm:FindFirstChildWhichIsA("ProximityPrompt", true)386 if prompt then387 local score388 if typeof(req) == "number" then389 if req <= energy then390 score = req391 end392 else393 local tier = tonumber(string.match(tm.Name, "_(%d+)$")) or 1394 if prompt.Enabled ~= false then395 score = tier396 end397 end398399 if score and (not bestScore or score > bestScore) then400 best, bestScore = tm, score401 end402 end403 end404405 -- fallback: первый enabled406 if not best then407 for _, tm in ipairs(folder:GetChildren()) do408 local prompt = tm:FindFirstChildWhichIsA("ProximityPrompt", true)409 if prompt and prompt.Enabled ~= false then410 return tm411 end412 end413 end414 return best415end416417local function refreshEggs()418 eggCache = {}419 local seen = {}420 local function addEgg(egg)421 if not egg or seen[egg] then return end422 if isDonatableName(egg.Name) or hasRobuxText(egg) then return end423 seen[egg] = true424 local cost = extractWinsCost(egg) or 0425 eggCache[#eggCache + 1] = {426 id = egg.Name,427 name = egg.Name,428 cost = cost,429 model = egg,430 }431 end432433 local area = getArea()434 -- world eggs (цены в UI)435 if area then436 local worldEggs = area:FindFirstChild("Eggs") or area:FindFirstChild("Egg")437 if worldEggs then438 for _, egg in ipairs(worldEggs:GetChildren()) do439 addEgg(egg)440 end441 end442 -- иногда яйца лежат прямо в Area443 for _, child in ipairs(area:GetChildren()) do444 if string.find(string.lower(child.Name), "egg", 1, true) and child:IsA("Model") then445 addEgg(child)446 end447 end448 end449 -- RS templates450 local rsEggs = RS:FindFirstChild("Eggs")451 if rsEggs then452 for _, egg in ipairs(rsEggs:GetChildren()) do453 if egg:IsA("Model") or egg:IsA("Folder") then454 addEgg(egg)455 end456 end457 end458459 table.sort(eggCache, function(a, b)460 return (a.cost or 0) < (b.cost or 0)461 end)462 if not cfg.SelectedEgg and eggCache[1] then463 cfg.SelectedEgg = eggCache[1].id464 end465end466467local function getSelectedEgg()468 for _, e in ipairs(eggCache) do469 if e.id == cfg.SelectedEgg then return e end470 end471 return eggCache[1]472end473474-- dump: Unlock + "N Required" = wins dog; Buy + "199" = robux475local function getBestAffordableDog()476 local area = getArea()477 local base = area and area:FindFirstChild("DogBase")478 if not base then return nil end479480 local wins = getWins()481 local best, bestCost, bestPrompt482483 for _, dog in ipairs(base:GetChildren()) do484 if isRobuxDog(dog) then485 -- skip donate486 else487 local unlock = findPrompt(dog, "unlock")488 local buy = findPrompt(dog, "buy")489 local prompt = unlock or buy490 if prompt then491 local cost = extractWinsCost(dog)492 if cost and cost <= wins then493 if not bestCost or cost > bestCost then494 best, bestCost, bestPrompt = dog, cost, prompt495 end496 end497 end498 end499 end500 return best, bestCost, bestPrompt501end502503-- dump: Workspace.Areas.Area_1.FightParts.FightFinishPart504local function findFinishParts()505 local list = {}506 local seen = {}507508 local function add(part)509 if part and part:IsA("BasePart") and not seen[part] then510 seen[part] = true511 list[#list + 1] = part512 end513 end514515 local area = getArea()516 if area then517 local fight = area:FindFirstChild("FightParts")518 local finish = fight and fight:FindFirstChild("FightFinishPart")519 add(finish)520 if fight then521 for _, p in ipairs(fight:GetDescendants()) do522 if p:IsA("BasePart") and string.find(string.lower(p.Name), "finish", 1, true) then523 add(p)524 end525 end526 end527 end528529 local keys = { "fightfinish", "finish", "goal", "endline", "end_line", "winpad", "endpoint", "raceend", "finishline" }530 for _, obj in ipairs(workspace:GetDescendants()) do531 if obj:IsA("BasePart") then532 local n = string.lower(obj.Name)533 for _, k in ipairs(keys) do534 if string.find(n, k, 1, true) then535 add(obj)536 break537 end538 end539 end540 end541 return list542end543544-- ===== LOOPS =====545local function loopTrain()546 local tm = getBestTreadmill()547 if tm then548 statusText = "Train: " .. tm.Name .. " | Power=" .. tostring(getEnergy())549 local prompt = tm:FindFirstChildWhichIsA("ProximityPrompt", true)550 -- TP к дорожке чтобы сервер принял551 local hrp = getHRP()552 local part = tm:FindFirstChildWhichIsA("BasePart", true)553 if hrp and part then554 pcall(function()555 hrp.CFrame = part.CFrame * CFrame.new(0, 3, 0)556 end)557 end558 firePrompt(prompt)559 -- remotes с именем treadmill560 fire(StartTrain, tm.Name)561 fire(StartTrain)562 fire(RunTrain, tm.Name)563 fire(RunTrain)564 fire(AutoTrainStart, tm.Name)565 fire(AutoTrainStart)566 else567 statusText = "Train: no treadmill"568 fire(AutoTrainStart)569 end570 task.wait(cfg.TrainDelay)571end572573local function loopHatch()574 refreshEggs()575 local egg = getSelectedEgg()576 if not egg then577 statusText = "Hatch: no egg"578 task.wait(1)579 return580 end581 local wins = getWins()582 if egg.cost and egg.cost > 0 and wins < egg.cost then583 statusText = string.format("Hatch: need %s wins (have %s)", tostring(egg.cost), tostring(wins))584 task.wait(1)585 return586 end587 statusText = string.format("Hatch: %s (%s wins)", egg.name, tostring(egg.cost or "?"))588 -- TP к яйцу589 local hrp = getHRP()590 local part = egg.model and egg.model:FindFirstChildWhichIsA("BasePart", true)591 if hrp and part then592 pcall(function()593 hrp.CFrame = part.CFrame * CFrame.new(0, 3, 0)594 end)595 end596 local prompt = egg.model and egg.model:FindFirstChildWhichIsA("ProximityPrompt", true)597 firePrompt(prompt)598 fire(HatchRE, egg.id, cfg.HatchAmount)599 fire(HatchRE, egg.name, cfg.HatchAmount)600 fire(HatchRE, egg.id)601 fire(HatchRE, egg.name)602 task.wait(cfg.HatchDelay)603end604605local function loopBuyDogs()606 local dog, cost, prompt = getBestAffordableDog()607 if not dog then608 statusText = "BuyDog: nothing affordable | wins=" .. tostring(getWins())609 task.wait(1)610 return611 end612 statusText = string.format("BuyDog: %s cost=%s wins=%s", dog.Name, tostring(cost or "?"), tostring(getWins()))613 local hrp = getHRP()614 local part = dog:FindFirstChildWhichIsA("BasePart", true)615 if hrp and part then616 pcall(function()617 hrp.CFrame = part.CFrame * CFrame.new(0, 3, 0)618 end)619 task.wait(0.05)620 end621 if prompt then622 firePrompt(prompt)623 else624 firePrompt(findPrompt(dog, "unlock") or findPrompt(dog, "buy"))625 end626 task.wait(cfg.BuyDelay)627end628629local function loopUnlockDogs()630 -- тот же лучший Unlock за wins631 loopBuyDogs()632end633634local function loopBuyPartners()635 local area = getArea()636 local base = area and area:FindFirstChild("PartnerBase")637 local wins = getWins()638 if base then639 for _, partner in ipairs(base:GetChildren()) do640 if not isDonatableName(partner.Name) and not hasRobuxText(partner) then641 local cost = extractWinsCost(partner)642 if not cost or cost <= wins then643 for _, p in ipairs(partner:GetDescendants()) do644 if p:IsA("ProximityPrompt") and string.lower(p.ActionText or "") == "buy" then645 firePrompt(p)646 end647 end648 end649 end650 end651 end652 task.wait(cfg.BuyDelay)653end654655local function loopUnlockPartners()656 local area = getArea()657 local base = area and area:FindFirstChild("PartnerBase")658 local wins = getWins()659 if base then660 for _, partner in ipairs(base:GetChildren()) do661 if not isDonatableName(partner.Name) and not hasRobuxText(partner) then662 local cost = extractWinsCost(partner)663 if not cost or cost <= wins then664 for _, p in ipairs(partner:GetDescendants()) do665 if p:IsA("ProximityPrompt") and string.lower(p.ActionText or "") == "unlock" then666 firePrompt(p)667 end668 end669 end670 end671 end672 end673 task.wait(cfg.BuyDelay)674end675676local function loopEquipBest()677 fire(EquipBestPets)678 task.wait(cfg.EquipDelay)679end680681local function loopRebirth()682 fire(RebirthRF)683 task.wait(cfg.RebirthDelay)684end685686local function loopSuperRebirth()687 fire(SuperRebirthRF)688 task.wait(cfg.RebirthDelay)689end690691local function loopSpin()692 fire(StartSpinRF)693 local area = getArea()694 local wheel = area and area:FindFirstChild("Items") and area.Items:FindFirstChild("SpinWheel")695 if wheel then696 for _, p in ipairs(wheel:GetDescendants()) do697 if p:IsA("ProximityPrompt") then firePrompt(p) end698 end699 end700 task.wait(cfg.SpinDelay)701end702703local function loopUpgrade()704 fire(UpgradeRE)705 fire(UpgradeRE, 1)706 task.wait(cfg.UpgradeDelay)707end708709local function loopHarvest()710 local scene = workspace:FindFirstChild("FruitShopScene")711 if scene then712 for _, p in ipairs(scene:GetDescendants()) do713 if p:IsA("ProximityPrompt") and string.lower(p.ActionText or "") == "harvest" then714 firePrompt(p)715 end716 end717 end718 task.wait(cfg.HarvestDelay)719end720721local function loopClaim()722 fire(ClaimDaily)723 fire(ClaimOnline)724 fire(ClaimQuest)725 fire(ClaimOfflineWins)726 task.wait(cfg.ClaimDelay)727end728729local function loopDash()730 fire(DashStart)731 task.wait(cfg.DashDelay)732end733734local finishCache = {}735local function loopRaceWin()736 fire(JoinContest)737 fire(StartContest)738 fire(GetWins)739 fire(ClaimOfflineWins)740741 if #finishCache == 0 then742 finishCache = findFinishParts()743 end744745 local hrp = getHRP()746 if hrp and #finishCache > 0 then747 -- прыгаем по всем кандидатам финиша748 for _, part in ipairs(finishCache) do749 if not running.AutoRaceWin then break end750 if part.Parent then751 pcall(function()752 hrp.AssemblyLinearVelocity = Vector3.zero753 hrp.CFrame = part.CFrame + Vector3.new(0, 4, 0)754 end)755 -- прыжок756 local hum = player.Character and player.Character:FindFirstChildOfClass("Humanoid")757 if hum then758 pcall(function()759 hum:ChangeState(Enum.HumanoidStateType.Jumping)760 end)761 end762 task.wait(cfg.RaceDelay)763 end764 end765 statusText = "RaceWin: TP finish x" .. #finishCache766 else767 -- fallback: летим вперёд по LookVector очень далеко768 if hrp then769 pcall(function()770 hrp.CFrame = hrp.CFrame + hrp.CFrame.LookVector * 500 + Vector3.new(0, 5, 0)771 end)772 statusText = "RaceWin: boost forward (no finish found)"773 else774 statusText = "RaceWin: no HRP"775 end776 task.wait(0.5)777 end778end779780-- ===== UI =====781local gui = Instance.new("ScreenGui")782gui.Name = "DogRaceAutoUI"783gui.ResetOnSpawn = false784gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling785gui.Parent = playerGui786787local ROOT_W, ROOT_H = 580, 540788local root = Instance.new("Frame")789root.Size = UDim2.fromOffset(ROOT_W, ROOT_H)790root.Position = UDim2.new(0.5, -ROOT_W / 2, 0.5, -ROOT_H / 2)791root.BackgroundColor3 = Color3.fromRGB(18, 18, 22)792root.BorderSizePixel = 0793root.Active = true794root.Parent = gui795Instance.new("UICorner", root).CornerRadius = UDim.new(0, 12)796Instance.new("UIStroke", root).Color = Color3.fromRGB(45, 45, 55)797798local header = Instance.new("Frame")799header.Size = UDim2.new(1, 0, 0, 48)800header.BackgroundColor3 = Color3.fromRGB(24, 24, 30)801header.BorderSizePixel = 0802header.Parent = root803Instance.new("UICorner", header).CornerRadius = UDim.new(0, 12)804local headerFix = Instance.new("Frame")805headerFix.Size = UDim2.new(1, 0, 0, 16)806headerFix.Position = UDim2.new(0, 0, 1, -16)807headerFix.BackgroundColor3 = Color3.fromRGB(24, 24, 30)808headerFix.BorderSizePixel = 0809headerFix.Parent = header810811local title = Instance.new("TextLabel")812title.Size = UDim2.new(1, -20, 0, 22)813title.Position = UDim2.fromOffset(14, 6)814title.BackgroundTransparency = 1815title.Font = Enum.Font.GothamBold816title.TextSize = 18817title.TextXAlignment = Enum.TextXAlignment.Left818title.TextColor3 = Color3.fromRGB(240, 240, 245)819title.Text = "Dog Race Auto"820title.Parent = header821822local subtitle = Instance.new("TextLabel")823subtitle.Size = UDim2.new(1, -20, 0, 16)824subtitle.Position = UDim2.fromOffset(14, 28)825subtitle.BackgroundTransparency = 1826subtitle.Font = Enum.Font.Gotham827subtitle.TextSize = 11828subtitle.TextXAlignment = Enum.TextXAlignment.Left829subtitle.TextColor3 = Color3.fromRGB(130, 130, 145)830subtitle.Text = "..."831subtitle.Parent = header832833local sidebar = Instance.new("Frame")834sidebar.Size = UDim2.new(0, 140, 1, -56)835sidebar.Position = UDim2.fromOffset(8, 52)836sidebar.BackgroundColor3 = Color3.fromRGB(24, 24, 30)837sidebar.BorderSizePixel = 0838sidebar.Parent = root839Instance.new("UICorner", sidebar).CornerRadius = UDim.new(0, 8)840Instance.new("UIListLayout", sidebar).Padding = UDim.new(0, 4)841local sidePad = Instance.new("UIPadding", sidebar)842sidePad.PaddingTop = UDim.new(0, 8)843sidePad.PaddingLeft = UDim.new(0, 8)844sidePad.PaddingRight = UDim.new(0, 8)845846local content = Instance.new("Frame")847content.Size = UDim2.new(1, -164, 1, -60)848content.Position = UDim2.fromOffset(156, 52)849content.BackgroundColor3 = Color3.fromRGB(24, 24, 30)850content.BorderSizePixel = 0851content.Parent = root852Instance.new("UICorner", content).CornerRadius = UDim.new(0, 8)853854local pages, tabButtons = {}, {}855856local function makePage(name)857 local page = Instance.new("ScrollingFrame")858 page.Size = UDim2.new(1, -12, 1, -12)859 page.Position = UDim2.fromOffset(6, 6)860 page.BackgroundTransparency = 1861 page.BorderSizePixel = 0862 page.ScrollBarThickness = 4863 page.AutomaticCanvasSize = Enum.AutomaticSize.Y864 page.CanvasSize = UDim2.new()865 page.Visible = false866 page.Parent = content867 Instance.new("UIListLayout", page).Padding = UDim.new(0, 5)868 local pad = Instance.new("UIPadding", page)869 pad.PaddingTop = UDim.new(0, 4)870 pad.PaddingBottom = UDim.new(0, 8)871 pad.PaddingLeft = UDim.new(0, 4)872 pad.PaddingRight = UDim.new(0, 4)873 pages[name] = page874 return page875end876877local function selectTab(name)878 for n, page in pairs(pages) do879 page.Visible = n == name880 end881 for n, btn in pairs(tabButtons) do882 local on = n == name883 btn.BackgroundColor3 = on and Color3.fromRGB(70, 180, 100) or Color3.fromRGB(34, 34, 42)884 btn.TextColor3 = on and Color3.fromRGB(20, 20, 24) or Color3.fromRGB(210, 210, 220)885 end886end887888local function addTab(name, order)889 local btn = Instance.new("TextButton")890 btn.Size = UDim2.new(1, 0, 0, 34)891 btn.BackgroundColor3 = Color3.fromRGB(34, 34, 42)892 btn.Font = Enum.Font.GothamMedium893 btn.TextSize = 13894 btn.TextColor3 = Color3.fromRGB(210, 210, 220)895 btn.Text = name896 btn.AutoButtonColor = false897 btn.LayoutOrder = order898 btn.Parent = sidebar899 Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)900 tabButtons[name] = btn901 btn.MouseButton1Click:Connect(function()902 selectTab(name)903 end)904 makePage(name)905end906907local function section(page, text)908 local l = Instance.new("TextLabel")909 l.Size = UDim2.new(1, -4, 0, 20)910 l.BackgroundTransparency = 1911 l.Font = Enum.Font.GothamMedium912 l.TextSize = 12913 l.TextXAlignment = Enum.TextXAlignment.Left914 l.TextColor3 = Color3.fromRGB(120, 120, 135)915 l.Text = text916 l.Parent = page917end918919local function row(page, h)920 local f = Instance.new("Frame")921 f.Size = UDim2.new(1, -4, 0, h or 30)922 f.BackgroundColor3 = Color3.fromRGB(32, 32, 40)923 f.BorderSizePixel = 0924 f.Parent = page925 Instance.new("UICorner", f).CornerRadius = UDim.new(0, 6)926 return f927end928929local function makeToggle(parent, text, get, set)930 local label = Instance.new("TextLabel")931 label.Size = UDim2.new(1, -56, 1, 0)932 label.Position = UDim2.fromOffset(10, 0)933 label.BackgroundTransparency = 1934 label.Font = Enum.Font.Gotham935 label.TextSize = 13936 label.TextXAlignment = Enum.TextXAlignment.Left937 label.TextColor3 = Color3.fromRGB(220, 220, 230)938 label.Text = text939 label.Parent = parent940 local btn = Instance.new("TextButton")941 btn.Size = UDim2.fromOffset(38, 20)942 btn.Position = UDim2.new(1, -46, 0.5, -10)943 btn.BackgroundColor3 = Color3.fromRGB(55, 55, 65)944 btn.Text = ""945 btn.AutoButtonColor = false946 btn.Parent = parent947 Instance.new("UICorner", btn).CornerRadius = UDim.new(1, 0)948 local knob = Instance.new("Frame")949 knob.Size = UDim2.fromOffset(16, 16)950 knob.Position = UDim2.fromOffset(2, 2)951 knob.BackgroundColor3 = Color3.fromRGB(245, 245, 250)952 knob.BorderSizePixel = 0953 knob.Parent = btn954 Instance.new("UICorner", knob).CornerRadius = UDim.new(1, 0)955 local function refresh()956 local on = get()957 btn.BackgroundColor3 = on and Color3.fromRGB(70, 180, 100) or Color3.fromRGB(55, 55, 65)958 knob.Position = on and UDim2.fromOffset(20, 2) or UDim2.fromOffset(2, 2)959 end960 btn.MouseButton1Click:Connect(function()961 set(not get())962 refresh()963 end)964 refresh()965end966967local function feature(page, label, key, fn)968 local r = row(page, 32)969 makeToggle(r, label, function()970 return cfg[key]971 end, function(on)972 setFeature(key, on, fn)973 end)974end975976local function numBox(page, labelText, get, set)977 local r = row(page, 32)978 local label = Instance.new("TextLabel")979 label.Size = UDim2.new(0.55, 0, 1, 0)980 label.Position = UDim2.fromOffset(10, 0)981 label.BackgroundTransparency = 1982 label.Font = Enum.Font.Gotham983 label.TextSize = 13984 label.TextXAlignment = Enum.TextXAlignment.Left985 label.TextColor3 = Color3.fromRGB(210, 210, 220)986 label.Text = labelText987 label.Parent = r988 local box = Instance.new("TextBox")989 box.Size = UDim2.new(0.4, -12, 0, 22)990 box.Position = UDim2.new(0.58, 0, 0.5, -11)991 box.BackgroundColor3 = Color3.fromRGB(42, 42, 52)992 box.Font = Enum.Font.Gotham993 box.TextSize = 13994 box.TextColor3 = Color3.fromRGB(235, 235, 240)995 box.Text = tostring(get())996 box.ClearTextOnFocus = false997 box.Parent = r998 Instance.new("UICorner", box).CornerRadius = UDim.new(0, 5)999 box.FocusLost:Connect(function()1000 local n = tonumber(box.Text)1001 if n then set(n) end1002 box.Text = tostring(get())1003 end)1004end10051006addTab("Main", 1)1007addTab("Train", 2)1008addTab("Hatch", 3)1009addTab("Dogs", 4)1010addTab("Race", 5)1011addTab("More", 6)10121013local main, train, hatch, dogs, race, more =1014 pages.Main, pages.Train, pages.Hatch, pages.Dogs, pages.Race, pages.More10151016section(main, "QUICK")1017feature(main, "Auto Train (energy match)", "AutoTrain", loopTrain)1018feature(main, "Auto Hatch", "AutoHatch", loopHatch)1019feature(main, "Auto Buy Dogs (wins)", "AutoBuyDogs", loopBuyDogs)1020feature(main, "Auto Race Win (TP finish)", "AutoRaceWin", loopRaceWin)1021feature(main, "Auto Rebirth", "AutoRebirth", loopRebirth)1022feature(main, "Auto Spin", "AutoSpin", loopSpin)1023feature(main, "Auto Equip Best", "AutoEquipBest", loopEquipBest)10241025section(train, "TRAIN")1026feature(train, "Auto Train (best treadmill for energy)", "AutoTrain", loopTrain)1027numBox(train, "Train delay", function()1028 return cfg.TrainDelay1029end, function(v)1030 cfg.TrainDelay = math.max(0.05, v)1031end)1032feature(train, "Auto Dash", "AutoDash", loopDash)10331034-- Hatch page eggs rebuilt dynamically1035local hatchListFrame1036local function rebuildEggButtons()1037 refreshEggs()1038 -- clear old egg rows (keep section/feature/num by tagging)1039 for _, child in ipairs(hatch:GetChildren()) do1040 if child:GetAttribute("EggRow") then1041 child:Destroy()1042 end1043 end1044 for _, egg in ipairs(eggCache) do1045 local r = row(hatch, 30)1046 r:SetAttribute("EggRow", true)1047 local btn = Instance.new("TextButton")1048 btn.Size = UDim2.new(1, -8, 1, -4)1049 btn.Position = UDim2.fromOffset(4, 2)1050 btn.BackgroundColor3 = Color3.fromRGB(42, 42, 52)1051 btn.Font = Enum.Font.Gotham1052 btn.TextSize = 121053 btn.TextColor3 = Color3.fromRGB(220, 220, 230)1054 btn.TextXAlignment = Enum.TextXAlignment.Left1055 btn.Text = string.format(" %s — %s wins", egg.name, tostring(egg.cost or "?"))1056 btn.AutoButtonColor = false1057 btn.Parent = r1058 Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)1059 local function paint()1060 local on = cfg.SelectedEgg == egg.id1061 btn.BackgroundColor3 = on and Color3.fromRGB(70, 180, 100) or Color3.fromRGB(42, 42, 52)1062 btn.TextColor3 = on and Color3.fromRGB(20, 20, 24) or Color3.fromRGB(220, 220, 230)1063 end1064 btn.MouseButton1Click:Connect(function()1065 cfg.SelectedEgg = egg.id1066 for _, ch in ipairs(hatch:GetChildren()) do1067 if ch:GetAttribute("EggRow") then1068 local b = ch:FindFirstChildOfClass("TextButton")1069 if b then1070 -- crude: rebuild paint via comparing SelectedEgg in text is hard; just rebuild1071 end1072 end1073 end1074 rebuildEggButtons()1075 end)1076 paint()1077 end1078 if #eggCache == 0 then1079 local r = row(hatch, 40)1080 r:SetAttribute("EggRow", true)1081 local l = Instance.new("TextLabel")1082 l.Size = UDim2.new(1, -10, 1, 0)1083 l.Position = UDim2.fromOffset(8, 0)1084 l.BackgroundTransparency = 11085 l.Font = Enum.Font.Gotham1086 l.TextSize = 121087 l.TextColor3 = Color3.fromRGB(160, 160, 170)1088 l.TextXAlignment = Enum.TextXAlignment.Left1089 l.Text = "Яйца не найдены / только донат. Запусти DogRaceDump.lua"1090 l.Parent = r1091 end1092end10931094section(hatch, "HATCH")1095feature(hatch, "Auto Hatch (selected egg)", "AutoHatch", loopHatch)1096numBox(hatch, "Hatch amount", function()1097 return cfg.HatchAmount1098end, function(v)1099 cfg.HatchAmount = math.max(1, math.floor(v))1100end)1101numBox(hatch, "Hatch delay", function()1102 return cfg.HatchDelay1103end, function(v)1104 cfg.HatchDelay = math.max(0.1, v)1105end)1106section(hatch, "EGGS (wins cost, no robux)")1107local refreshBtn = Instance.new("TextButton")1108refreshBtn.Size = UDim2.new(1, -4, 0, 28)1109refreshBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 62)1110refreshBtn.Font = Enum.Font.GothamMedium1111refreshBtn.TextSize = 121112refreshBtn.TextColor3 = Color3.fromRGB(230, 230, 240)1113refreshBtn.Text = "Refresh eggs"1114refreshBtn.AutoButtonColor = false1115refreshBtn.Parent = hatch1116Instance.new("UICorner", refreshBtn).CornerRadius = UDim.new(0, 6)1117refreshBtn.MouseButton1Click:Connect(rebuildEggButtons)11181119section(dogs, "DOGS (wins only)")1120feature(dogs, "Auto Buy best affordable dog", "AutoBuyDogs", loopBuyDogs)1121feature(dogs, "Auto Unlock/Equip dogs", "AutoUnlockDogs", loopUnlockDogs)1122feature(dogs, "Auto Buy partners", "AutoBuyPartners", loopBuyPartners)1123feature(dogs, "Auto Unlock partners", "AutoUnlockPartners", loopUnlockPartners)1124feature(dogs, "Auto Equip Best Pets", "AutoEquipBest", loopEquipBest)1125numBox(dogs, "Buy delay", function()1126 return cfg.BuyDelay1127end, function(v)1128 cfg.BuyDelay = math.max(0.1, v)1129end)11301131section(race, "RACE WINS")1132feature(race, "Auto Race Win (TP to finish)", "AutoRaceWin", loopRaceWin)1133numBox(race, "TP interval", function()1134 return cfg.RaceDelay1135end, function(v)1136 cfg.RaceDelay = math.max(0.05, v)1137end)1138local tip = Instance.new("TextLabel")1139tip.Size = UDim2.new(1, -4, 0, 60)1140tip.BackgroundTransparency = 11141tip.Font = Enum.Font.Gotham1142tip.TextSize = 111143tip.TextWrapped = true1144tip.TextXAlignment = Enum.TextXAlignment.Left1145tip.TextYAlignment = Enum.TextYAlignment.Top1146tip.TextColor3 = Color3.fromRGB(140, 140, 155)1147tip.Text = "Ищет Finish/Goal/End на карте и телепортит туда во время забега. Если финиш не найден — рывок вперёд. Запусти забег вручную или через JoinContest."1148tip.Parent = race11491150section(more, "MORE")1151feature(more, "Auto Rebirth", "AutoRebirth", loopRebirth)1152feature(more, "Auto Super Rebirth", "AutoSuperRebirth", loopSuperRebirth)1153feature(more, "Auto Spin", "AutoSpin", loopSpin)1154feature(more, "Auto Upgrade", "AutoUpgrade", loopUpgrade)1155feature(more, "Auto Harvest", "AutoHarvest", loopHarvest)1156feature(more, "Auto Claim Rewards", "AutoClaimRewards", loopClaim)11571158rebuildEggButtons()1159selectTab("Main")11601161task.spawn(function()1162 while gui.Parent do1163 subtitle.Text = string.format(1164 "Wins: %s | Energy/Str: %s | %s",1165 tostring(getWins()),1166 tostring(getEnergy()),1167 statusText1168 )1169 task.wait(0.5)1170 end1171end)11721173local dragging, dragStart, startPos1174header.InputBegan:Connect(function(input)1175 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then1176 dragging = true1177 dragStart = input.Position1178 startPos = root.Position1179 input.Changed:Connect(function()1180 if input.UserInputState == Enum.UserInputState.End then dragging = false end1181 end)1182 end1183end)1184UIS.InputChanged:Connect(function(input)1185 if not dragging then return end1186 if input.UserInputType ~= Enum.UserInputType.MouseMovement and input.UserInputType ~= Enum.UserInputType.Touch then return end1187 local d = input.Position - dragStart1188 root.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y)1189end)11901191print("[DogRace Auto v2] energy-train / wins-dogs / eggs+cost / race TP")Ultimate Gym Game





Comments · …
Loading comments…