If you don’t have anything nice to say, don’t say anything.
It means if you don’t have anything positive to say, just don’t say anything and keep it to yourself.
Person 1: You’re ugly and you suck
Person 2: If you don’t have anything nice to say, don’t say anything.
Person 2: If you don’t have anything nice to say, don’t say anything.