local key = "Player_" .. player.UserIdlocal success, data = pcall(function()
return playerDataStore:GetAsync(key)
end)
if success then
print("Данные загружены")
else
warn("Ошибка загрузки:", data)
endlocal data = {
Level = 5,
Coins = 250,
XP = 700
}ServerScriptServiceif data == nil then
data = {
Level = 1,
Coins = 0,
XP = 0
}
endDataStoreService:GetDataStore("PlayerData_Test")local data = {
Level = level,
Coins = coins,
XP = xp
}