In the game “infinite rarities” there is a system to calculate the weights of each rarity and a way to calculate the minimum rarity you should get based on your luck. The formula for calculating each weight (according to a developer of that game) is 1/5*5^(raritynumber). Now im stuck with calculating the minimum rarity. I did some testing and in Infinite Rarities, if your luck is around 1370x, your minimum rarity would be 7 and if your luck is around 44k the minimum is 9 (i think).
this is the script I use now but getMinRarity doesn’t quite get me the result i want.
local function getMinRarity(luckfactor)
return bNum.bnumtofloat(bNum.ceil(bNum.log10(bNum.div(bNum.floattobnum(5), bNum.div(bNum.log10(bNum.floattobnum(10)), bNum.strtobnum(luckfactor))))))
end
local function calculateProbability(rarity)
return bNum.mul(bNum.floattobnum(0.2), bNum.pow(bNum.floattobnum(5), bNum.floattobnum(rarity)))
end
If you have any further questions feel free to ask them