If you want to make a game save your progress in it then you can use this code. There is two sprites, each with different game save code. To use the first one, click the 1 key, for the second one, click the 2 key. The first one is from @Griffpatch's multiplayer cloud game tutorial but changed a bit to make it save game progress. The second one is from the Scratch Wiki but I thought it would be useful because you can't copy and paste it from the Wiki. You have to be a Scratcher to used cloud variables so this will not work if you are a new scratcher. Hope this is useful!
Credit to the Scratch Wiki and @Griffpatch