Introduction
lsd is a server-side persistent data library built around owned player sessions. A store loads one profile per player, keeps the loaded value immutable outside controlled updates, autosaves changes, and releases ownership when the session closes.
Basic shape
luau
local lsd = require(...)
local store = lsd.store({
name = "Data",
template = {
coins = 0,
},
})
store.load(player)
store.update(player, function(data)
data.coins += 100
end)
local data = store.get(player)
print(data.coins)load acquires the session before the profile becomes available. get returns the current deeply frozen value. Changes go through update or transact.
Start with Getting Started. The API Reference lists the complete public interface.