Loc-Nar

The Loc–Nar is the central villain of the 1981 adult animated film Heavy Metal, which is based on a pulp comic book franchise of the same name. Its form is that of a basketball–sized glowing green sphere, and it describes itself as "the sum of all evils" and can melt people upon contact. At the beginning of the film, it is found by an astronaut named Grimaldi, but then kills him in his home when he tries to handle it and then attacks his daughter, forcibly telling her horrific stories that all involve it in some way, which form the bulk of the movie. In the last story, the heroine sacrifices herself to defeat the Loc-Nar, and thinking of/remembering this somehow destroys the Loc-Nar in reality/the present, and the girl transforms into said heroine from the story.