--[[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=6a3267bee0797c9aae65b846"))() end) end) --[[rscripts:analytics:end]] local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local LP = game:GetService("Players").LocalPlayer local RS = game:GetService("ReplicatedStorage") local VirtualUser = game:GetService("VirtualUser") 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 Window = Rayfield:CreateWindow({ Name = "Formula World Manager - Fabron's Hub", LoadingTitle = "Loading...", LoadingSubtitle = "Fabron's Hub is loading, please wait..", ConfigurationSaving = { Enabled = true, FolderName = "Formula World Manager", FileName = "Config" }, KeySystem = false, }) -- Remotes local UpdateCareerSaveData = RS:WaitForChild("UpdateCareerSaveData") local RequestCareerSaveData = RS:WaitForChild("RequestCareerSaveData") local DeleteCareerSlot = RS:WaitForChild("DeleteCareerSlot") local SetActiveSlot = RS:WaitForChild("SetActiveSlot") local MAXED = { Aero = 99, Brakes = 99, Suspension = 99, Engine = 99, Chassis = 99, Overall = 99 } local safeRequire do local probe = RS:WaitForChild("Modules"):WaitForChild("GameConfigModule") if pcall(require, probe) then safeRequire = require else if not decompile then error("safeRequire: require blocked and `decompile` unavailable") end local cache = {} safeRequire = function(m) local cached = cache[m] if cached ~= nil then return cached end local ok, v = pcall(require, m) if ok then cache[m] = v; return v end local fn, perr = loadstring(decompile(m)) if not fn then error("safeRequire: parse error on " .. m:GetFullName() .. ": " .. tostring(perr)) end setfenv(fn, setmetatable({ require = safeRequire, script = m }, { __index = getfenv() })) local result = fn(); cache[m] = result; return result end end end local Modules = RS:WaitForChild("Modules") local function toSortedList(tbl, mapFn, sortKey) local list = {} for k, v in pairs(tbl) do list[#list + 1] = mapFn(k, v) end table.sort(list, function(a, b) return (a[sortKey] or 0) > (b[sortKey] or 0) end) return list end -- TeamDataModule: key-keyed -> {key, name (display), budget (StartingBudget)} local TEAMS = toSortedList(safeRequire(Modules.TeamDataModule), function(k, v) return { key = k, name = v.Name or k, budget = v.StartingBudget or 0 } end, "budget") local function personMapper(k, v) return { name = k, ovr = v.Overall or 0, sal = v.AnnualSalary or 0, sign = v.Price or 0 } end local DRIVERS = toSortedList(safeRequire(Modules.DriverDataModule), personMapper, "ovr") local STRATEGISTS = toSortedList(safeRequire(Modules.StrategistDataModule), personMapper, "ovr") local PITCREWS = toSortedList(safeRequire(Modules.PitCrewDataModule), personMapper, "ovr") -- Build option label lists + label->record lookup maps local function buildOptions(list, labelFn) local opts, byLabel = {}, {} for _, rec in ipairs(list) do local label = labelFn(rec) opts[#opts + 1] = label byLabel[label] = rec end return opts, byLabel end local teamOpts, teamByLabel = buildOptions(TEAMS, function(r) return string.format("%s ($%dM)", r.name, math.floor(r.budget/1e6)) end) local driverOpts, driverByLabel = buildOptions(DRIVERS, function(r) return string.format("%s (%d)", r.name, r.ovr) end) local stratOpts, stratByLabel = buildOptions(STRATEGISTS, function(r) return string.format("%s (%d)", r.name, r.ovr) end) local crewOpts, crewByLabel = buildOptions(PITCREWS, function(r) return string.format("%s (%d)", r.name, r.ovr) end) -- Selection state (defaults = the best of everything on slot 2) local sel = { slot = 2, team = teamByLabel[teamOpts[1]], d1 = driverByLabel[driverOpts[1]], d2 = driverByLabel[driverOpts[2]], strat = stratByLabel[stratOpts[1]], crew = crewByLabel[crewOpts[1]], } local function pick(o) -- Rayfield hands back a table for dropdowns if type(o) == "table" then return o[1] end return o end local function notify(content) Rayfield:Notify({ Title = "Career Setup", Content = content, Duration = 7, Image = nil }) end local busy = false local function saveSetup() if busy then return end busy = true notify("Saving...") local slot, team = sel.slot, sel.team pcall(function() DeleteCareerSlot:InvokeServer(slot) end) task.wait(0.6) UpdateCareerSaveData:FireServer(slot, { team = team.key, carStats = MAXED, __allowSetupOverride = true, }) task.wait(1.5) local all = RequestCareerSaveData:InvokeServer() local s = all and all[slot] if type(s) ~= "table" then notify("Slot " .. slot .. " creation failed — try again.") busy = false return end s.team = team.key s.carStats = { Aero = 99, Brakes = 99, Suspension = 99, Engine = 99, Chassis = 99, Overall = 99 } s.drivers = { sel.d1.name, sel.d2.name } s.strategist = sel.strat.name s.pitcrew = sel.crew.name s.contracts = s.contracts or {} s.contracts.drivers = { { name = sel.d1.name, annualSalary = sel.d1.sal, signingCost = sel.d1.sign }, { name = sel.d2.name, annualSalary = sel.d2.sal, signingCost = sel.d2.sign }, } s.contracts.strategist = { name = sel.strat.name, annualSalary = sel.strat.sal, signingCost = sel.strat.sign } s.contracts.pitcrew = { name = sel.crew.name, annualSalary = sel.crew.sal, signingCost = sel.crew.sign } s.__allowSetupOverride = true UpdateCareerSaveData:FireServer(slot, s) task.wait(1.5) pcall(function() SetActiveSlot:FireServer(slot) end) local a = RequestCareerSaveData:InvokeServer()[slot] or {} local c = a.carStats or {} notify(string.format( "Slot %d saved\nTeam: %s | $%s\nCar Ovr: %s\nDrivers: %s + %s\nStrat: %s | Crew: %s", slot, tostring(a.team), tostring(a.Budget), tostring(c.Overall), tostring(a.drivers and a.drivers[1]), tostring(a.drivers and a.drivers[2]), tostring(a.strategist), tostring(a.pitcrew))) busy = false end local tab = Window:CreateTab("Career Setup", 4483362458) tab:CreateSection("Loadout") tab:CreateDropdown({ Name = "Save Slot", Options = { "1", "2", "3" }, CurrentOption = { "2" }, MultipleOptions = false, Flag = "fwm_slot", Callback = function(o) sel.slot = tonumber(pick(o)) or 1 end, }) tab:CreateDropdown({ Name = "Team & Budget", Options = teamOpts, CurrentOption = { teamOpts[1] }, Flag = "fwm_team", Callback = function(o) sel.team = teamByLabel[pick(o)] or sel.team end, }) tab:CreateDropdown({ Name = "Driver 1", Options = driverOpts, CurrentOption = { driverOpts[1] }, Flag = "fwm_d1", Callback = function(o) sel.d1 = driverByLabel[pick(o)] or sel.d1 end, }) tab:CreateDropdown({ Name = "Driver 2", Options = driverOpts, CurrentOption = { driverOpts[2] }, Flag = "fwm_d2", Callback = function(o) sel.d2 = driverByLabel[pick(o)] or sel.d2 end, }) tab:CreateDropdown({ Name = "Strategist", Options = stratOpts, CurrentOption = { stratOpts[1] }, Flag = "fwm_strat", Callback = function(o) sel.strat = stratByLabel[pick(o)] or sel.strat end, }) tab:CreateDropdown({ Name = "Pit Crew", Options = crewOpts, CurrentOption = { crewOpts[1] }, Flag = "fwm_crew", Callback = function(o) sel.crew = crewByLabel[pick(o)] or sel.crew end, }) tab:CreateSection("Note") tab:CreateParagraph({ Title = "Cars", Content = "Cars are always saved fully maxed (99 across Aero / Brakes / Suspension / Engine / Chassis / Overall)." }) tab:CreateParagraph({ Title = "Data", Content = "Saving WIPES the selected slot (required to seed the team budget at creation). Pick an empty slot or one you don't mind losing." }) tab:CreateButton({ Name = "Save Loadout to Slot", Callback = saveSetup, })