The Messenger of Allah ﷺ said, "Among the sayings of the earlier prophets that people still recall is this, 'If you have no shame, then do as you wish.'"
حدثنا محمد بن جعفر قال حدثنا شعبة عن منصور قال سمعت ربعي بن حراش يحدث
قال رسول الله ﷺ إن مما أدرك الناس من كلام النبوة الأولى إذا لم تستحي فاصنع ما شئت
Its isnad is sahih, and it is found in Bukhari 10/523, no. 6120, Fath al-Bari, in the chapter on manners, "If you feel no shame, then do as you wish," and Abu Dawud 4/252, no. 4797, and Ibn Majah 2/1400, no. 4183.