Police investigating an overdose death found text messages discussing the purchase of an illegal gun with the suspect.