ezPlayers is a developer-friendly library for extending Roblox’s Players service, providing data management, moderation tools, and utilities through a simple interface.
The Library is still in development, but gets updated frequently.
There is a Documentation if you have any questions.
Script Examples & Info
Simple Join and Leave Signals
local Players = require(script.Parent.ezPlayersServer); --ezPlayersServer Module Script
Players.playerAdded:Connect(function(Player) --Assign a function to the playerAdded signal
print(Player.Name.." joined the game!")
end)
Players.playerRemoving:Connect(function(Player) --Assign a function to the playerRemoving signal
print(Player.Name.." left the game!")
end)
Create & Load Data
local Players = require(script.Parent.ezPlayersServer); --ezPlayersServer Module Script
Players.playerAdded:Connect(function(Player) --Assign a function to the playerAdded signal
--Creating Data--
-- :createData(dataName,dataValue,dataCategory,saveData,createInstance,orderedData)
local Wins = Player:createData("Wins",0,"Stats",true,false,true);
--We want the wins to save, and also save them extra in an ordered datastore
local Coins = Player:createData("Coins",0,"Stats",true,false,false);
--We want the coins to save only
local Deaths = Player:createData("Deaths",0,"Stats",false,false,false);
--We dont want to save the deaths
local somePosition = Player:createData("somePos",Vector3.new(),"Stats",false,true,false);
--We dont want this position to save, but we want an instance of it
--If you dont want to use some boolean parameter,(arg4,arg5,arg6) you can keep it empty (nil), you dont have to set it to false
--Load Data--
--Now since we created all important data we can load it, if the player has already some data saved--
Player:loadData()
end)
Edit Data
local Players = require(script.Parent.ezPlayersServer); --ezPlayersServer Module Script
Players.playerAdded:Connect(function(Player) --Assign a function to the playerAdded signal
--Creating Data--
-- :createData(dataName,dataValue,dataCategory,saveData,createInstance,orderedData)
local Wins = Player:createData("Wins",0,"Stats",true,false,true);
--We want the wins to save, and also save them extra in an ordered datastore
local Coins = Player:createData("Coins",0,"Stats",true,false,false);
--We want the coins to save only
local Deaths = Player:createData("Deaths",0,"Stats",false,false,false);
--We dont want to save the deaths
local somePosition = Player:createData("somePos",Vector3.new(),"Stats",false,true,false);
--We dont want this position to save, but we want an instance of it
--Load Data--
--Now since we created all important data we can load it, if the player has already some data saved--
Player:loadData()
--Add Wins--
print(Wins()) --Output: 0 (if there was no saved data before)
print(Wins.Value) --The same as the line above
addWin(Player) --Add +1
print(Wins()) --Output 1 (if it was 0 before)
print(Wins.Value) --The same as the line above
--You can also output a value using .Value (example: Wins.Value), but calling it also works
--Add Deaths--
Player.Died:Connect(function()
Deaths += 1;
--Or you can use: Deaths.Value += 1;
print(Deaths())
end)
end)
function addWin(Player)
--This is just a test function, to simulate a player win, the parameter is an ezPlayers player class, if you have a player instance you can convert it
local Wins = Player:getData("Wins","Stats")
Wins += 1;
--Or you can use: Wins = Player.Data.Stats.Wins
--Wins.Value += 1;
end
Moderation Methods
This is not a script example, but you can use player:Ban()
player:Warn(
) player:Kick()
player:GetModerationLog()
for moderation, read more about it here
About Data Saving
Data does save automaticly if the player leaves the game.
To load data you have to call the :loadData()
method
You can also manually save data if you call the :saveData()
method
It costs $3,99 USD and you can buy it here: ezPlayers - Roblox Player Library by Byte Studios
(I choose itch.io because its a great site to sell stuff like this)
Why does it cost money!?!
I’ve created this in my free time after work. Selling it helps support the effort I’ve put into creating a tool that saves developers time and simplifies their workflow, while also funding future updates and improvements. $4 isn’t much compared to the time and effort it saves you
Let me know what you think about it