Muffet offers to spare the protagonist after 17 turns. Using a Spider Donut or Spider Cider from the Ruins during her battle brings up the spare option after a short monologue.
How do you dodge Muffet's attacks?
If you buy an item from Muffet in Hotland, she will refuse to fight you, which skips the battle entirely. However, her items cost nearly 10k gold. Another way to avoid the fight is to use a spider doughnut/spider cider during the fight with her.
What happens if you buy a spider donut from Muffet?
Additional Uses. Using a Spider Donut or Spider Cider during Muffet's fight ends it immediately. Buying a Spider Donut from the Spider Bake Sale at Hotland prevents the fight with Muffet entirely, except in the Genocide Route.