Mushrooms are bad if they are slimy and mushy. You should not eat them at that point due to the possibility that they are harboring mold. 
The first sign that mushrooms are going bad is the development of a slimy film. If you notice this film right away, you can safely cook the mushrooms and eat them within a day. Once the film develops, the mushrooms soon turn dark and mushy, and they are not safe to eat. 
To extend the shelf life of mushrooms, store them unsliced in the refrigerator in their original packaging.  They keep for six to eight months if cooked and placed in the freezer in appropriate containers.