probability for a Void

Hello is there a system for an probability or chance to call an specific void when you are playing?

so like there is a 10% chance for the first function and a 60% chance for the second function.

{

void GetMoney()
{

}

void WinAprice()
{

}

}

There is a system to get a random number that you may use wherever you want.

public void TestYourLuck()
{
    float f = Random.Range(0f, 1f); //this sets a new variable to a random number between 0 and 1
    if (f <= 0.1f) GetMoney(); //10% chance to Get Money
    else if (f >= 0.4f) WinAPrize(); //60% chance to Win a Prize
}

In this case GetMoney() and WinAPrize() are mutually exclusive.