From Dune:
"You will feel pain in this hand within the box. Pain. But! Withdraw the hand and I'll touch your neck with my gom jabbar -- the death so swift it's like the fall of the headsman's axe."
Is the sentence "But!" considered grammatically correct? How is this meant to be interpreted? How is it different from using a comma? It should be noted this is part of a dialog.