Valmiki Ramayana Aranya Kanda Sarga 41 Shloka 9
Original Shlokaविपर्यये तु तत्सर्वं व्यर्थं भवति रावण। व्यसनं स्वामिवैगुण्यात्प्राप्नुवन्तीतरे जनाः।।3.41.9।।
1 source checked for this shloka
रावण Ravana, विपर्यये if it be otherwise, तत् then, सर्वम् everything (the four attainments), व्यर्थं भवति will become useless, स्वामि वैगुण्यात् by the vices of the king, इतरे जनाः others, व्यसनम् calamity, प्राप्नुवन्ति suffer.
Otherwise evrything will become useless, O Ravana Others will suffer calamities on account of their master's vices.