How to save a scene exactly as it is ?

Hello, I recently started a new game, and I have the following problem: I need to create the possibility to save the scene exactly in the state that it is at a certain point in time. That means the position of objects and values of variables. I have seen several examples on the internet but most them are saving only the position of objects and under certain conditions. The idea is that I already created the game and finished basically almost all of it, but it needs to be able to save the scene with everything exactly as it is, player condition and position, weapons, the number of bullets, all data about monsters position and situation, etc … so is there any possibility to freeze the scene (on exit) and return to it when you reopen the game ?
[sorry for any language mistakes I don’t speak English very well]

this is how you do it. you whould collect all the positions weapons, rotations blah, blah, of all your objects in some sort of format. I would recommend maybe a text file with bunches of numbers seperated by commas in some format you create based on what your game needs and a format to your liking. your game would look for the file when the the game reopens. and obviosle you would then split with separators and manually move the numbers into spawn functions and reasign whatever nessesarry variable in your game. If you are Building for windows or mac its perty simple to access a hard drive to write your custom file. web players are tough. firewalls like to block these sort of things. you might need to read/write to a website or server for a webplayer game. there is no easy or automatic way to do what you are asking.