Tyga and Tyler Perry

Director and playwright Tyler Perry continues his tradition of casting gay and bisexual men in his film projects.

Perry, 46, signed washed up rapper Tyga to star in his new movie, Boo! A Madea Halloween.

Both men have something in common. Perry has been plagued by persistent gay rumors, and Tyga’s cover was blown when steamy text messages he sent to a transsexual Instagram model were leaked by a gossip blogger last year.

Perry announced his new movie during a guest appearance on The Real daytime talk show on Tuesday.

The film is set for release in theaters on October 21.

Variety — Tyler Perry will write, produce, direct and star. Ozzie Areu and Will Areu will also be producers on the film.

The film originated from Perry and Chris Rock including a fictitious Madea Halloween movie in Rock’s 2014 film “Top Five.” Lionsgate then approached Perry and suggested that they make the movie.

“Boo! A Madea Halloween” will see Madea spending Halloween fending off killers, paranormal poltergeists, ghosts, ghouls and zombies while keeping a watchful eye on a group of misbehaving teens.

The film will also star Bella Thorne, Cassi Davis, Patrice Lovely, Andre Hall, Yousef Erakat, Lexy Panterra, Diamond White, Liza Koshy, Brock O’Hurn, Jimmy Tatro, JC Caylen, Kian Lawley and Mike Tornabene.