Ruby’s comment:-
God is the Cause of all causes, His Will dictates an outcome. Human will works within the framework of God’s greater Will. The exact formula of the interaction is not known in this life. It is suffice to know that God has granted humans free will therefore they are responsible for exercising liberty. God does not stop one from doing wrong when he/she really wills it. God knows that state very well but a human does not. The intensity and consistency of a human will may cause God’s Will to allow it to take place. Even though a wrong cannot take place without God’s allowing it, a human remains responsible for his/her will to perpetrate it. There are verses that indicate that God does not impose faith on one who wills not to believe in God. If one is repentant God may forgive and guide that person towards reform. However, if one is arrogant in deliberately staying on the course of wrong doings, there may come a point after which God withdraws His guidance and forgiveness: the person is doomed.
On the other hand if one is a believer and ask God’s help and mercy, he/she can always avail God’s forgiveness and help.
There is an unseen umbilical cord between a person and the Creator. If the person remains pious signals of guidance come clearly. However, consistent and higher degree of corruption destroys that connection and the person is left in the dark. A human being therefore is responsible for his/her consequences.