Are you thinking of Silly Putty? It certainly behaves like that. Hit it with a hammer and it shatters. Leave it for an hour and it melts into a puddle.

Eric