Sans/In Battle

Sans is the final boss of the Genocide Route. His fight is widely considered the most difficult in the game among players. Sans uses bones and straight beam projectiles that emerge from skeletal faces, known internally as "Gaster Blasters," in his attacks.

SOUL Modes
Sans starts by using red mode, but frequently switches the protagonist's SOUL between red and blue mode.

Patterns
Sans often utilizes gravity to make his attacks require platforming skills, such as slamming the protagonist's SOUL against the walls of the Bullet Board and making the protagonist jump through gaps between bones and onto platforms. Sans uses regular and light blue attacks.

Sans immediately starts off the battle with his "strongest attack": an array of bones and "Gaster Blasters". He is the only enemy in the game that has the first turn rather than the protagonist, which can catch the unwary off-guard.

Eventually, Sans pauses the battle and attempts to offer mercy; if accepted, he covers the entire Bullet Board with bones until the protagonist's HP is drained to 0. This results in the famous Game Over screen that is only seen on this occasion. If this happens, death is inevitable, although if the SAVE file is hacked to get unlimited health, Sans continues to shrug, but the bones disappear and the game cannot progress without save reloading or other hacks.

After that, he starts to employ randomly cobbled attacks made of "bone stabs," "Gaster Blasters," and "bone slides." He also starts to use "Gaster Blasters" more frequently and aggressively, and starts using vertical "bone slides" rather than just the horizontal variation he uses during the first half. After a while, he does his biggest attack, which features elements from previous attacks, as well as new ones, and finishes with a spinning ring of "Gaster Blasters."

Strategy
To progress the fight, the protagonist must keep attacking Sans, as checking reveals that he cannot dodge forever; performing any other action besides FIGHT, including skipping/missing the attacks, does not progress the battle, as his dialogue does not appear or advance.

Sans does not attack the protagonist when he attempts to offer mercy, which allows the protagonist to heal as many times as they need to. After getting past his mercy offer, the fight then includes Sans constantly flickering the screen as he transitions through his attacks, uses his "Gaster Blasters" more often, and even attacks the protagonist as they navigate the menu (though menu attacks only deplete their HP to 1 and cannot kill them). After enough turns, Sans then performs an attack lasting roughly 40 seconds, launching some attacks shown previously at the protagonist, including a large array of bones, a bevy of "Gaster Blasters", and many slams against the Bullet Board's walls (the protagonist's HP is depleted by 1 for every slam but stops once their HP reaches 1, preventing the attack from killing them).

Once the protagonist survives his final attack, Sans uses his "special attack," which cannot do damage to the protagonist. Sans abstains from attacking and stalls his turn out indefinitely, preventing the protagonist from accessing the menu in hopes of the protagonist becoming bored as time passes.

Attempting to move to the left before Sans falls asleep causes him to wake up as his eye flashes blue/yellow, and the SOUL is teleported back to the center of the Bullet Board. After several minutes and dialogue, Sans eventually falls asleep, allowing the protagonist to push the Bullet Board towards the FIGHT button.

After pressing it, Sans wakes up and dodges the first attack, only to be ambushed and struck down with another automatically-performed attack, instantly finishing Sans off for good. Unlike most enemies, however, he starts to leak a red fluid of some sort (which is hypothesized to be injected determination, ketchup, or even blood), then limps off-screen before dying, raising the protagonist's LOVE to 20 and HP to 99.

Mechanics
Sans dodges attacks (thus negating his need for high defense or health) and removes the protagonist's health slowly further through KR, although more INV can slow this down. The latter statement means that his attacks (true to his flavor text when Checking him) deal 1 damage per frame the protagonist's SOUL is colliding with them, allowing Sans to inflict weak hits at such a rapid rate (up to 30 times per second without extra INV) that it adds up to draining the protagonist's entire HP within a few seconds. Some attacks involve platforms the protagonist's SOUL can rest upon safely. From his false plea for the protagonist to stop fighting onwards, Sans also attacks the protagonist in the action menu.

Flavor Text

 * The easiest enemy. Can only deal 1 damage. [Check]
 * Can't keep dodging forever. Keep attacking. [If attacked at least once]
 * Just keep attacking. [After attacking once]
 * Sans's movements grow a little wearier. [After attacking four times]
 * Sans's movements seem to be slower. [After attacking nine times]
 * You feel like you're going to have a bad time. [Encounter]
 * You felt your sins crawling on your back. [Neutral, 0-10 KR]
 * You felt your sins weighing on your neck. [Neutral, 10-20 KR]
 * KARMA coursing through your veins. [Neutral, 20-30 KR]
 * Doomed to death of KARMA! [Neutral, 30-40 KR, though difficult to trigger due to the rate at which KR drains at this stage]
 * Sans is sparing you. [When Sans pretends to spare the protagonist]
 * The REAL battle finally begins. [Neutral, 2nd phase]
 * Reading this doesn't seem like the best use of your time. [Neutral, 2nd phase]
 * Felt like a turning point. [Neutral, 2nd phase]
 * Sans is starting to look really tired. [Neutral, 2nd phase]
 * Sans is preparing something. [Neutral, when he talks about his special attack]
 * Sans is getting ready to use his special attack. [Neutral, when he talks about his special attack again]

Trivia

 * The "Gaster Blaster" animation features the skeletal attack's left and right eyes flickering, similar to how Sans has one pupil while he performs psychokinesis.
 * Sans's initial dialogue in his fight parallels Asgore's dialogue in a Neutral Route. They both open with "Birds are singing, flowers are blooming..." The following dialogue differs between the characters.
 * After hacking in infinite health and surviving Sans's Mercy attack, the bones fall, and Sans remains shrugging. One cannot do anything other than restarting the game to progress.
 * KR drains more slowly if the protagonist has INV-boosting items equipped, such as the Cloudy Glasses and the Torn Notebook.
 * While most equipment is useless as Defense does not affect Sans's constant 1 damage and Attack does not affect his dodging, the Burnt Pan's boost to healing power can be very useful.
 * When blue mode is active, choosing an option (FIGHT, ACT, ITEM, or MERCY) may cause the SOUL to fall; this can be predicted if the SOUL is in the lower part of the button.
 * Sans and Papyrus's bones have different sprites; Sans has more rounded attacks while Papyrus's are flatter on the top and bottom.
 * If the game is closed during the battle, Sans counts this as a death when making his next comment before battling the protagonist again.
 * Prior to version 1.05 of Undertale, several lines of Sans's pre-fight dialogue cut off early due to a glitch.