Is there a way to datastore, or save tables of a script

Hello !
So Imma explain my issue, I’m trying to make a wl system to get a specific role, So this part is alreadyh done, and works fine, but the problem is that i realized that the tables I’m using to check if the player is WL, does not save when the server shutdown, or close. This is a big issue because I need the tables, or the script to be stored when the server close. Any ways/ideas on how to do something like this?

what is wl? kinda curious now
also if you want it to save on shutdown add a BindToClose function which will run when the game closes

game:BindToClose(function()
    --code
end)

since it will freeze studio for however long it runs you can disable it in studio using this

game:BindToClose(function()
    if game:GetService("RunService"):IsStudio() then
        return
    end
    --code
end)

hope this helps

image
as you can see there are 5 different things you can mess with for that if statement