Al-A'raf - 7:96

وَلَوْ أَنَّ أَهْلَ الْقُرَى آمَنُواْ وَاتَّقَواْ لَفَتَحْنَا عَلَيْهِم بَرَكَاتٍ مِّنَ السَّمَاء وَالأَرْضِ وَلَـكِن كَذَّبُواْ فَأَخَذْنَاهُم بِمَا كَانُواْ يَكْسِبُونَ
[7:96]
And if the people of the towns had believed and guarded (against evil) We would certainly have opened up for them blessings from the heaven and the earth, but they rejected, so We overtook them for what they had earned.
If the people of the towns had but believed and feared Allah, We should indeed have opened out to them (All kinds of) blessings from heaven and earth; but they rejected (the truth), and We brought them to book for their misdeeds.
And if the people of the townships had believed and kept from evil, surely We should have opened for them blessings from the sky and from the earth. But (unto every messenger) they gave the lie, and so We seized them on account of what they used to earn.