Particularly, speed and cocaine can cause shooting pains around the heart when used. This pain is caused by a stenosis of the blood vessels around the heart that provide the heart with oxygen. A lack of oxygen in the heart can cause shooting pains. When the effect of the drugs is gone, the blood vessels dilate again (mostly after a couple of hours) and the pain disappears.
There are many other things that can cause chest pain; for example, a panic attack, which is the most common cause of chest pain with young people, especially if you use speed or cocaine, and even if you have already quit. The symptoms of a panic attack are hyperventilation, palpitations (rapid or irregular heart beat), tingling in the fingers and around the mouth, chest pain and fear of dying.
Although very awkward, this pain caused by fear is innocent. When the fear disappears, the pain will go away too. Another known cause of chest pain is a permanent stenosis of the blood vessels around the heart, but this is more common in older people and has to do with bad habits like fat food, smoking, etc. In the long term, these bad habits cause arteriosclerosis.
Occasionally, the use of speed and cocaine permanently damages the blood vessels around the heart, but this is very rare.
If you don't trust it and the complaints persist, please your doctor. XTC can cause heart problems as well.