switch(random(100)) { case 0..50: { // 50% chance } case 51..80: { // 30% chance } case 81..100: { // 20% chance } }