Board Thread:General Discussion/@comment-27855772-20160316194231/@comment-26907577-20190719145510

Yes, Alphys built Mettaton with her sciency electrical attacks, and then the ghost moved in and kept them. But there's no other evidence that it's possible to "learn" attacks other than because both monsters are similar. (Skeletons, dogs, electricity...)