Flowey and Frisk was at Sans lab behind his house. Sans is fixing a device that will bring Gaster back from the Void. After they brought Gaster back, Gaster teleported them to the room where all of the souls are kept. Sans gave the 6 souls to Flowey to make him turn to Omega Flowey so that he is more useful in defeating Chara.
After a short time, Gaster joined the battle so he can assist Flowey and Sans in battle. Gaster protected Frisk using a shield so Chara can't hurt them. During the battle, Chara sent a string at Omega Flowey that wrapped around his arm, Chara then pulled the string which caused one of Omega Flowey's arms to get cut off. Gaster then lowered the shield that was protecting Frisk to use all of his hands to attack Chara , Chara attacked back with an attack that can change direction fooling Gaster. They change direction to aim for Frisk, Sans teleported in front of Frisk (Which might be foreshadowing Dust.) but Gaster went to block it first lowering his HP to almost nothing.
Sans used his Special attack and "killed" Chara but Chara's soul refused to die. They attacked back, knocking out Sans. Flowey used his final attack, the Hope Cannon, to counter Chara's Hate attack, doing so, he lost his soul power and went back to his normal form.
Chara then was about to attack Flowey, but Frisk recovered their DETERMINATION and summoned a shield that protected Flowey from Chara's attack. Frisk then called for help to return the power to all of the 6 souls and to return them to to Flowey turning him to Asriel Dreemurr.