For his role in the movie How the Grinch Stole Christmas, which came out in 2000, Jim Carrey’s tortuous costume and makeup had him on the verge of walking away from a $20 million paycheck.

In an interview with Vulture, the actor said the first day of makeup took eight hours. He nearly quit and suffered from panic attacks after having to wear painful green contacts, makeup that made him breathe through his mouth the whole time, and a full body suit made of itchy yak hair. But before he walked away, producer Brian Grazer hired the founder of SEAL Team Six to help Carrey suck it up.

“Richard Marcinko was a gentleman that trained CIA officers and special-ops people how to endure torture. He gave me a litany of things that I could do when I began to spiral. Like punch myself in the leg as hard as I can. Have a friend that I trust and punch him in the arm. Eat everything in sight. Changing patterns in the room,” Carrey told Vulture in the interview, which was published on Friday.

“If there’s a TV on when you start to spiral, turn it off and turn the radio on. Smoke cigarettes as much as possible. There are pictures of me as the Grinch sitting in a director’s chair with a long cigarette holder. I had to have the holder, because the yak hair would catch on fire if it got too close,” he added.