Paul Mooney -- the longtime comedian, writer and actor known best for his work with Richard Pryor -- has died from a heart attack ... TMZ has learned. According to his family ... Mooney died Wednesday morning at his home in Oakland. We're told the paramedics tried unsuccessfully to revive him after he suffered a heart attack. Paul, who's been out of the public eye for a few years, had also reportedly been suffering from dementia for some time and was staying with a family member. Mooney was also the head writer on "The Richard Pryor Show" and wrote a few episodes of "Pryor's Place."