Skip to content

About

The entire system to handle the data for players in game.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Data-Network-Service

A production-ready Roblox DataService built on top of ProfileStore, designed for scalable multiplayer games. This module handles player profiles, currencies, XP, leveling, daily rewards, moderation, synchronization, profile migrations, and much more while keeping your game code clean and organized.


Features

Player Profiles

  • Automatic profile loading and saving
  • ProfileStore integration
  • Automatic profile creation
  • Safe profile release handling
  • Offline profile viewing
  • Profile exporting
  • Profile wiping

Economy

  • Cash and Gems support
  • Configurable currency caps
  • Safe currency transactions
  • Transaction history
  • Grant and removal functions
  • Built-in validation

XP & Level System

  • Scalable XP requirements
  • Configurable level progression
  • Maximum level support
  • Level-up events
  • XP validation

Daily Rewards

  • 7-day reward streak
  • Automatic streak resets
  • Customizable rewards
  • Daily cooldown handling

Leaderstats

  • Automatic Roblox leaderstats
  • Live updates
  • Supports custom stat synchronization

Moderation

  • Temporary bans
  • Permanent bans
  • Offline bans
  • Automatic ban expiration
  • Ban reason storage

Cooldown System

  • Named cooldowns
  • Remaining time checks
  • Automatic cleanup

Data Validation

  • Schema validation
  • Automatic value clamping
  • Migration support
  • Versioned save data

Networking

  • Dirty data synchronization
  • Delta updates
  • Full profile synchronization
  • NetworkService integration

Developer Tools

  • DataStore budget monitor
  • Test another player's profile safely
  • Force save
  • Bulk stat updates
  • Global profile updates
  • Playtime tracking

Included Signals

The module exposes several custom signals.

DataService.ProfileLoaded
DataService.StatChanged
DataService.LeveledUp
DataService.DailyRewardGiven
DataService.PlayerBanned
DataService.CurrencyCapped

Example

local DataService = require(ServerScriptService.DataService)

DataService:GiveCash(player, 500, "Quest Reward")
DataService:AddXP(player, 250)

local cash = DataService:GetStat(player, "Cash")
local level = DataService:GetStat(player, "Level")

Public API

Profile

GetProfile(player)
WaitForProfile(player)
IsLoaded(player)
ExportProfile(player)
ViewOfflineProfile(userId)

Stats

GetStat(player, key)
SetStat(player, key, value)
AddStat(player, key, amount)
SubtractStat(player, key, amount)

GetNestedStat(player, path)
SetNestedStat(player, path, value)

BulkSetStats(player, updates)

Economy

GiveCash(player, amount)
TakeCash(player, amount)

GiveGems(player, amount)
TakeGems(player, amount)

XP

AddXP(player, amount)
GetXPRequired(player)

Cooldowns

SetCooldown(player, name, seconds)
IsOnCooldown(player, name)
GetCooldownRemaining(player, name)

Moderation

BanPlayer(player, reason, duration)
BanUserById(userId, reason, duration)
UnbanUserById(userId)

Utilities

ForceSave(player)
ValidateProfile(player)
GlobalUpdate(player, data)
SendGlobalUpdateToUser(userId, data)
TestPlayerData(userId, saveChanges)

Configuration

Several values can be customized directly inside the module.

  • Default profile
  • Currency caps
  • XP scaling
  • Daily rewards
  • Data version
  • Migration functions
  • Transaction log size
  • Cooldown duration
  • Maximum grant limits

Requirements

This module depends on:

  • ProfileStore
  • NetworkService
  • Roblox DataStoreService
  • Roblox MessagingService

Project Goals

This DataService was built with the following goals in mind:

  • Production-ready architecture
  • Modular and maintainable
  • Easy to expand
  • Secure economy handling
  • Built for large multiplayer experiences
  • Efficient network synchronization
  • Minimal boilerplate for game developers

Notes

  • This module is server-side only.
  • It is designed to be used as the central data layer for your game.
  • The included NetworkService is responsible for client synchronization.
  • Profile migrations are version-based and can be expanded as your game grows.

License

This project is released under the MIT License.

Feel free to use it in personal or commercial Roblox projects. Attribution is appreciated but not required.

About

The entire system to handle the data for players in game.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages