Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:7:64

But they denied him, so We saved him and those who were with him in the ship. And We drowned those who denied Our signs. Indeed, they were a blind people.  

But they denied him, and so We delivered him and those with him, from drowning, in the Ark, ˹in˺ the ship, and We drowned those who denied Our signs, by means of the Flood. Truly they were a people blind, to the truth.
القرآن:٧:٦٤

فَكَذَّبُوهُ فَأَنْجَيْنَاهُ وَالَّذِينَ مَعَهُ فِي الْفُلْكِ وَأَغْرَقْنَا الَّذِينَ كَذَّبُوا بِآيَاتِنَا ۚ إِنَّهُمْ كَانُوا قَوْمًا عَمِينَ  

{فكذَّبوه فأنجيناه والذين معه} من الغرق {في الفلك} السفينة {وأغرقنا الذين كذَّبوا بآياتنا} بالطوفان {إنهم كانوا قوما عَمين} عن الحق.

See similar narrations below:

Collected by Qurʾān
quran:10:73

And they denied him, so We saved him and those with him in the ship and made them successors, and We drowned those who denied Our signs. Then see how was the end of those who were warned.  

But they denied him, so We saved him and those with him in the Ark, and made them, that is, those with him, successors, in the earth, and We drowned those who denied Our signs, by ˹unleashing˺ the Flood. Behold then the nature of the consequence for those who had been warned!, in that they were destroyed: likewise We deal with those who deny.
القرآن:١٠:٧٣

فَكَذَّبُوهُ فَنَجَّيْنَاهُ وَمَنْ مَعَهُ فِي الْفُلْكِ وَجَعَلْنَاهُمْ خَلَائِفَ وَأَغْرَقْنَا الَّذِينَ كَذَّبُوا بِآيَاتِنَا ۖ فَانْظُرْ كَيْفَ كَانَ عَاقِبَةُ الْمُنْذَرِينَ  

{فكذبوه فنجيناه ومن معه في الفلك} السفينة {وجعلناهم} أي من معه {خلائف} في الأرض {وأغرقنا الذين كذبوا بآياتنا} بالطوفان {فانظر كيف كان عاقبة المنذرين} من إهلاكهم فكذلك نفعل بمن كذب.