$probability = 30; //example user input percentage chance of a win
$multi = 100 / $probability; // this is your multiplier
$multi2 = $multi - 0.02; // this is your house edge
$grossProfit = $betAmt * $multi2;
$netProfit = $grossProfit - $betAmt;
$target = 100 / $multi; // target to roll under (same as probability)
Roll Over:
$probability = 30; //example user input percentage chance of a win
$multi = 100 / $probability; // this is your multiplier
$multi2 = $multi - 0.02; //house edge
$grossProfit = $betAmt * $multi2;
$netProfit = $grossProfit - $betAmt;
$target = 100 - $probability; //target to roll over