Miley Cyrus
Singer Miley Cyrus attends the Clive Davis Pre-Grammy Gala and Salute to Industry Icons, honoring Universal Music Group Chairman and CEO Lucian Grainge, in Beverly Hills, Calif., Jan. 25, 2014. Reuters/Phil McCarten

Miley Cyrus offered some advise to her friend Justin Bieber -- who has recently got into trouble with a DUI and drug scandals -- when she appeared on NBC’s “The Tonight Show With Jay Leno” Thursday.

The 21-year-old “Adore You” singer said on the show: “I would just say, you know what, you've got a lot of money. Pay people to make sure you don't get in trouble.” She added: “Buy a house, and add a club to it.”

When she was asked if she regretted anything from her teen years, Cyrus, who was on the show to promote her upcoming “Bangerz” tour, said: “It's funny because today, I was looking at ... my fans put all these people's mug shots up, and they were like, 'I don't see a Miley mug shot yet!' I get the most flak of anybody.”

Cyrus added, “I'm not doing anything illegal! I'm doing a lot of s--t but I'm not doing anything illegal! So that's all right. Everything I do is legal in California."

Cyrus had defended Bieber back in August 2013, when she told Rolling Stone: “I'm not much older than him, so I never want it to feel like I'm mentoring him. But I do mentor him in a way. Because I've been doing this s--t for a long time, and I already transitioned, and I don't think he's quite done it yet."

Bieber, 19, was arrested last week in Miami Beach on charges of driving under the influence, driving with an expired license and resisting arrest. He was also charged, on Wednesday, with assaulting a limousine driver in Toronto.

Check out Cyrus’s advice for Bieber here: