Логотип Roblox Data Stores

Roblox Data Stores

Сообщество
EL4CTEO
roblox-data-stores

Persistence and cross-server data - DataStoreService (UpdateAsync, retries, budgets, limits), session locking with ProfileStore, schema migrations, OrderedDataStore leaderboards, MemoryStore queues/sorted maps/hash maps, MessagingService, right-to-be-forgotten. Use when saving player data, building leaderboards or queues, or fixing data loss, duplication, or throttling.

Обзор

ИздательEL4CTEO
Репозиторийroblox-skills
Название навыкаroblox-data-stores
Звёзды
170
Форки
18
Файлы в комплекте
2
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 2

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — EL4CTEO. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Roblox Data Stores в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/EL4CTEO/roblox-skills/tree/main/skills/roblox-data-stores
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EL4CTEO/roblox-skills.git /tmp/roblox-skills
mkdir -p .claude/skills
cp -r /tmp/roblox-skills/skills/roblox-data-stores .claude/skills/roblox-data-stores
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Roblox Data Stores в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Roblox Data Stores, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Roblox Data Stores не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Roblox data stores and cloud services

Choose the service

NeedServiceNotes
Player progress, inventory, settingsDataStore via ProfileStore (session-locked)One key per player (User_{UserId}), ≤ 4 MB.
Global leaderboardsOrderedDataStoreInteger values only; periodic updates, cached reads.
Fast, temporary, cross-server stateMemoryStoreServiceSorted maps, queues, hash maps; everything expires (TTL ≤ 45 days).
Matchmaking queues, live events, server listsMemoryStore queue / sorted mapNot durable — never the only copy of valuable data.
Broadcast to all serversMessagingService≤ 1 kB per message, best effort, no delivery guarantee.
Values changed by live-ops without publishingExperience configs (ConfigService)See roblox-analytics-liveops.

Player data: use session locking

Two servers must never own the same player's data at once (teleports, fast rejoins), or items duplicate and progress is lost. ProfileStore (loleris) implements session locking, auto-save, and BindToClose flushing, and is the recommended default. Install it from Wally/the Creator Store and put it in ServerScriptService.

luau
-- ServerScriptService/Server/Services/DataService.luau (ProfileStore)
local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")

local ProfileStore = require(ServerScriptService.ServerPackages.ProfileStore)

local TEMPLATE = {
	version = 1,
	coins = 0,
	inventory = {} :: { [string]: number },
}
type PlayerData = typeof(TEMPLATE)

local PlayerStore = ProfileStore.New("PlayerData", TEMPLATE)
local profiles: { [Player]: typeof(PlayerStore:StartSessionAsync("")) } = {}

local function onPlayerAdded(player: Player)
	local profile = PlayerStore:StartSessionAsync(`User_{player.UserId}`, {
		Cancel = function()
			return player.Parent ~= Players -- stop waiting if the player left
		end,
	})
	if profile == nil then
		player:Kick("Could not load your data. Please rejoin.")
		return
	end
	profile:AddUserId(player.UserId) -- GDPR / right-to-be-forgotten linkage
	profile:Reconcile() -- fill in fields added to TEMPLATE since this profile was created
	profile.OnSessionEnd:Connect(function()
		profiles[player] = nil
		player:Kick("Your data was loaded on another server. Please rejoin.")
	end)
	if player.Parent == Players then
		profiles[player] = profile
	else
		profile:EndSession() -- left while loading
	end
end

for _, player in Players:GetPlayers() do
	task.spawn(onPlayerAdded, player)
end
Players.PlayerAdded:Connect(onPlayerAdded)
Players.PlayerRemoving:Connect(function(player)
	local profile = profiles[player]
	if profile then
		profile:EndSession() -- saves and releases the lock
	end
end)

local DataService = {}
function DataService.get(player: Player): PlayerData?
	local profile = profiles[player]
	return profile and profile.Data
end
return DataService

Mutate profile.Data directly on the server (it is cached in memory and auto-saved). Don't SetAsync per change. Check the ProfileStore docs for the exact current API before relying on less common features (global updates, MessageAsync, mock stores for Studio).

Raw DataStoreService rules (when not using a wrapper)

  • Buffer in memory: load once on join, mutate the in-memory table, save periodically (e.g. every 2–5 minutes with random jitter), on leave, at checkpoints (purchases), and in game:BindToClose.
  • UpdateAsync over SetAsync whenever the write depends on the old value or multiple servers may write the key. The transform function must be pure and fast (no yields); return nil to cancel.
  • Retry transient errors with exponential backoff + jitter, capped attempts; process retries for a key in order (an old retry must not overwrite newer data). Treat a failed write as "outcome unknown".
  • Never save Instances, Vector3, CFrame, functions, or mixed/sparse tables: store plain tables, numbers, strings, booleans, and buffers. Serialize datatypes ({ x, y, z }). Validate UTF-8 strings.
  • Keys and data store names ≤ 50 characters; value ≤ 4,194,304 characters after JSON encoding.
  • Stable key patterns (User_{UserId}), never display names. Few data stores, few keys per player.
  • Studio needs File → Experience Settings → Security → Enable Studio Access to API Services; use a separate test universe or a different data store name so testing never touches production data.

Complete raw implementation (session lock, autosave, BindToClose, retries): references/raw-datastore.md.

