Zac Efron Oops! I Just Bought A Raging Party Palace

10/10/2013 12:40 AM PDT

For a guy coming off of rehab, Zac Efron couldn't have picked a worse home to buy ... because his new crib is well-known as one of the biggest Hollywood party pads in L.A. ...  and we have the pics to prove it.

A source tells TMZ ... just last year, Sean Kingston was living large bachelor style in the house ... and says it was a pool party house where "some of the most ungodly events" went down.

We're told ... Sean rented the place for 45k a month ... and threw some wild ass parties for his friends, including Justin Bieber, Chris Brown, Rihanna and Soulja Boy

According to our source ... Sean's ragers were so off the hook ... guests had to sign a non-disclosure agreement -- and then be photographed holding the piece of paper -- before they could ever get past the door. So you know there was some crazy s**t.

Zac just dropped $3.9 mil on this place. Just hope it's not haunted ... by ghosts of parties past.