Here's the ideal item list you should have:
- Butterscotch Pie
- Mettaton Steak
- Instant Noodles (You can only take one IIRC)
- Three Snowman Pieces
- Two Legendary Heroes
Other notes:
The ATK of your weapon doesn't matter at all.
When Sans slams you down into the bones, hold the direction opposite to the one he slammed you. You'll jump out of the way. It's sort of like him flipping the gravity of your SOUL. Note that you'll need quick reactions to actually dodge this as the attack gets faster later on.
Learn to be quick in menus. If you've gotten far enough into the fight, he'll start attacking your SOUL cursor in the menus!
Using an item will not advance his dialogue, and thus, won't advance the fight. Attacking him is what triggers the next line, so use as little items as you need to. This is why the Butterscotch Pie is crucial - it maxes out your health in a single turn.
Also, just so you know, on the genocide route, the instant noodles work the same as the Butterscotch Pie. -Tastes better dry