In Islam you can also be punished if you do wrong (disobedience), but if you did good (charity etc) and regret the wrong then God may forgive you (His name is Most Forgiving also).
Ba gana go utlwa, le gone ba se ka ba gopola dikgakgamatso tsa gago tse o kileng wa nna wa di dira mo gare ga bone; ba ithatafatsa dithamo tsa bone, le mo tsuololong ya bone ba itlhomela kgosi go tla ba boela kwa kgolegong ya bone; mme wena, o Modimo o o maitshwarelo; o pelotshweu, o tletse bopelotlhomogi, o bonya go galefa, o letlotlo la boutlwelobotlhoko, wa se ka wa ba latlha.