10 sentences
When a person encounters something bad, and this matter was caused by themselves, and we feel they don't deserve sympathy, we can say 'serves you right'.
Source: GoEast Mandarin · Serves someone right | Chinese slang in Beyond Class by GoEast Mandarin (1:03)If a person does something wrong or foolish, and the result of the matter makes him very unhappy, while others don't find it surprising at all, then we can say "huógāi" (serves you right).
Source: GoEast Mandarin · How to express “you deserve it” in Chinese? [Beyond Class] (0:48)"Huógāi" means that it should have been this way in the first place, so there's nothing to feel wronged about.
Source: GoEast Mandarin · "Deserve it" | Chinese conversations in GoEast Mandarin's Beyond Class (HSK2 HSK3 HSK4) (0:42)