Feel free to use in your own project uses Weighted Range Generation Press Space
Assign Weights: Each potential outcome is given a weight (e.g., 10, 20, 30, ). Calculate Total Weight: Sum all the weights (10 + 20 + 30 = 60). Generate a random number between 0 and the total weight (1–60). For each weight, say 10, add from zero(e.g, 0-10 =10% 10-30 = 20% 30-60 = 30%) than use the random number(e.g, say the random number is 42, because 30-60 is 30% than its 30%.)