roll-back button

Guys, tell me how to roll-back? (That is, a button that will return the game to the previous frame?)

i mean in the game go back to the previous frame as "renpy"

Or maybe there are ready-made solutions?
I tried to do something similar some time ago but it was not impossible to make a "common event" that would allow me to go backwards.
The only solution I can think of is that every time a new image appears in the videogame it is unlocked in a gallery that you create yourself; so people could visit all the images seen until that moment.
my friend my gallery does not work))
I know, I know; I still remember the post you published. But you can create it yourself from scratch (although it's complicated and the result wouldn't be the best) but I can't think of anything else.

Original thread: https://forums.rpgmakerweb.com/threads/roll-back-button.133726/