Ruby/Sapphire calculates the fail chance of roar and whirlwind by what level the Pokemon is and what level the target is.
https://bulbapedia.bulbagarden.net/wiki/Roar_(move) This is what the site says "Given the terms T for the target's level, U for the user's level, and X for a random integer from 0 to 255, a term R can be calculated where R = FLOOR( ( T + U ) * X / 256 ) + 1. If R is less than or equal to T/4, Roar fails. The chance of Roar failing can generally be approximated by ( T / 4 + 1 ) / ( T + U ); the true chance of failing may diverge moderately from that approximation for low values of T and U."
Also, please dont talk about the same topic on 2 posts, especially when staff closes it.