That was extremely confusing, So let me get this straight the main character kill the boss but the boss trap all of his friends, so in order to free them he had to do what ?
Edit: He had to regain his stats that he lost to the boss so he gave restart the “game” under a new name, in order to use the skill that can free his friends.