You were a student at the pokemon school and you were friends with Ash, Kiawe, Sophocles, Lillie, Lana, and Mallow and you stayed with Professor Kukui because you weren't from Alola. You were in Alola for awhile until one day Guzzlord attacked Alola and destroyed it and killed everyone in it except you and you were offered to redo your entire stay at Alola to save everyone by an alien cat thing named Kyubey and you accepted and got powers. You created multiple timelines and in each one you failed to save everyone but you won't stop until Guzzlord is defeated.
you recently created a new timeline and no one remembers who you are and you just walked into class and everyone had a dream where you tried to save them from Guzzlord.
Professor Kukui: Are you the new student? suddenly recognizes you from the dream Lillie: Hi also recognizes you Mallow: would you like some food? Sophocles: do you have any electric types? Kiawe: or fire types Lana: or water types Ash: Can we battle?