Budgets and limits (2026)

LimitValue
Experience-wide standard reads / writes300 + 40 × CCU / 300 + 20 × CCU per minute (shared with Open Cloud)
Default per-server reads/writes60 + 40 × players per minute each (configurable)
Ordered writes per server30 + 5 × players per minute
Per-key throughput25 MB/min read, 4 MB/min write
Storage (latest versions, compressed)500 MB + 1 MB × lifetime users per experience
Queue per request type30 pending requests, then errors 301–306
  • UpdateAsync consumes both read and write budget.
  • Check DataStoreService:GetRequestBudgetForRequestType(Enum.DataStoreRequestType.StandardWrite) before bulk work; tune per-server limits once at startup with SetRateLimitForRequestType.
  • Don't pre-compress data; Roblox compresses automatically. Shard only genuinely hot keys.
  • Use versions (ListVersionsAsync, GetVersionAtTimeAsync) to restore data instead of writing backup keys.

Schema versioning and migrations

Store a version field. On load, run ordered migration functions until the data reaches the current version, then reconcile defaults. Never delete fields in the same release that stops writing them; never reuse field names with different meanings.

luau
--!strict
type Data = { [string]: any }

local MIGRATIONS: { (Data) -> () } = {
	[1] = function(data) -- v1 -> v2: "gold" renamed to "coins"
		data.coins = data.gold or 0
		data.gold = nil
	end,
	[2] = function(data) -- v2 -> v3: inventory list -> counts
		local counts: { [string]: number } = {}
		for _, itemId in data.inventory or {} do
			counts[itemId] = (counts[itemId] or 0) + 1
		end
		data.inventory = counts
	end,
}
local CURRENT_VERSION = #MIGRATIONS + 1

local function migrate(data: Data): Data
	local version = data.version or 1
	while version < CURRENT_VERSION do
		MIGRATIONS[version](data)
		version += 1
	end
	data.version = CURRENT_VERSION
	return data
end

print(migrate({ gold = 5, inventory = { "Sword", "Sword" } }))

Leaderboards (OrderedDataStore)

  • Values must be integers. Write on a schedule or on meaningful change, not every increment.
  • Read top N with GetSortedAsync(false, 100) on one server loop (e.g. every 60 s), cache the result, and replicate to clients. Don't let every server/client read constantly.
  • For "this week" boards, include the period in the store name (Wins_2026W39) or use a MemoryStore sorted map.
  • Roblox-native leaderboards (fully released): register the OrderedDataStore in Creator Hub (game → leaderboards) and toggle "Active leaderboard"; Roblox renders persistent Global and Friends tabs in the player list. The store stays the source of truth (one active board per game). Initialize each player's score on join so the tabs render correctly.

MemoryStore essentials

  • Quotas are experience-wide: memory 64 KB + 1.2 KB × users; requests 1000 + 120 × CCU units/min.
  • MemoryStoreSortedMap: ranked data, server browsers, live leaderboards (SetAsync with expiration, GetRangeAsync, UpdateAsync).
  • MemoryStoreQueue: matchmaking/work queues (AddAsync, ReadAsync + RemoveAsync with the returned id after successful processing, invisibility timeout for crash safety).
  • MemoryStoreHashMap: high-volume key-value without sorting (SetAsync, GetAsync, UpdateAsync, ListItemsAsync).
  • Always set expirations; handle throttling (pcall + retry); keep items small.
  • Sorted-map and hash-map UpdateAsync retry write conflicts internally (jittered backoff, re-reading the latest value), so the transform function can run several times: keep it pure, no side effects.

MessagingService essentials

  • Message ≤ 1 kB. Per server: 600 + 240 × players sends/min; 20 + 8 × players subscriptions.
  • Delivery is best effort and not ordered: use it for notifications ("refresh your cache", global announcements), never as the source of truth. Pair with DataStore/MemoryStore for state.
  • Wrap SubscribeAsync/PublishAsync in pcall; they can fail or yield.

More code (MemoryStore queue matchmaking, cross-server announcement, RTBF): references/memory-and-messaging.md.

Right to be forgotten

Use static key patterns so automated RTBF (configured in Creator Dashboard) can delete player data templates like PlayerData/User_{userId}. Otherwise handle the right-to-erasure webhook (see roblox-open-cloud). Link keys to user IDs: SetAsync(key, value, { userId }), return them as the second value from an UpdateAsync transform, or call ProfileStore's AddUserId.

Related skills

roblox-security (duplication and trade exploits), roblox-monetization (receipts), roblox-open-cloud (external access, bulk operations), roblox-teleport-matchmaking.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Roblox Data Stores?

Persistence and cross-server data - DataStoreService (UpdateAsync, retries, budgets, limits), session locking with ProfileStore, schema migrations, OrderedDataStore leaderboards, MemoryStore queues/sorted maps/hash maps, MessagingService, right-to-be-forgotten. Use when saving player data, building leaderboards or queues, or fixing data loss, duplication, or throttling.

Зачем использовать Roblox Data Stores в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Roblox Data Stores — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Roblox Data Stores в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/EL4CTEO/roblox-skills/tree/main/skills/roblox-data-stores. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Roblox Data Stores?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Roblox Data Stores?

С любым количеством. В TypingMind вы можете использовать Roblox Data Stores с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Roblox Data Stores?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — EL4CTEO. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