At 3 years old, he's old enough to understand actions and consequences.
Just tell him we don't talk like that, and he'll be losing dessert and/or toys everytime he says that.
That way, it makes it his choice to behave like that. Trust me, after a few days of no dessert...or being bored without his favorite toys...he'll stop
