JP and his men first appear when Chief Goppernopper and his thugs are out in the wilderness and witness JP and his workers cutting down the trees. The two men realise they are ancestors and travel to JP's time, 2222 AD. JP and his men have a time machine which they use to steal the natural resources from the caveman days because by the year 2222, the majority of the earth's natural resources will have been used up. The two men travel back to Caveland and enslave the citizens. The men take Ook and Gluk back to 2222 to be killed but their dinosaur accomplice Lily follows them and bites Chief Goppernopper and his men on the feet and frees the boys. The boys take refuge in Mr. Wong's kung fu school, where they learn martial arts and befriend his daughter, Lan.
The boys grow up and they and Lily battle Chief Goppernopper's men and destroy JP's robots. The three protagonists return to the past and see that the wilderness has been replaced by factories and the people are still enslaved. The boys and Lily fight the men and free the the citizens of Caveland and Ook's sister Gak. Chief Goppernopper returns and sends an army of robotic reptiles who he has christened the Mechasaurs that pursue our heroes back to the future. They take refuge in a warehouse and camoflague themselves by wearing bags on their heads and eventually graffiti their faces onto buildings which they eventually destroy, including Goppernopper Tower. Lily then sprays the boys and her onto a barrel of explosives, and the Mechasaurs destroy it and they are incinerated while Lily and the boys escape.
Ook and Gluk vow to rebuild the world by first sending Chief Goppernopper and his workers back to the future. The boys then go off to find Mog Mog, Lily's mother, but before they get a chance, JP sends them a note that he and Chief Goppernopper have taken Mr Wong and Lan hostage and if they don't give up, they will both die. The boys return to the future and as it turns out, JP and Chief Goppernopper looked for all the kung fu schools in town and because there was only one, the Wongs were easy to find. JP tricks the boys into freeing the Wongs if they chain their hands, but he then decides to kill them all.
Ook and Gluk remember their training and ask the two Goppernoppers who is the greatest man. They both claim they are the greatest man, resulting them in arguing and fighting over who is the greatest. When Chief Goppernopper triumphs, JP stupidly kills him with his lazer pistol, but this action causes him to slowly disappear. It turns out JP killed his ancient great grandfather before he had children, so his descendants had never been born and as a result, JP and his company cease to exist and the world is rebuilt into one without Goppernoppers. Ook, Gluk and Lily return to Caveland and take Lan with them before the time portal completely disappears.