I’m not 100% sure what the issue is, if you’re trying to check val against a just use ==, Random.Range is inclusive, meaning both the lower and upper are included in the random.
I think we need more context about what you want this to do. The script is obviously doing what it is told, but saying that 0 should return false means nothing to someone not involved in your project.
As a small tip, you can simply usereturn (a <= val); if all you wanted to do is return the bool.
As far as excluding 0 from the comparisons, yes using val== 0 as a check and returning from there is probably the best way to go about it, as you killing the function right then and there, allowing the program to continue without executing the rest of the code which is redundant in that context, apparently.
Just normal probability check. Like in-game’s critical hit occurance, item drop probability, etc. Most of them will shows like 15% or 0.02% (in case of super rare item drop)