Eventually, Chara manages to land a hit on him. This would have shattered his SOUL, but Papyrus' last bits of magic managed to keep it together, although the rush job was unstable. Slowly, Sans beats back Chara and wins the battle, convincing Chara to give up and QUIT.
Sans then absorbs Chara's soul and breaks the barrier, heading to the surface. He soon notices that, along with the magic of monster-kind, music is entirely obsolete. Sans decided to take matters in his own hands and make his own music to show to humans. With his magic and the power of the humans that befriended him on the surface, Sans makes a new life for himself: making music for all.