The Prophet said: "Whoever seeks knowledge for a reason other than the sake of Allah, or intends it for a purpose other than for the sake of Allah, let him take his place in hell." (Using translation from Ibn Mājah 258)
قَالَ رَسُولُ اللهِ ﷺ «مَنْ تَعَلَّمَ عِلْمًا لِغَيْرِ اللهِ أَوْ أَرَادَ بِهِ غَيْرَ اللهِ فَلْيَتَبَوَّأْ مَقْعَدَهُ مِنَ النَّارِ»