Flowey is an important non-player character in Undertale. He is a talking flower and the first NPC encountered by the player character after their arrival in the Underground Ruins. Although Flowey offers to tutorialize the protagonist on the basics of enemy encounters in Undertale, he actually attempts to murder the player with magic in order to steal their soul, sharing his personal creed of "kill or be killed" before launching a deadly and unavoidable attack. Fortunately, Flowey is defeated by the efforts of Toriel, a motherly monster who guards the Ruins and looks after any humans who fall down from the surface world.
After escaping the Ruins, Flowey reappears to taunt the player and makes specific reference to their choice to either spare or kill Toriel during her mandatory boss fight. If the player kills Toriel, reloads from their previous save point and then spares her, Flowey will ostensibly break the fourth wall and acknowledge the player's ability to "SAVE" in order to cheat fate. He also admits that, although he himself once possessed the same ability, he has been unable to save since the player arrived in the Underground because of their superior "determination".
Flowey will continue to shadow the player throughout the course of the game; he can occasionally be spotted at the edge of the screen by backtracking through certain areas. However, he does not directly address the player again until they reach "New Home" at the far end of the Underground.
As a central character in Undertale, Flowey plays a significant role in each of the game's multiple endings, which are determined by the player's moral choices. Players receive the "Neutral" ending by completing the game normally. However, if the player has also refrained from killing any monsters over the course of the game, they may reload their completed game file in order to fight the true final boss and reach the "True Pacifist" ending. Conversely, players that manage to kill every single monster in Undertale (including randomly-encountered enemies) will achieve the bleak "Genocide" ending.
In addition to three primary ending paths, players may receive extra NPC dialogue based on certain actions taken during their playthrough, such as killing plot-significant characters or meeting other special criteria.
If the player follows the "Neutral" path and defeats Asgore, Flowey suddenly appears to strike the killing blow against the monster king, allowing the player to watch Asgore's soul shatter a moment later. Flowey absorbs the six human souls Asgore had gathered and the Undertale application window closes itself. Relaunching Undertale presents the player with a save file labeled "My World" and Flowey's name in place of the player character's name. After loading this save, Flowey gloats about his newfound power and states that once he possesses the player's soul, he will become a god. This leads directly into a fight with "Photoshop Flowey", a unique encounter featuring a grotesque screen-filling version of Flowey composed of photo-realistic image fragments stitched together.
The game's usual battle interface is completely removed during the fight with Photoshop Flowey, forcing players to survive Flowey's bullet hell onslaught long enough to locate the "FIGHT" and "ACT" menu buttons that occasionally appear somewhere on the screen. Even after reducing Flowey's HP to zero, he simply reloads one of his previous save files at full health, indicating that the player's efforts are ultimately futile. He repeatedly kills the player character and reloads several times in succession before deciding to save after the next death to erase the player from existence. However, the six souls Flowey absorbed earlier finally revolt against him, restoring the player's health and turning Flowey back into his original form; the player is then given the choice to destroy Flowey or show mercy. Afterward, the player leaves the Underground and receives a somewhat-ambiguous "Neutral" ending, as well as a phone call from Sans. If Flowey was spared, he reappears at the very end to offer a few parting words to players, including one or more hints about how to achieve a more satisfying conclusion to the story.
If the player follows the "Genocide" path, Flowey will offer additional details about his own past as the player traverses New Home. During their conversation, Flowey realizes that the player will likely destroy the entire world, including himself. He will attempt to warn Asgore about the player's intentions before their encounter, but once the player defeats Sans and finally reaches Asgore, the protagonist automatically kills the king with a single strike, skipping the usual battle entirely. Flowey destroys Asgore's soul afterward, pledging his loyalty to the player and begging them to spare his life with tears in his eyes. The player character, still acting automatically, savagely murders Flowey.
An image of the fallen child is shown against a black screen, albeit with a different facial expression and altered palette. It addresses the player directly, identifying itself with the name chosen at the beginning of the game. The entity claims that they were resurrected by the player's power and determination, and that they represent the feeling of growing stronger through killing. It then offers to erase the entire world of Undertale; regardless of the player's choice, it attacks the screen, destroying the world and closing the game window. Relaunching the game presents only a black screen with howling wind. However, if the player waits ten minutes, the fallen child will offer to recreate Undertale's world for the price of the player's "SOUL". Players that accept this offer may then begin a new playthrough in order to reach a different ending. However, the game will recognize the player's previous achievement of total genocide on any subsequent playthroughs of Undertale, and the "True Pacifist" ending will be slightly altered in order to reflect this.
True Pacifist Path
The "True Pacifist" ending can only be achieved after receiving the "Neutral" ending at least once. After reloading a completed game file, players that finish Undertale without killing and follow Flowey's post-credits hints about a "happier" ending can confront Asgore once again. However, before the monster king can attack, the Underground's other residents rally together at New Home's castle to convince Asgore to abandon his war against humanity, thereby preventing the usual boss battle. Unfortunately, this massive gathering gives Flowey the opportunity to absorb not only the six human souls, but also the souls of every monster in the Underground. This enormous amount of soul energy causes Flowey to revert to his true form as the resurrected monster prince Asriel Dreemurr, who immediately attacks the player character and initiates the game's true final boss battle. Defeating Asriel leads to Undertale's best possible ending.