I've recently been making a Pokemon game and I've needed a save script for a Gui. Also, I've ended up with a script like this:
function PlayerEntered(player) local Player = player local PlayerGui = Player.PlayerGui:GetChildren() for i,v in pairs(PlayerGui) do local DataStoreService = game:GetService("DataStoreService") repeat wait() until player.Character if DataStoreService:GetAsync("StarterGui"..Player.Name) ~= nil then v = DataStoreService:GetAsync("StarterGui"..Player.Name) else v = game.StarterGui:GetChildren() end v.Changed:connect(function(Val) DataStoreService:SetAsync("StarterGui"..player.Name, Val) end) end end game.Players.PlayerAdded:connect(PlayerEntered)