spoilers for history and undertale: Josef Mengele was the head scientist for the nazis. his main goal was to find the way to immortality. He did this through cruel and unusual experiments. When you enter the true lab in undertale you find out what alphys was researching, a way to make monsters survive past death using determination. Because monsters can't handle determination they melted to together and as seen in the "so cold" fight, they are suffering from pain.