All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
It is permissible for a person to enter the mosque without ablution, as regards entering it while a person is required to perform Ghusl (ritual bath) because of being in a state of sexual defilement or a woman being in menses, then this is not permissible as Allaah Says (what means): {… or in a state of Janaabah (sexual defilement), except those passing through [a place of prayer], until you have washed [your whole body].} [Quran 4:43]
Therefore, if a person enters the mosque while he/she is in a state of sexual defilement or a woman being in menses, then he/she is sinful. As regards the claim that jinn may kill whoever enters a mosque without being in a state of ritual purity, then we are not aware of any evidence to support this.
Allaah Knows best.