If suffering is displeasing to you, do not commit evil deeds, whether openly or in secret.

Kumāraka sutta - Boys

Thus have I heard - At one time, the Blessed One was dwelling in Sāvatthi, in Jeta's Grove, Anāthapiṇḍika's park. Now at that time, several boys were catching fish between Sāvatthi and Jeta's Grove.

Then the Blessed One, after dressing in the morning and taking his bowl and robe, entered Sāvatthi for alms. The Blessed One saw those several boys between Sāvatthi and Jeta's Grove, catching fish. Seeing them, he approached those boys; and having approached them, he said to the boys: "Are you afraid, boys, of suffering? Is suffering displeasing to you?" "Yes, venerable sir, we are afraid of suffering; suffering is displeasing to us."

Then, understanding the significance of this, the Blessed One at that time expressed this inspired utterance:

"If you fear suffering, if suffering is displeasing to you; Do not commit evil deeds, whether openly or in secret.
If you commit evil deeds, or plan to commit them; There is no escape from suffering for you, even if you try to flee."