local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Window = Rayfield:CreateWindow({ Name = "+1 Speed Run For Brainrots", LoadingTitle = "Securing Speed Run...", LoadingSubtitle = "by HeliosDev", ConfigurationSaving = { Enabled = true, FolderName = "SpeedRunHub", FileName = "Config" }, Theme = "Ocean" }) -- SERVICES local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local ReplicatedStorage = game:GetService("ReplicatedStorage") local Events = ReplicatedStorage:WaitForChild("Events") local Workspace = game:GetService("Workspace") -- CONFIGURATION local TELEPORT_OFFSET = Vector3.new(0, 3, 0) local ZONE_SCAN_RADIUS = 300 local TREADMILL_SPAM_SPEED = 0.1 local ZoneMap = { ["OG"] = Vector3.new(-3573, -11, -1114), ["Divine"] = Vector3.new(-2677, -11, -1102), ["Celestial"] = Vector3.new(-1986, -11, -1115), ["Secret"] = Vector3.new(-1324, -11, -1109), ["Common"] = Vector3.new(-795, -11, -1149), } local SafeZone = Vector3.new(1145, -11, -1078) local BasePos = Vector3.new(33.65, 3.02, 2.36) local ZonePriorities = { Vector3.new(-3573, -11, -1114), Vector3.new(-2677, -11, -1102), Vector3.new(-1986, -11, -1115), Vector3.new(-1324, -11, -1109), Vector3.new(-795, -11, -1149), } -- SCRIPT STATE local ScriptState = { AutoFarm = false, AutoFarmAll = false, CollectCash = false, SelectedZone = "Secret", CarryLimit = 1, CurrentCount = 0, AutoStats = false, AutoTreadmill = false, AutoRunTreadmill = false, AutoBase = false, FarmLoopRunning = false, FarmAllLoopRunning = false, CashLoopRunning = false, StatsLoopRunning = false, TreadmillLoopRunning = false, RunTreadmillLoopRunning = false, BaseLoopRunning = false, } -- MUTATION PRIORITY local MutationPriority = { ["neon"] = 5, ["ruby"] = 4, ["diamond"] = 3, ["golden"] = 2, ["gold"] = 2, } -- TELEPORT local function teleport(pos) local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait() local hrp = char:FindFirstChild("HumanoidRootPart") if not hrp then return end if typeof(pos) == "CFrame" then hrp.CFrame = pos + TELEPORT_OFFSET elseif typeof(pos) == "Vector3" then hrp.CFrame = CFrame.new(pos + TELEPORT_OFFSET) end end -- GET THE WORLD POSITION OF ANY INSTANCE (walks up to find a part or model) local function getWorldPosition(instance) -- Walk up from the instance to find something with a position local current = instance while current and current ~= workspace do if current:IsA("BasePart") then return current.Position, current end if current:IsA("Model") then local primary = current.PrimaryPart if primary then return primary.Position, current end -- Try GetPivot local ok, pivot = pcall(function() return current:GetPivot().Position end) if ok and pivot then return pivot, current end -- Try finding any BasePart child local part = current:FindFirstChildWhichIsA("BasePart", true) if part then return part.Position, current end end current = current.Parent end return nil, nil end -- GET MUTATION SCORE FOR AN ENTITY local function getMutationScore(entity) if not entity then return 0 end -- Check the name local name = (entity.Name or ""):lower() for keyword, score in pairs(MutationPriority) do if string.find(name, keyword) then return score end end -- Check descendants for text indicators local ok, descendants = pcall(function() return entity:GetDescendants() end) if ok and descendants then for _, child in pairs(descendants) do local text = "" if child:IsA("StringValue") then text = (child.Value or ""):lower() elseif child:IsA("TextLabel") then text = (child.Text or ""):lower() end if text ~= "" then for keyword, score in pairs(MutationPriority) do if string.find(text, keyword) then return score end end end end end return 0 end -- CORE SCANNER: Find all collectible entities near a position -- Scans EVERY ProximityPrompt in workspace, finds its world position, -- and returns ones within radius of the given zone position local function scanForEntities(zonePos, radius) local found = {} for _, desc in pairs(workspace:GetDescendants()) do if desc:IsA("ProximityPrompt") and desc.Enabled then local pos, rootEntity = getWorldPosition(desc) if pos and (zonePos - pos).Magnitude < radius then local entity = rootEntity or desc.Parent local score = getMutationScore(entity) local distance = (zonePos - pos).Magnitude table.insert(found, { prompt = desc, position = pos, entity = entity, score = score, distance = distance, }) end end end -- Sort: highest mutation first, then closest table.sort(found, function(a, b) if a.score ~= b.score then return a.score > b.score end return a.distance < b.distance end) return found end -- TABS local FarmTab = Window:CreateTab("Auto Farm", 4483362458) local UpgradeTab = Window:CreateTab("Upgrades", 4483362458) local ConfigTab = Window:CreateTab("Settings", 4483362458) -- CONFIG TAB ConfigTab:CreateDropdown({ Name = "Carry Limit", Options = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}, CurrentOption = {"1"}, Callback = function(Option) ScriptState.CarryLimit = tonumber(Option[1]) end, }) ConfigTab:CreateToggle({ Name = "Prioritize Mutations", CurrentValue = true, Callback = function(Value) ScriptState.PrioritizeMutations = Value end, }) ConfigTab:CreateSlider({ Name = "Zone Scan Radius", Range = {100, 500}, Increment = 50, Suffix = " studs", CurrentValue = 300, Callback = function(Value) ZONE_SCAN_RADIUS = Value end, }) -- FARM TAB FarmTab:CreateSection("Zone Targeting") FarmTab:CreateDropdown({ Name = "Farm Zone", Options = {"Secret", "Celestial", "Divine", "OG", "Common"}, CurrentOption = {"Secret"}, Callback = function(Option) ScriptState.SelectedZone = Option[1] end, }) -- SINGLE ZONE FARM FarmTab:CreateToggle({ Name = "Auto Farm (Selected Zone)", CurrentValue = false, Callback = function(Value) ScriptState.AutoFarm = Value if Value and not ScriptState.FarmLoopRunning then ScriptState.FarmLoopRunning = true task.spawn(function() while ScriptState.AutoFarm do local success, err = pcall(function() local zonePos = ZoneMap[ScriptState.SelectedZone] -- Step 1: Teleport to zone center teleport(zonePos) task.wait(1) -- Step 2: Scan for entities with prompts near this zone local entities = scanForEntities(zonePos, ZONE_SCAN_RADIUS) if #entities > 0 then -- Step 3: Teleport to the best entity and collect local best = entities[1] teleport(best.position) task.wait(0.3) -- Fire the prompt if best.prompt and best.prompt.Parent then fireproximityprompt(best.prompt) task.wait(0.5) end -- Verify collection if best.entity and not best.entity:IsDescendantOf(workspace) then ScriptState.CurrentCount = ScriptState.CurrentCount + 1 else -- Try again closer teleport(best.position) task.wait(0.2) if best.prompt and best.prompt.Parent then fireproximityprompt(best.prompt) task.wait(0.5) end if best.entity and not best.entity:IsDescendantOf(workspace) then ScriptState.CurrentCount = ScriptState.CurrentCount + 1 end end -- Step 4: Return to safe zone when full if ScriptState.CurrentCount >= ScriptState.CarryLimit then teleport(SafeZone) task.wait(3) ScriptState.CurrentCount = 0 end else -- Nothing found, wait at safe zone for respawn teleport(SafeZone) task.wait(3) end end) if not success then warn("AutoFarm error: ", err) end task.wait(0.1) end ScriptState.FarmLoopRunning = false end) end end, }) FarmTab:CreateToggle({ Name = "Auto Farm ALL Zones", CurrentValue = false, Callback = function(Value) ScriptState.AutoFarmAll = Value if Value and not ScriptState.FarmAllLoopRunning then ScriptState.FarmAllLoopRunning = true task.spawn(function() while ScriptState.AutoFarmAll do local success, err = pcall(function() for _, zonePos in ipairs(ZonePriorities) do if not ScriptState.AutoFarmAll then break end teleport(zonePos) task.wait(1) local entities = scanForEntities(zonePos, ZONE_SCAN_RADIUS) if #entities > 0 then local best = entities[1] teleport(best.position) task.wait(0.3) if best.prompt and best.prompt.Parent then fireproximityprompt(best.prompt) task.wait(0.5) end end end -- Return to turn-in after cycling all zones teleport(SafeZone) task.wait(3) end) if not success then warn("AutoFarmAll error: ", err) end end ScriptState.FarmAllLoopRunning = false end) end end, }) FarmTab:CreateSection("Cash") FarmTab:CreateToggle({ Name = "Auto Collect Cash", CurrentValue = false, Callback = function(Value) ScriptState.CollectCash = Value if Value and not ScriptState.CashLoopRunning then ScriptState.CashLoopRunning = true task.spawn(function() while ScriptState.CollectCash do pcall(function() local root = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") if root then for _, v in ipairs(workspace:GetDescendants()) do if v.Name == "ButtonPart" and v:IsA("BasePart") then firetouchinterest(root, v, 0) firetouchinterest(root, v, 1) end end end end) task.wait(0.01) end ScriptState.CashLoopRunning = false end) end end, }) -- UPGRADES TAB UpgradeTab:CreateSection("Treadmill (Speed Exploit)") UpgradeTab:CreateToggle({ Name = "Turbo Treadmill Upgrade (FAST)", CurrentValue = false, Callback = function(Value) ScriptState.AutoTreadmill = Value if Value and not ScriptState.TreadmillLoopRunning then ScriptState.TreadmillLoopRunning = true local purchaseEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("PurchaseTreadmill") task.spawn(function() while ScriptState.AutoTreadmill do pcall(function() purchaseEvent:FireServer() purchaseEvent:FireServer() purchaseEvent:FireServer() end) task.wait(TREADMILL_SPAM_SPEED) end ScriptState.TreadmillLoopRunning = false end) end end, }) UpgradeTab:CreateToggle({ Name = "Auto Run Treadmill", CurrentValue = false, Callback = function(Value) ScriptState.AutoRunTreadmill = Value if Value and not ScriptState.RunTreadmillLoopRunning then ScriptState.RunTreadmillLoopRunning = true task.spawn(function() while ScriptState.AutoRunTreadmill do pcall(function() ReplicatedStorage.TreadmillToggle:FireServer(true) end) task.wait(0.5) end pcall(function() ReplicatedStorage.TreadmillToggle:FireServer(false) end) ScriptState.RunTreadmillLoopRunning = false end) end end, }) UpgradeTab:CreateSection("Purchases & Stats") UpgradeTab:CreateToggle({ Name = "Auto Upgrade Carry", CurrentValue = false, Callback = function(Value) ScriptState.AutoStats = Value if Value and not ScriptState.StatsLoopRunning then ScriptState.StatsLoopRunning = true task.spawn(function() while ScriptState.AutoStats do pcall(function() Events.UpgradeCarry:FireServer() end) task.wait(1) end ScriptState.StatsLoopRunning = false end) end end, }) UpgradeTab:CreateToggle({ Name = "Auto Upgrade All Bases (1-10)", CurrentValue = false, Callback = function(Value) ScriptState.AutoBase = Value if Value and not ScriptState.BaseLoopRunning then ScriptState.BaseLoopRunning = true local UpgradeEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("UpgradeBase") local BasesFolder = workspace:WaitForChild("Bases") task.spawn(function() while ScriptState.AutoBase do pcall(function() for i = 1, 10 do if not ScriptState.AutoBase then break end local targetBase = BasesFolder:FindFirstChild("Base" .. i) if targetBase then UpgradeEvent:FireServer(targetBase) end task.wait(0.1) end end) task.wait(1) end ScriptState.BaseLoopRunning = false end) end end, }) UpgradeTab:CreateButton({ Name = "Collect Daily Reward", Callback = function() pcall(function() Events.UpdateDailyReward:FireServer() end) end })