Forest Logo
search
package_2

rbxrankdb

By @123marble-rbx

Roblox

Mirrored

RBXRankDB

A wrapper to connect RankDB server to your ROBLOX games 🌟!

Why use RBXRankDB?

ROBLOX's Ordered Datastore does not support the retrieval of entries at specific ranks and is therefore not sufficient for use cases that need to maintain and query large persistent leaderboard data. An externally hosted solution such as RankDB is required and RBXRankDB provides a simple way to interface with your RankDB server.

Usage

Copy the contents of src/rbxRankDB into a module script and require it in your game. Alternatively, install the package with Wally.

local RankDBClient = require(path.to.rbxRankDB)
local client = RankDBClient.new("<url>", "<token>")
client:createList("TestList")
client:updateElement("TestList", 1, 10, 0, nil) -- listId, elementId, score, prevRank, prevScore

-- returns:
-- {
--     id = 1,
--     prevRank = nil,
--     newRank = 1,
--     prevScore = nil,
--     newScore = 10,
-- }

Contribute

How do I run the unit tests?

Testing requires Wally, Rojo, and Roblox Studio.

  1. Ensure RankDB server is running
  2. Add secrets.lua to the project root containing the following so that the tests can authenticate:
return {
    url = "<host_url>",
    token = "<jwt_token>"
}
  1. Install packages with wally install
  2. Sync rojo with dev.project.json
  3. Run the Roblox Studio place
  4. Check output window for test status

Package Details

Install command (Click to copy)


Version

0.0.8

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.