You're probably thinking of the book "Bartholomew Cubbins and the Purple Hat" by Dr. Seuss. While the book is full of wacky and fantastical elements, there's no mention of any "gooey green stuff."
Perhaps you're thinking of another book or a different character from the same series? If you can give me more details, I might be able to help!