It is not allowed to scare and frighten another Muslim. Most of the prank that have been doing by people are about scaring, frightening or shocking other. Not to mention about the danger of that kind of action, but this is also not allowed in Islam.
In a hadith from Ibn Abi Layla (may Allah blesses him), that the Messenger of Allah ﷺ says,
يَحِلُّ لِمُسْلِمٍ أَنْ يُرَوِّعَ مُسْلِمًا
“It is not lawful for a Muslim to frighten another Muslim” [Abu Dawud. al-Albani says that this hadith is saheeh].
Also, lying is lying, even it is just a joke. Don’t tell lie when you make a joke. The Prophet ﷺ says:
ويل للذي يُحدث فيكذب ليُضحك به القوم ويل له
“Woe to the one who tells lies to make people laugh, woe to him” [Abu Dawud].
The Prophet ﷺ also says, warning against this kind of behaviour which some jokers are accustomed to:
إن الرجل ليتكلم بالكلمة ليُضحك بها جلساءه يهوي بها في النار أبعد من الثريا
“A man may say something to make his companions laugh, and he will fall into Hell as far as the Pleiades because of it” [Ahmad].
So, be careful when you make jokes. It is forbidden to say lies and to frighten your brothers.
Make giving charity your daily habit even if it’s small. The reward will come to you unexpectedly. Donate for orphans in need: ussunnah.org/orphan