"Money doesn't make you happy.

"But it sure buys you a better class of misery."

That joke, and thousands more, came from the mouths of top-drawer comics. But they were hatched in the overactive, irrepressibly silly, charmingly warped, and unfailingly funny mind of Sol Weinstein.

A once-destitute Jersey boy who honed his gift for gags while banging out obituaries at the Trentonian, he rode a wave of laughs all the way to Hollywood.

From the late 1950s into the '80s, he spun shtick for such legendary comedians as Joe E. Lewis and Bob Hope; wrote for The Love Boat, The Jeffersons, Three's Company, and Maude; composed a signature song for Bobby Darin; and fathered James Bonds' Yiddish alter ego, Israel Bond, filling four popular books with the exploits of Agent Oy-Oy-7.

Mr. Weinstein died at 84 of pancreatic cancer on Sunday, Nov. 25, in the New Zealand town of Plimmerton, where he spent his last years with his son.

But he left 'em laughing.

One eulogist, noting Mr. Weinstein's notorious flirtations, polled the 70 mourners: How many had gotten a marriage proposal from him? Reportedly, 20 hands shot up.

He grew up on Union Street in Trenton, where his Russian-immigrant parents eked out a living by junking. Unable to afford birthday cakes, his mother bought pumpernickel loaves and dispensed small bits, with a schmear, to his friends - forever branding him with the nickname "Pumpy."

After taking the class-clown route through Trenton High School, he enrolled at New York University as an English major but didn't finish. The Trentonian hired him to write obits, later christening him "Duffy," the Irish sportswriter.

On the side, Mr. Weinstein cranked out jokes and sent them, unsolicited, to comics. Eventually, checks came in, from the likes of Lewis and Jerry Lester, star of TV's first late-night hit variety show.

Mr. Weinstein then had the wherewithal to move his wife, Eleanor, and two children to Levittown - and to cast his lot with comedy.

"His brain was fluid and fast," said his daughter, Judee. "He had a million jokes in him."

In the '60s, Mr. Weinstein's humor became almost nationally inescapable. Along with a prodigious output of comedy act bits, he fueled David Frost's That Was the Week That Was. And he challenged Ian Fleming in Playboy with satiric tales of Agent Oy-Oy-7. Israel Bond became his protagonist in four books: Loxfinger, Matzohball, On the Secret Service of His Majesty the Queen, and You Only Live Until You Die.

He still found time, from 10 p.m. to 2 a.m., to frolick on WCAU 1210 talk radio, merrily summoning aberrants across the Philadelphia region to call in.

In the early '70s, he resettled his family on the West Coast for the TV sitcom gold rush. He wrote for myriad shows that also included Chico and the Man, Small Wonder, and Barney Miller, and he helped churn out the caustic wit that kept the Dean Martin Celebrity Roasts hot for 10 years.

"But comedy changes with time," his daughter said. "Dad wound up retiring."

Mr. Weinstein was long a jazzhead. Though he couldn't read or write music or play anything, he composed a song for Lester, "The Curtain Falls." The comic murdered it, but a pop star named Bobby Darin heard it and immortalized it as his act closer.

In the 2004 Darin biopic Beyond the Sea, Kevin Spacey reprised the song.

Widowed, Mr. Weinstein moved in 2002 to New Zealand, where he was the quirky American in the Trenton sweatshirts. He kept writing, mostly essays, and composing songs, which were played in the clubs he frequented.

"I'm a be-bopper," he told an interviewer. "Old be-boppers never die, they just shooby-doo away."

On second thought, he added, "I don't know what that means."

In addition to his daughter, Mr. Weinstein is survived by a son, David, and a granddaughter, Eleanor.