Sulfur is such a substance. At room temperature, it is made of stacked up $\ce{S8}$ octogonal molecules. It melts at $119$°C producing a yellow liquid made of free moving octogonal molecules.
When heated in a test tube to $160$°C, the yellow liquid turns reddish : the octogones are suddenly broken : the liquid is then made of open $\ce{S8}$ chains, that are starting polymerization. At $187$°C, the liquid is brown and suddenly so viscous that the test tube can be turned upside down : the liquid will not flow and get out of the tube. The stuff is made of a polymer containing long chains of up to $20'000$ $\ce{S}$ atoms.
When heated to about $240$°C, the polymerized stuff is dark brown and is melting again. The brown liquid can then be dropped directly into a big beaker filled with water. The brown and cold sulfur falls down to the bottom of the beaker. It is soft and can be easily picked up and even kneaded by the fingers without difficulty. At the points of kneading, the polymer chains are broken into 8-atomic segments that are quickly transformed into octogones : the stuff becomes yellow and hard at these points. It is one of the rare cases where chemistry can be modified by hand.
I am a high school teacher. This demonstration has been carried out by more than $3000$ children and students, without any problems. They all love this demonstration. So do I.