You're probably identifying your mod commands as playerRights above 0 or something to be only able to use it, 5 is above 0 so that's why it's able to.. You have to add something like this
if (player.playerRights >= 0 && !player.playerRights == 5) {
So it says every right above 0, but not 5 can use the command.