The text is a proverbial expression implying that someone who claims responsibility for positive events must also accept blame for negative ones. It does not play on different meanings of a word or similar-sounding words.
He who takes credit for rain will be blamed for drought .