Just dodge the attack to win, simple as that. Arrow Keys to move, X to slow down in Red Soul Mode.
Credit to @loganvcairns. This is what Hero's first attack would be in his Genocide fight. Pretend that the bones are swords I guess eeeeeeeeeee.