You can't. There's currently no Lua functions that I know of relating to save / load game.
Why do you want to use Lua for this? If you are wanting to create an automated autosave system then sure you can use Lua script to a degree for checking when it should save the game, but you will still need to create a called by other action which contains an execute autosave action part.
How I sorted out my autosave system was to create a loop in Lua script using the mainLoop event handler, then inside the loop function I listen out for two things...
1. scene change & 2. scene is not a menu. I update a variable with new scene if it doesn't equal the last scene & if it's not a menu then I call the called by other action containing the autosave actions.
-- * variables * --
local ps -- empty variable(s)
-- * function used to check if game should autosave (saves on new scene [playable]) * --
function autosaveSystem()
if game.CurrentScene:getName() ~= ps then
ps = game.CurrentScene:getName() -- update scene name
if not game.CurrentScene:getBool(VSceneIsMenu) and not game.CurrentScene:isEmpty() then
startAction("Actions[autosave_system]")
end
end
end
registerEventHandler("mainLoop", "autosaveSystem") -- creates a loop function which loops autosaveSystem() function