Hello 
So I’m trying to make a randomized percentage based randomization function
and It’s somewhat accurate however it tends to fluctuate weirdly, I want it to be as correct as possible.
Example:

it should be like this
Legendary = 10
Rare = 20
Uncommon = 30
Common = 40
And I think in order to do that the only solution would be to use a seed.
Since I’ve used Random.new(40)
and this happened:

However I’m very confused on how to make it work with various results.
Now I have tried looking into this various times and even went to different forums on other programming languages on how to make seeds work with lots of results, and I still don’t understand how it can work in away that it makes one number more common then another and the other one more common, etc.
I’d really appreciate if anyone has some tips I could use on this subject and thank you so much for reading thus far! 
