If the threat is credible and imminent, yes. That's because killing people is obviously illegal, and those you threaten can reasonably take you at your word when you make a credible threat against them and respond accordingly to protect themselves. The speech is merely evidence of intent, not the crime itself. (Morally speaking, of course. Consult a local lawyer for legal advice applicable to your jurisdiction, as the law is not always moral or just.)