This month, "Battlefield Earth," the blockbuster bomb based on the novel by Scientology founder L. Ron Hubbard, won the Razzie for "Worst Movie of the Decade." J.D. Shapiro, the film's first screenwriter, accepted the award in person. Shapiro, who also wrote the screenplay for "Robin Hood: Men in Tights," "We Married Margo," and is developing a King Arthur spoof called "524 AD", explains what it's like to be attached to one of Hollywood's most notorious flops.

Let me start by apologizing to anyone who went to see “Battlefield Earth.”

It wasn’t as I intended — promise. No one sets out to make a train wreck. Actually, comparing it to a train wreck isn’t really fair to train wrecks, because people actually want to watch those.

It started, as so many of my choices do, with my Willy Wonker.

It was 1994, and I had read an article in Premiere magazine saying that the Celebrity Center, the Scientology epicenter in Los Angeles, was a great place to meet women.

Willy convinced me to go check it out. Touring the building, I didn’t find any eligible women at first, but I did meet Karen Hollander, president of the center, who said she was a fan of “Robin Hood: Men in Tights.”

We ended up talking for over two hours. She told me why Scientology is so great. I told her that, when it comes to organized religion, anything a person does to reward, threaten and try to control people by using an unknown like the afterlife is dangerous.

J.D. Shapiro accepts his Razzie award for worst film of the decade, “Battlefield Earth.”Photo: AP

Nonetheless, Karen called me a few days later asking if I’d be interested in turning any of L. Ron Hubbard’s books into movies. Eventually, I had dinner with John Travolta, his wife Kelly Preston, Karen — about 10 Scientologists in all. John asked me, “So, J.D., what brought you to Scientology?”

I told him. John smiled and replied, “We have tech that can help you handle that.” I don’t know if he meant they had technology that would help me get laid or technology that would stop Willy from doing the majority of my thinking.

I researched Scientology before signing on to the movie, to make sure I wasn’t making anything that would indoctrinate people. I took a few courses, including the Purification Rundown, or Purif.

You go to CC every day, take vitamins and go in and out of a sauna so toxins are released from your body. You’re supposed to reach an “End Point.” I never did, but I was bored so I told them I had a vision of L. Ron. They said, “What did he say?” “Pull my finger,” was my response. They said I was done.

During my Scientology research, I met an employee who I instantly had a crush on. She was kind of a priestess, and had dedicated her life to working for the church by becoming a Sea Org member. She said that she signed a billion-year contract.

I said, “What! Really?” She said she got paid a small stipend of $50 a week, to which I said, “Can you get an advance on the billion years, like say, a mere $500,000?” And then she said as a Sea Org member, you can’t have sex unless you’re married. I asked her if she was married. She said yes. So I said, “Great! That means we can have sex!”

As far as I know, I am the only non-Scientologist to ever be on their cruise ship, the Freewind. I was a bit of an oddity, walking around in a robe, sandals, smoking Cuban cigars and drinking fine scotch (Scientologists are not allowed to drink while taking courses). I also got one of the best massages ever. My friends asked if I got a “happy ending.” I said, “Yes, I got off the ship.”

But if you’re reading this to get the dirt on Scientology, sorry, no one ever tried to force me to do anything.

Even after all the “trouble” I’d gotten into, people at the church liked me, so I read “Battlefield Earth” and agreed to come up with a pitch to take to studios.

I met with Mike Marcus, the president of MGM, and pitched him my take. He loved it, and the next day negotiations went under way. A few days after I finished the script, a very excited Travolta called, told me he “loved it,” and wanted to have dinner.

At dinner, John said again how much he loved the script and called it “The ‘Schindler’s List’ of sci-fi.”

My script was very, VERY different than what ended up on the screen. My screenplay was darker, grittier and had a very compelling story with rich characters. What my screenplay didn’t have was slow motion at every turn, Dutch tilts, campy dialogue, aliens in KISS boots, and everyone wearing Bob Marley wigs.

Shortly after that, John officially attached himself to the project. Then several A-list directors expressed interest in making the movie, MGM had a budget of $100 million, and life was grrrrreat! I got studio notes that were typical studio notes. Nothing too crazy.

I incorporated the notes I felt worked, blew off the bad ones and did a polish. I sent it to the studio, thinking the next I’d hear is what director is attached.

Then I got another batch of notes. I thought it was a joke. They changed the entire tone. I knew these notes would kill the movie. The notes wanted me to lose key scenes, add ridiculous scenes, take out some of the key characters. I asked Mike where they came from. He said, “From us.” But when I pressed him, he said, “From John’s camp, but we agree with them.”

I refused to incorporate the notes into the script and was fired.

I HAVE no idea why they wanted to go in this new direction, but here’s what I heard from someone in John’s camp: Out of all the books L. Ron wrote, this was the one the church founder wanted most to become a movie. He wrote extensive notes on how the movie should be made.

My script was very, VERY different than what ended up on the screen. My screenplay was darker, grittier and had a very compelling story with rich characters.

Many people called it a Scientology movie. It wasn’t when I wrote it, and I don’t feel it was in the final product.

Yes, writers put their beliefs into a story. Sometimes it’s subtle (I guess L. Ron had something against the color purple, I have no idea why), sometimes not so subtle (L. Ron hated psychiatry and psychologists, thus the reason, and I’m just guessing here, that the bad aliens were called “Psychlos”).

The only time I saw the movie was at the premiere, which was one too many times.

Once it was decided that I would share a writing credit, I wanted to use my pseudonym, Sir Nick Knack. I was told I couldn’t do that, because if a writer gets paid over a certain amount of money, they can’t. I could have taken my name completely off the movie, but my agent and attorney talked me out of it. There was a lot of money at stake.

Now, looking back at the movie with fresh eyes, I can’t help but be strangely proud of it. Because out of all the sucky movies, mine is the suckiest.

In the end, did Scientology get me laid? What do you think? No way do you get any action by boldly going up to a woman and proclaiming, “I wrote Battlefield Earth!”

If anything, I’m trying to figure out a way to bottle it and use it as birth control. I’ll make a mint!