If Gay People stop being Gay and become Straight People and they become Muslims if no one knew about their past life and they said Shahadah in let us say in a Western Country or Nation and in the future this Western Nation becomes an Islamic State under the Sharia Law should this Ex Gay Person who was Homosexual as a Non Muslim should he be killed for his or her sin ? I would like to know Non Muslims who were once Adulterers and or People who used to steal in the past should their hand be cut off I ask this because I'll read that many People who did bad things became Muslims like Malcolm X what about Murder or is Murder punished like it is in the Secular United States were Murderers get the death penalty in many areas ?
lets approach this in a logical way so as to help you reach an understanding:
Knowing what Allah has sent down as laws that man should abide by have been sent down in the books. Torah means law. Bible ??? means. Quran is the basis of sharia.
Now in order to abstain from violating the law you must be informed of the law. So when you take shahadah in Islam you are testifying in Allah is the creator and Muhammad, PBUH, is the messenger. The prophet recited the Quran which was a continuation and clarification of what was already sent with more detailed instruction so as to clarify the oneness of Allah. From that point on you are a muslim. You should try to understand the big sins like shirk, murder, and so on and so forth.
So now if you are a muslim, why would you be gay, steal, murder, and so on and so forth. There must be also a separation of a capital crime like murder and the others.
Now here is the problem of the information that you mentioned.
In order for sharia to rule a verdict on a person there definitely needs to be multiple corroborating witnesses to testify that this person did the act.
So if you are a muslim and a country becomes Islamic after that, there is no possible evidence that you committed the crime knowing the commandments of Allah and muslim. Now as for murder and corruption in the land all the people of the book unanimously agree that this must be stopped and persecuted.
so being gay in the past and you took shahadah then no one can prove that you committed the acts while you are muslim. It will not stand in sharia court. Let's not forget the story of prophet Lut. Had there not been a chance for repentance then Allah would of not sent prophet Lut. you dig.
I leave you with an ayah to reflect upon:
وَالَّذِينَ إِذَا فَعَلُوا فَاحِشَةً أَوْ ظَلَمُوا أَنفُسَهُمْ ذَكَرُوا اللَّهَ فَاسْتَغْفَرُوا لِذُنُوبِهِمْ وَمَن يَغْفِرُ الذُّنُوبَ إِلَّا اللَّهُ وَلَمْ يُصِرُّوا عَلَىٰ مَا فَعَلُوا وَهُمْ يَعْلَمُونَ [٣:١٣٥]
[Saheeh_International] And those who, when they commit an immorality or wrong themselves [by transgression], remember Allah and seek forgiveness for their sins - and who can forgive sins except Allah? - and [who] do not persist in what they have done while they know.
[Hilali-Khan] And those who, when they have committed Fahishah (illegal sexual intercourse etc.) or wronged themselves with evil, remember Allah and ask forgiveness for their sins; - and none can forgive sins but Allah - And do not persist in what (wrong) they have done, while they know.
[pickthall] And those who, when they do an evil thing or wrong themselves, remember Allah and implore forgiveness for their sins - Who forgiveth sins save Allah only? - and will not knowingly repeat (the wrong) they did.
Lastly, remember, when a person is tried via sharia and had a punishment decreed, they have a greater chance for not having Allah punish them for it. And trust me that is BIG. As Allah will serve the Justice that final hour.
wa Allah ya'lam