The minimum is 0, and that's considered the success value. All the other ones are failure. The maximum is 255 also known as -1.
These rules apply for both scripts and other executables, as well as shell functions.
Bigger values result to modulo 255256.