Lilac Ball

Lilac Ball (or The Purple Ball; Лиловый шар) is a 1988 Soviet science-fiction children's film starring Natalya Guseva as Alisa Selezneva, a character she had previously played in the TV miniseries Guest from the Future.
Alisa Seleznyova, her father professor Seleznyov, and the ship's captain Zeleniy are travelling in space on the Pegasus. Zeleniy is unhappy that Alisa has brought a frog on board as he insists on keeping the ship clean, however Alisa insists that the frog is in fact a princess under a curse. They meet their old friend alien archaeologist Gromozeka, who's just discovered an empty space ship called Black Wanderer all inhabitants of which died. Upon investigation of the Black Wanderer they find video evidence that the Black Wanderer was inhabited by Space Pirates, who attacked entire planets at a time to loot their resources. Since they lacked the manpower to physically take over an entire planet they would instead send ahead a scouting ship which would plant a lilac ball on the planet. Lilac balls were storage units for the virus of hate, which would cause all who were infected to attack each other.
When the Black Wanderer would get near the planet, the lilac ball would disperse the virus, causing the inhabitants of the planet to wipe themselves out, allowing the space pirates to loot the planet unopposed. At some point, a slave that labored in the Black Wanderer sacrificed himself and broke a lilac ball, which caused the space pirates to wipe themselves out. The deserted ship was left floating on autopilot towards the pirates' next target: Earth. Gromozeka discovers that they had left a lilac ball on Earth 26000 years ago, and that the Black Wanderer will be close enough to Earth to make the lilac ball start dispersing within 10 days. The crew races back towards Earth on the Pegasus at hyperspeed. They enter Earth's orbit and attempt to notify flight control that they've discovered an alien virus, but due to a misunderstanding flight control sends a quarantine ship after them which traps them, leaving them helpless.
The only chance to save the Earth is to travel 26000 years back in time - to the epoch when witches, dragons and magicians lived along with usual people. Alisa volunteers to go back as she is familiar with some of the inhabitants of that era, and Gromozeka volunteers to go with her to protect her. They escape the quarantine and use a time machine to travel to the day the lilac ball was planted. Once in the past, Alisa and Gromozeka encounter several magical creatures. Alisa asks a dragon she knows to notify her friend, the magician Uuu-Uuu-Uuh. They encounter Koschei, Ludoed, Konoed, and Baba Yaga who are the monsters of the epoch of legends. They stop them from feasting on a human child named Gerasik who has seen the Black Wanderer's landing craft (which looks like a giant egg). Gromozeka stays to hold back the monsters from pursuing Alisa and Gerasik. Gerasik leads Alisa to the approximate location where he saw the craft, but it turns out to be an actual giant egg of a giant bird, which hatches in front of them. Barely escaping the bird they stumble upon the actual landing craft. The giant bird mistakes it for a giant egg and gets too close, where a pirate executes it. Uuu-Uuu-Uuh flies by on a magic carpet looking for Alisa, but is attacked by the pirates and escapes using his invisibility cap.
Spooked off, the pirates prepare to move to a different location to plant the lilac ball. Alisa explains the situation to Uuu-Uuu-Uuh, and borrows his invisibility cap. She stows away on the landing craft of the pirates so that she can see where they plant the lilac ball. The pirates fly a short distance away where they plant the lilac ball under a boulder and leave. Uuu-Uuu-Uuh flies over and uses telekinesis to lift the boulder while Gerasik retrieves the lilac ball. With their mission a success, Alisa goes to find Gromozeka reeducating the monsters to become vegetarians. They travel back to the future with the lilac ball to dispose of it properly. While discussing on how to dispose it, Uuu-Uuu-Uuh also travels to the future using magic and throws the lilac ball into the sun, disintegrating the virus. He also tells Alisa that the only thing that can lift the curse on the frog is true love, at which point the princess walks out, being set free from the curse by Zeleniy's pure heart.