What was the end of Xue Gang's anti-Tang campaign?

Xue Gang's anti-Tang ending is:

Xue Gang felt hopeless in the future, and began to repeatedly recall and regret that he had killed the whole family, feeling sorry for himself and suffering from a terminal illness. Xue Gang, who was seriously ill, dreamed that his mother, Fan Lihua, told her that she had been reincarnated as a ghost star, Yang Fan, in her previous life, thus killing Xue Jia. Because we killed each other twice, our enemies were also at fault, and we shouldn't kill the Zhang family, which led to revenge.

Therefore, we can't go back to heaven, so we must try our best to eliminate all difficulties, and inform our brothers that the younger brother Bao Li Dan's rebellion was arranged by heaven, but this brother's robbery was still a small robbery, and Qinglong Xing Su had to go to An Lushan to disrupt the founding of Datang, Xu, Qin and Luo, all of which lost their loyalty to Su in their previous lives in Dan, so families from all countries would rob the door with them, although Xue family had nothing to do with Dan's affairs.

But because we have offended Sue, we will be robbed again, and our children and grandchildren are doomed. Only when Bai Huxing came to Guo Ziyi, can we save him, and the Xue family can leave a trace of blood, only Xue Ping, the son of Xue Qiang.

Still need to wait for Sinuhong to rescue, Murphy gulps it down and tells Xue Gang that the cat can't be leaked. Xue Gang heard about his past life and regretted what he had done. After waking up, he told the solution according to Fan Lihua's dream, and kept doing Dojo and charity to appease the murderer he had killed. After that, he passed away safely, returned to heaven, and restored the five ghost stars.

Historical prototype:

There is a folk saying that the historical prototype of Tang Dynasty is Xue Song. However, time and deeds are completely different. In the romance novel Five Biographies of Xing Tang Dynasty in Qing Dynasty, Xue Song was the representative of Xue's family, assisted Tang Gaozong, defeated Dongliao, and made great achievements together with descendants of Tang Dynasty, such as Cheng, Wei Chi Xiande. Therefore, Xue Gang's prototype is that Xue Song's theory conflicts with Five Biographies of Xing Tang.