A flute that is completely destroyed—crushed body, shattered keys, bent tubing beyond repair—cannot be practically restored. The cost and labor would far exceed the instrument's value, and structural integrity cannot be guaranteed.
Regular maintenance and careful handling are far cheaper than replacement. Use a sturdy case and avoid extreme temperatures.