Saved data

I once asked how to do a saved game. Now I want to know how that worked.

What is the part of any script that stores data elswhere, loads, saves and/or prepares data to be stored? And can I store data on the script by perminatly changing itself? like a counter?

Never mind, I’ve figured it out.