Rarity System like Sword Factory X & Ascender Simulator

  1. I am looking for advice on how to create a rarity system like Sword Factory X or Ascender Simulator.

This is an image: https://gyazo.com/297714539a21902c28bd49e44a3c9362
As you progress further the rarities of stuff goes down and can get to 1/0 [unobtaniable]

  1. I’ve tried the majority of systems on the developer forums such as: Weighted Chance System

Just can’t figure out how to make it how I want and any advice would be greatly appreciated!

1 Like

here do this

local Items = --table of your items

function ChooseItem(Egg , Player)
  local TotalWeight = 0

  for i,v in pairs(Items) do
     TotalWeight = TotalWeight + v.Chance
  end

  local Chance = math.random(1,TotalWeight)
  local Counter = 0

  for i,v in pairs(Items) do
      Counter = Counter + v.Chance
      if Counter >= Chance then
         return v.Name
      end
   end
end

I’ve already done a solution like this, doesn’t work how I’m imagining it. I appreciate the input!

wdym exactly by this? it should work perfectly fine.

I’ve managed to get it figured out.