In text messages, kms is typically the shorthand for kill myself. Most of the time, people use it in a lighthearted way or as dark humor to show extreme frustration or embarrassment, rather than in a literal sense. The interpretation varies with the context, but usually, it's simply an overstatement rather than a genuine declaration.