He's made it as a TV nice guy. Now, naughty-by-nature comic Martin Lawrence makes a raunchy run for movie stardom.

It’s taping night on the set of the Fox sitcom Martin, and a rowdy audience of 200 — mostly black, mostly under 30 — is watching as star Martin Lawrence tries something new for take two of the scene. His character, Martin Payne, a Detroit deejay-cum-talk-radio host, is preparing his girlfriend, Gina (Tisha Campbell), and her best friend, Pam (Tichina Arnold), for an encounter with his thieving cousin and alcoholic uncle.

”I need you to do what you do,” Martin tells Pam, drawing her near.

”What’s that?” she asks sweetly.

Playing to the stands, Lawrence hesitates for a split second, flashes his signature lopsided grin, and delivers the kind of ad-lib the cast and crew have come to expect.

”Su — a d — -!” he shouts.

The crowd goes wild.

While making the two-season-old Martin a youth-market hit for the Fox network, Lawrence has managed to meet two contradictory needs — reaching for mainstream success while remaining true to his edgier comic soul. As the clean-cut, amiable star of a prime-time show that offers a slice of middle-class black life, Lawrence, 28, is in many ways the hip-hop Bill Cosby. At the same time, his raucous stand-up material makes him the Richard Pryor of his generation. From 1992 to ’93, he hosted HBO’s outrageous, sexually explicit Def Comedy Jam, which Cosby has decried as a ”minstrel show.” Cosby’s shuddering aside, Lawrence’s raunchy act drove his first comedy album, Martin Lawrence Talkin’ S — –, released last fall, to No. 11 on the R&B charts.

The Feb. 18 release of his first concert film, You So Crazy, will bring his bawdy side into even sharper focus. Martin fans expecting more of the sensitive guy comically caught up in the battle of the sexes should beware: Although laced with good-natured gender-bashing, Crazy also reveals Lawrence as an unblinking social satirist and a profane and manic physical comic.

So far, Lawrence has managed to straddle the fence between the bland and the blue. But by trying to keep his feet planted in two different worlds, he may be making himself into the angriest TV star this side of Roseanne Arnold.

Lawrence is already a case study in the dilemmas of network-sitcom success (Martin, which airs Sundays at 8 p.m., is beating time-slot competitors Murder, She Wrote, seaQuest DSV, and Lois and Clark among young viewers, if not in overall ratings, with an audience of 8.6 million people a week), and he is chafing under the inherent restraints. The day after his gleeful outburst on the set, sitting in his orderly Universal office — which is decorated with framed prints by black artists such as Leroy Campbell and a painting of Malcolm X — Lawrence is crooning on the phone to his crying 2-year-old niece, Ne Ne, comforting her with the warmth that makes Martin so appealing. But when he hangs up, keeping his tortoiseshell sunglasses on even though the blinds are drawn, he puts the world, and his network, on notice.

”I have to fight and fight to do the Martin show my way,” Lawrence says. ”You can’t say this, you can’t say that. You’re only allowed two asses a show, one damn.” Lawrence breaks into a nasal whine, mocking the Fox standards department: ”’This is at 8 o’clock — what about the kids?’ I’m like, ‘Hey, people know Martin. They ain’t surprised by this s — -.’

”This is television, and people can limit me,” he continues, swiveling back and forth in a black leather armchair. ”But movies? I can’t wait. I can’t wait. When you saw me improvise at the taping last night, you said, ‘They can’t air that on TV.’ But it was funny as hell, right? Imagine what they can’t cut out of a movie.

”Where do I see myself going? I’ll be the biggest comedian. That’s all I know. People can call it what they want-my confidence, or my arrogance, or whatever. In America you can make as much money as you want as long as you work to get it. It’s all on me.”

After his strong first year, Lawrence was rewarded with more control — he became an executive producer of the show this season — and the battle over content has eased a bit. Says co-executive producer John Bowman, ”I used to spend four hours a week on the phone with [Fox], and I don’t anymore. Unless we say 14 asses in a row, we don’t hear back from the network.”

This doesn’t mean that Lawrence feels any more appreciated by Fox. ”I give 110 percent in every show, and I don’t get that from the network,” he charges. To wit, a December L.A. Times review accused the show of pandering to racist stereotypes in one episode by presenting Martin as sex-crazed; a Fox vice president, David Grant, appeared to side with the Times by admitting in the piece, ”In retrospect, it was over the top.”

Lawrence and his writers see Martin as culturally authentic and believe its realism is crucial to its success. ”You’re not going to see us doing anything that’s coonish,” says writer Kenneth Bufford, 28, a former assistant to Spike Lee who met his current boss when Lawrence had a bit part in 1989’s Do the Right Thing. ”We’re more like George Jefferson, as opposed to someone who kowtows to white people. We’re strong young black men.”

Lawrence’s beef with Fox includes his perception that some of the network’s other shows featuring black stars — and they include Living Single, Roc, and Sinbad, though he won’t name which — have stolen several of Martin‘s distinctive catchphrases and story lines. Bowman has even warned cast and crew not to allow other Fox writers on the set.

”Something ain’t right,” Lawrence says, removing his sunglasses, as if he no longer needs to keep his distance. ”We started using the expressions ‘You go, girl!’ and ‘Don’t go there!’ and no one in television was doing that. No one. Now a lot of Fox shows are using the same stuff and the same premises. Isn’t that diluting the originality of Martin? I would think the network would say, ‘Your show is your show and their show is their show. You guys need to stay away from the same references.’

”I’m at the point where I would consider another network,” he says with a coy smile. ”Damn, I’ve never even met [Fox network chairman] Lucie Salhany. When you have someone who means to the network what I feel I do, I expect to be treated in a certain way.” (Salhany and Fox Entertainment president Sandy Grushow have responded through a publicist that they ”love Martin and think he’s an incredibly important and extraordinarily talented member of the Fox family.”)

”Please don’t misconstrue this,” Lawrence insists, easing up a bit. ”I’m not angry. I’m just aware.”

And well aware that the creative freedom he craves lies not in TV but in movies. While his Martin contract lasts till 1997, Lawrence has a two-year film deal with Fox parent Twentieth Century Fox as well (he also owns two production companies, You So Crazy — which coproduced You So Crazy with HBO — and You Go Boy). When he talks about movies, Lawrence repeatedly slaps his fist into his palm. ”Come movie time,” he says, ”there ain’t no stopping me.”

His most notable film role to date was as Eddie Murphy’s tart-tongued buddy Tyler in 1992’s Boomerang. Crazy will inevitably be judged against Murphy’s Raw (1987), the most profitable concert film ever made. ”I can’t just come out of the box and expect to do the numbers Eddie’s done,” says Lawrence, who, as a struggling performer, drew inspiration from Murphy’s success. ”To do what Eddie’s done is very hard. He’s a rare brother that comes along now and then. But he ain’t the only one. I know I can do it.”

Like the best comedians, Lawrence uses his material to reflect the struggles of his life. In Crazy, he riffs about the breakup of his parents when he was 7, his mother’s strength, the complexities of dealing with the opposite sex, and racism. ”You [white] guys like me now,” he tells the audience in Crazy. ”You didn’t say s — – to me before. ‘Get out the way, nigger.’ Now [you say], ‘You go, Martin!”’