--[[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=6a39ea5081900757c9952423"))() 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 LP = Players.LocalPlayer 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 = "Anime Battle RNG - Fabron's Hub", LoadingTitle = "Loading...", LoadingSubtitle = "Fabron's Hub is loading, please wait..", ConfigurationSaving = { Enabled = true, FolderName = "Anime Battle RNG", FileName = "Config" }, KeySystem = false, }) _G.__ABRNG_GEN = (_G.__ABRNG_GEN or 0) + 1 local MY_GEN = _G.__ABRNG_GEN local function alive() return _G.__ABRNG_GEN == MY_GEN end local SERVICES do local idx = RS:WaitForChild("Packages"):WaitForChild("_Index") local knitPkg for _, c in ipairs(idx:GetChildren()) do if c.Name:find("sleitnick_knit") then knitPkg = c; break end end SERVICES = knitPkg and knitPkg:FindFirstChild("knit") and knitPkg.knit:FindFirstChild("Services") end local rfCache = {} local function getRF(svc, method) local key = svc .. "." .. method local cached = rfCache[key] if cached ~= nil then return cached or nil end local s = SERVICES and SERVICES:FindFirstChild(svc) local rfFolder = s and s:FindFirstChild("RF") local rf = rfFolder and rfFolder:FindFirstChild(method) rfCache[key] = rf or false return rf end local function invoke(svc, method, ...) local rf = getRF(svc, method) if not rf then return false, "no remote" end local args = table.pack(...) return pcall(function() return rf:InvokeServer(table.unpack(args, 1, args.n)) end) end local Registry = require(LP.PlayerScripts.Client.Controllers.Registry) local replica = nil local function resolveReplica() local ok, r = pcall(function() return Registry:Get("PlayerData") end) if ok and r and r.Data then replica = r end return replica end resolveReplica() if not replica then task.spawn(function() for _ = 1, 60 do if not alive() then return end if resolveReplica() then return end task.wait(0.25) end end) end local function prof() if replica and replica.Data then return replica.Data end return nil end -- Humanize big numbers with K/M/B/T/… suffixes (1234 -> "1.23K"). local ABBREV = { "", "K", "M", "B", "T", "Qa", "Qi", "Sx", "Sp", "Oc", "No", "Dc", "Ud", "Dd" } local function abbrev(n) n = tonumber(n) or 0 local sign = n < 0 and "-" or "" n = math.abs(n) if n < 1000 then if n == math.floor(n) then return sign .. tostring(math.floor(n)) end return sign .. (string.format("%.2f", n):gsub("%.?0+$", "")) end local i = 1 while n >= 1000 and i < #ABBREV do n = n / 1000; i = i + 1 end return sign .. (string.format("%.2f", n):gsub("%.?0+$", "")) .. ABBREV[i] end local watchers = {} local function onProfile(fn) watchers[#watchers + 1] = fn end local UI_REFRESH = 0.5 task.spawn(function() while alive() do for _, fn in ipairs(watchers) do pcall(fn) end task.wait(UI_REFRESH) end end) local ZonesData = require(RS.GameInfo.ZonesData) -- .Catalog[Zx] = {Id,Name,Order,WallPriceCoins} local StatsConfig = require(RS.GameInfo.StatsConfig) -- [statId] = {UpgradeCost,MaxLevel,Prereq,…} local CodesData = require(RS.GameInfo.CodesData) -- .Codes[code] = {Active,Rewards,Summary} -- Zones ordered low→high by Order, for progression + teleport. local ZONES = {} for _, z in pairs(ZonesData.Catalog or {}) do ZONES[#ZONES + 1] = z end table.sort(ZONES, function(a, b) return (a.Order or 0) < (b.Order or 0) end) local function isUnlocked(zoneId) local d = prof() return d and d.ZonesUnlocked and d.ZonesUnlocked[zoneId] == true end -- Furthest unlocked zone (highest Order) — where equipped units farm best. local function furthestZone() local best for _, z in ipairs(ZONES) do if isUnlocked(z.Id) then best = z end end return best end -- Next locked zone in order — the wall to buy next. local function nextZone() for _, z in ipairs(ZONES) do if not isUnlocked(z.Id) then return z end end return nil end local AutoRoll = { enabled = false, interval = 0.5 } task.spawn(function() while alive() do if AutoRoll.enabled then invoke("RollService", "RollBatch") task.wait(AutoRoll.interval) else task.wait(0.5) end end end) local AutoEquipBest = { enabled = false } local lastEquip = 0 onProfile(function() if not AutoEquipBest.enabled then return end local now = os.clock() if now - lastEquip < 2 then return end lastEquip = now invoke("EquipService", "EquipBest") end) local AutoProgress = { enabled = false, interval = 4 } local function buyNextWall() local d = prof(); if not d then return false end local z = nextZone(); if not z then return false end if (d.Coins or 0) >= (z.WallPriceCoins or math.huge) then local ok, res = invoke("ZoneService", "PurchaseWall", z.Id) return ok and res ~= false end return false end task.spawn(function() while alive() do if AutoProgress.enabled then local bought = pcall(buyNextWall) and buyNextWall() local far = furthestZone() if far then pcall(invoke, "WarpService", "WarpToZone", far.Id) end end task.wait(AutoProgress.interval) end end) local AutoRebirth = { enabled = false, cooldown = 30 } local function canRebirth() local ok, res = invoke("RebirthService", "CanRebirth") return ok and res == true end local function tryRebirth() if not canRebirth() then return false end local ok, res = invoke("RebirthService", "Rebirth") return ok and res ~= false end task.spawn(function() while alive() do if AutoRebirth.enabled then pcall(tryRebirth) end task.wait(AutoRebirth.cooldown) end end) local function statLevel(id) local d = prof() return (d and d.StatLevels and d.StatLevels[id]) or 0 end local function statMaxed(id, cfg) return cfg.MaxLevel ~= nil and statLevel(id) >= cfg.MaxLevel end local function prereqMet(cfg) local p = cfg.Prereq if not p then return true end return statLevel(p.Stat) >= (p.MinLevel or 0) end local function estCost(id, cfg) local lvl = statLevel(id) local uc = cfg.UpgradeCost or {} local base = uc.Base or math.huge if uc.Growth then return base * (uc.Growth ^ lvl) end return base * (lvl + 1) -- GrowthRamp / unknown: rough order only end -- Candidate stats (not maxed, prereq met), cheapest estimate first. local function statCandidates() local out = {} for id, cfg in pairs(StatsConfig) do if type(cfg) == "table" and cfg.UpgradeCost and not statMaxed(id, cfg) and prereqMet(cfg) then out[#out + 1] = { id = id, cost = estCost(id, cfg) } end end table.sort(out, function(a, b) return a.cost < b.cost end) return out end -- Buy the cheapest affordable stat (one per call). Server validates pay. local function buyCheapestStat() local d = prof(); if not d then return nil end local coins = d.Coins or 0 for _, c in ipairs(statCandidates()) do if coins >= c.cost then local ok, res = invoke("StatsService", "UpgradeStat", c.id) if ok and res ~= false then return c.id end end end return nil end local AutoUpgrade = { enabled = false, interval = 2 } task.spawn(function() while alive() do if AutoUpgrade.enabled then pcall(buyCheapestStat) end task.wait(AutoUpgrade.interval) end end) local function redeemAllCodes() local d = prof() local redeemed, attempted = 0, 0 local done = {} if d and d.RedeemedCodes then for k, v in pairs(d.RedeemedCodes) do done[tostring(k)] = true if type(v) == "string" then done[v] = true end end end for code, info in pairs(CodesData.Codes or {}) do if type(info) == "table" and info.Active and not done[code] then attempted = attempted + 1 local ok, res = invoke("CodesService", "Redeem", code) if ok and res ~= false then redeemed = redeemed + 1 end task.wait(0.3) end end return redeemed, attempted end local AutoClaims = { enabled = false, interval = 60 } local function claimAll() pcall(invoke, "OfflineEarningsService", "Claim") pcall(invoke, "DailyRewardsService", "Claim") pcall(invoke, "PlaytimeRewardsService", "Claim") pcall(invoke, "GroupRewardService", "Claim") end task.spawn(function() while alive() do if AutoClaims.enabled then pcall(claimAll) end task.wait(AutoClaims.interval) end end) local RollTab = Window:CreateTab("Rolling") RollTab:CreateSection("Status") local CoinLabel = RollTab:CreateLabel("Coins: —") local GemLabel = RollTab:CreateLabel("Gems: —") local RollLabel = RollTab:CreateLabel("Rolls: —") local RareLabel = RollTab:CreateLabel("Best rarity: —") local function refreshStatus() local d = prof(); if not d then return end pcall(function() CoinLabel:Set(("Coins: %s"):format(abbrev(d.Coins or 0))) end) pcall(function() GemLabel:Set(("Gems: %s"):format(abbrev(d.Gems or 0))) end) pcall(function() RollLabel:Set(("Rolls: %s"):format(abbrev(d.Rolls or 0))) end) pcall(function() RareLabel:Set(("Best rarity: %s (1 in %s)"):format( tostring(d.BestRarityRolled or "—"), abbrev(d.RarestRollOdds or 0))) end) end refreshStatus(); onProfile(refreshStatus) RollTab:CreateSection("Auto-roll") RollTab:CreateToggle({ Name = "Auto-roll", CurrentValue = false, Flag = "ABRNG_AutoRoll", Callback = function(v) AutoRoll.enabled = v invoke("RollService", "SetAutoRoll", v and true or false) end, }) RollTab:CreateSlider({ Name = "Roll interval (s)", Range = { 0.1, 5 }, Increment = 0.1, Suffix = "s", CurrentValue = AutoRoll.interval, Flag = "ABRNG_RollInterval", Callback = function(v) AutoRoll.interval = v end, }) RollTab:CreateButton({ Name = "Roll once", Callback = function() invoke("RollService", "RollBatch") end }) RollTab:CreateSection("Traits") RollTab:CreateToggle({ Name = "Auto-reroll traits (built-in)", CurrentValue = false, Flag = "ABRNG_AutoTrait", Callback = function(v) invoke("TraitsService", "SetAutoRoll", v and true or false) invoke("TraitsService", "SetSkipAnim", v and true or false) end, }) local UnitsTab = Window:CreateTab("Units") UnitsTab:CreateSection("Equip") local UnitLabel = UnitsTab:CreateLabel("Units: —") local function refreshUnits() local d = prof(); if not d then return end local owned, equipped = 0, 0 if d.OwnedUnits then for _ in pairs(d.OwnedUnits) do owned = owned + 1 end end if d.EquippedUnits then for _ in pairs(d.EquippedUnits) do equipped = equipped + 1 end end pcall(function() UnitLabel:Set(("Owned: %d unique | Equipped: %d"):format(owned, equipped)) end) end refreshUnits(); onProfile(refreshUnits) UnitsTab:CreateToggle({ Name = "Auto-equip best (after rolls)", CurrentValue = false, Flag = "ABRNG_AutoEquipBest", Callback = function(v) AutoEquipBest.enabled = v; if v then invoke("EquipService", "EquipBest") end end, }) UnitsTab:CreateButton({ Name = "Equip best now", Callback = function() invoke("EquipService", "EquipBest") end }) local ProgTab = Window:CreateTab("Progression") ProgTab:CreateSection("Auto-progress") local ProgLabel = ProgTab:CreateLabel("Zone: —") local function refreshProg() local d = prof(); if not d then return end local far = furthestZone() local nz = nextZone() pcall(function() ProgLabel:Set(("At: %s | next: %s ($%s, have $%s)"):format( far and far.Name or "—", nz and nz.Name or "MAX", nz and abbrev(nz.WallPriceCoins) or "—", abbrev(d.Coins or 0))) end) end refreshProg(); onProfile(refreshProg) ProgTab:CreateToggle({ Name = "Auto-progress (buy walls + farm furthest)", CurrentValue = false, Flag = "ABRNG_AutoProgress", Callback = function(v) AutoProgress.enabled = v if v then local far = furthestZone(); if far then invoke("WarpService", "WarpToZone", far.Id) end end end, }) ProgTab:CreateSlider({ Name = "Progress interval (s)", Range = { 2, 30 }, Increment = 1, Suffix = "s", CurrentValue = AutoProgress.interval, Flag = "ABRNG_ProgressInterval", Callback = function(v) AutoProgress.interval = v end, }) ProgTab:CreateButton({ Name = "Buy next wall now", Callback = function() if buyNextWall() then Rayfield:Notify({ Title = "Wall", Content = "Purchased next zone" }) else Rayfield:Notify({ Title = "Wall", Content = "Can't afford / boss-gated" }) end end }) ProgTab:CreateSection("Teleport") local tpTarget = nil local function zoneTpOptions() local o = {} for _, z in ipairs(ZONES) do o[#o + 1] = ("%d - %s"):format(z.Order or 0, z.Name) end return o end ProgTab:CreateDropdown({ Name = "Zone", Options = zoneTpOptions(), CurrentOption = {}, Flag = "ABRNG_TpZone", Callback = function(opt) local label = type(opt) == "table" and opt[1] or opt local order = label and tonumber(tostring(label):match("^(%d+)")) if order then for _, z in ipairs(ZONES) do if (z.Order or 0) == order then tpTarget = z.Id end end end end, }) ProgTab:CreateButton({ Name = "Teleport now", Callback = function() if tpTarget then invoke("WarpService", "WarpToZone", tpTarget) end end }) ProgTab:CreateSection("Rebirth") local RebirthLabel = ProgTab:CreateLabel("Rebirth: —") local function refreshRebirth() local d = prof(); if not d then return end local ok, shards = invoke("RebirthService", "GetShardCount") pcall(function() RebirthLabel:Set(("Rebirths: %d | shards: %s%s"):format( d.Rebirths or 0, ok and abbrev(shards) or "—", canRebirth() and " ✓ ready" or "")) end) end refreshRebirth(); onProfile(refreshRebirth) ProgTab:CreateToggle({ Name = "Auto-rebirth (when able)", CurrentValue = false, Flag = "ABRNG_AutoRebirth", Callback = function(v) AutoRebirth.enabled = v end, }) ProgTab:CreateSlider({ Name = "Rebirth check interval (s)", Range = { 10, 300 }, Increment = 5, Suffix = "s", CurrentValue = AutoRebirth.cooldown, Flag = "ABRNG_RebirthCooldown", Callback = function(v) AutoRebirth.cooldown = v end, }) ProgTab:CreateButton({ Name = "Rebirth now", Callback = function() if tryRebirth() then Rayfield:Notify({ Title = "Rebirth", Content = "Done" }) else Rayfield:Notify({ Title = "Rebirth", Content = "Not enough shards" }) end end }) ProgTab:CreateSection("Stat upgrades") local StatLabel = ProgTab:CreateLabel("Stats: —") local function refreshStats() local d = prof(); if not d then return end local cands = statCandidates() local affordable = 0 local coins = d.Coins or 0 for _, c in ipairs(cands) do if coins >= c.cost then affordable = affordable + 1 end end pcall(function() StatLabel:Set(("Upgradable stats: %d (affordable now: %d)"):format(#cands, affordable)) end) end refreshStats(); onProfile(refreshStats) ProgTab:CreateToggle({ Name = "Auto-upgrade (cheapest affordable stat)", CurrentValue = false, Flag = "ABRNG_AutoUpgrade", Callback = function(v) AutoUpgrade.enabled = v; if v then pcall(buyCheapestStat) end end, }) ProgTab:CreateSlider({ Name = "Upgrade interval (s)", Range = { 0.5, 10 }, Increment = 0.5, Suffix = "s", CurrentValue = AutoUpgrade.interval, Flag = "ABRNG_UpgradeInterval", Callback = function(v) AutoUpgrade.interval = v end, }) ProgTab:CreateButton({ Name = "Buy cheapest stat now", Callback = function() local id = buyCheapestStat() if id then Rayfield:Notify({ Title = "Stat", Content = "Upgraded " .. id }) end end }) local OthersTab = Window:CreateTab("Others") OthersTab:CreateSection("Codes") local CodeLabel = OthersTab:CreateLabel("Codes: tap to redeem all") OthersTab:CreateButton({ Name = "Redeem all codes", Callback = function() local n, total = redeemAllCodes() pcall(function() CodeLabel:Set(("Redeemed %d of %d attempted"):format(n, total)) end) Rayfield:Notify({ Title = "Codes", Content = ("Redeemed %d code(s)"):format(n) }) end, }) OthersTab:CreateSection("Claims") OthersTab:CreateToggle({ Name = "Auto-claim (offline / daily / playtime / group)", CurrentValue = false, Flag = "ABRNG_AutoClaims", Callback = function(v) AutoClaims.enabled = v; if v then pcall(claimAll) end end, }) OthersTab:CreateButton({ Name = "Claim all now", Callback = function() pcall(claimAll) end }) OthersTab:CreateButton({ Name = "Claim offline earnings", Callback = function() invoke("OfflineEarningsService", "Claim") end }) local PerfTab = Window:CreateTab("Performance") local Lighting = game:GetService("Lighting") local LowFps = { enabled = false } local savedEnabled = {} local savedFidelity = {} local savedLight = {} local lowAddedConn = nil local EFFECT_CLASS = { ParticleEmitter = true, Trail = true, Beam = true, Smoke = true, Fire = true, Sparkles = true, Explosion = true, } local function applyLow(inst) local cls = inst.ClassName if EFFECT_CLASS[cls] then if savedEnabled[inst] == nil then savedEnabled[inst] = inst.Enabled end pcall(function() inst.Enabled = false end) elseif inst:IsA("MeshPart") then if savedFidelity[inst] == nil then savedFidelity[inst] = inst.RenderFidelity end pcall(function() inst.RenderFidelity = Enum.RenderFidelity.Performance end) end end local function enableLowFps() savedLight = { post = {} } savedLight.GlobalShadows = Lighting.GlobalShadows savedLight.EnvDiffuse = Lighting.EnvironmentDiffuseScale savedLight.EnvSpecular = Lighting.EnvironmentSpecularScale pcall(function() Lighting.GlobalShadows = false Lighting.EnvironmentDiffuseScale = 0 Lighting.EnvironmentSpecularScale = 0 end) for _, e in ipairs(Lighting:GetChildren()) do if e:IsA("PostEffect") then savedLight.post[e] = e.Enabled pcall(function() e.Enabled = false end) end end pcall(function() settings().Rendering.QualityLevel = Enum.QualityLevel.Level01 end) pcall(function() sethiddenproperty(settings().Rendering, "QualityLevel", 1) end) pcall(function() local t = workspace:FindFirstChildOfClass("Terrain") if t then savedLight.WaterWaveSize = t.WaterWaveSize; savedLight.WaterReflectance = t.WaterReflectance t.WaterWaveSize = 0; t.WaterReflectance = 0; t.WaterWaveSpeed = 0 end end) for _, inst in ipairs(workspace:GetDescendants()) do applyLow(inst) end lowAddedConn = workspace.DescendantAdded:Connect(function(inst) if LowFps.enabled then applyLow(inst) end end) end local function disableLowFps() if lowAddedConn then lowAddedConn:Disconnect(); lowAddedConn = nil end for inst, orig in pairs(savedEnabled) do if inst and inst.Parent then pcall(function() inst.Enabled = orig end) end end for inst, orig in pairs(savedFidelity) do if inst and inst.Parent then pcall(function() inst.RenderFidelity = orig end) end end savedEnabled, savedFidelity = {}, {} pcall(function() if savedLight.GlobalShadows ~= nil then Lighting.GlobalShadows = savedLight.GlobalShadows end if savedLight.EnvDiffuse ~= nil then Lighting.EnvironmentDiffuseScale = savedLight.EnvDiffuse end if savedLight.EnvSpecular ~= nil then Lighting.EnvironmentSpecularScale = savedLight.EnvSpecular end end) for e, en in pairs(savedLight.post or {}) do if e and e.Parent then pcall(function() e.Enabled = en end) end end pcall(function() local t = workspace:FindFirstChildOfClass("Terrain") if t and savedLight.WaterWaveSize ~= nil then t.WaterWaveSize = savedLight.WaterWaveSize; t.WaterReflectance = savedLight.WaterReflectance end end) pcall(function() settings().Rendering.QualityLevel = Enum.QualityLevel.Automatic end) savedLight = {} end PerfTab:CreateSection("Graphics") local PerfLabel = PerfTab:CreateLabel("Low FPS mode: off") PerfTab:CreateToggle({ Name = "Low FPS mode (kill particles / shadows / low poly)", CurrentValue = false, Flag = "ABRNG_LowFps", Callback = function(v) LowFps.enabled = v pcall(function() PerfLabel:Set("Low FPS mode: " .. (v and "applying…" or "restoring…")) end) task.spawn(function() if v then enableLowFps() else disableLowFps() end pcall(function() PerfLabel:Set("Low FPS mode: " .. (v and "ON" or "off")) end) end) end, }) Rayfield:Notify({ Title = "Anime Battle RNG", Content = "Fabron's Hub loaded", Duration = 4 })