Use arrow keys to move the heart, dodge everything! The HP Bar is a bit messed up, but you will die upon the 9th time you are hit by Papyrus's bones! Basically, you will go through the yellow HP Bar in the game 3 times. This is like MajesticPie's "Undertale Boss Fight" game, but Papyrus-themed with more attacks that are more difficult to dodge, thus why you have more HP.
you did not expect it? however here it is. I change my mind,I preferred to make the boss fight of papyrus. I took Capitan_Teem's scrpit and we would thank him very much