Verily, you are going to taste the painful torment; and you will be requited nothing except for what you used to do.
Then He makes an exception in the case of His sincerely believing servants.
This is like the Ayat;
وَالْعَصْرِ
إِنَّ الاِنسَـنَ لَفِى خُسْرٍ
إِلاَّ الَّذِينَ ءَامَنُواْ وَعَمِلُواْ الصَّـلِحَـت
By the Time. Verily, man is in loss, Except those who believe and do righteous deeds... (103;1-3)
لَقَدْ خَلَقْنَا الاِنسَـنَ فِى أَحْسَنِ تَقْوِيمٍ
ثُمَّ رَدَدْنَـهُ أَسْفَلَ سَـفِلِينَ
إِلاَّ الَّذِينَ ءَامَنُواْ وَعَمِلُواْ الصَّـلِحَـتِ
Verily, We created man in the best stature. Then We reduced him to the lowest of the low. Save those who believe and do righteous deeds. (95;4-6)
وَإِن مِّنكُمْ إِلاَّ وَارِدُهَا كَانَ عَلَى رَبِّكَ حَتْماً مَّقْضِيّاً
ثُمَّ نُنَجِّى الَّذِينَ اتَّقَواْ وَّنَذَرُ الظَّـلِمِينَ فِيهَا جِثِيّاً
There is not one of you but will pass over it (Hell); this is with your Lord, a decree which must be accomplished. Then We shall save those who have Taqwa. And We shall leave the wrongdoers therein to their knees. (19;71-72)
and,
كُلُّ نَفْسٍ بِمَا كَسَبَتْ رَهِينَةٌ
إِلاَّ أَصْحَـبَ الْيَمِينِ
Every person is a pledge for what he has earned, except those on the right. (74;38-39)
Allah says here;
إِلاَّ عِبَادَ اللَّهِ الْمُخْلَصِينَ