This is a very hard and puzzling Red boss fight. Good luck!
Credit to pococikapusta for the battle creator and to Toby Fox for Undertale.