Hey Developer! I’m Abd_Dev, or you can call me Abd.
I just created this tutorial to show you how to make Auto Rank Points script, like when you get 500 Points in-game you get ranked at the Group or you get promoted.
[NOTE] We’ll use the Glitch Hosting Tutorial by @CAP7A1N
Why?
At this moment, I see many people asking about how to make Auto Rank Points and searching about developers that make this kind of things.
So… I decided to make a tutorial about how to make that by using Glitch.com!
Part 1: Hosting
Click here on and follow the Part 1 in CAP7A1N’s Tutorial.
Part 2: Get the Cookie
1. Go to an incognito window.
2. Press F12 / FN + F12 / CTRL + SHIFT + I to access Developer Console
3. Find “Application” on the top bar.
4. Open “Cookies” and press “roblox. com”
5. Find “.ROBLOSECURITY”
6. Double Click the Value section of “.ROBLOSECURITY”
7. Copy it using CTRL + C
8. Go back to Glitch .com at Config.js/user_cookie!
9. Continue to the next Part.
Part 3: LUA
Go back to CAP7A1N’s Tutorial and follow the Part 2 from the Tutorial.
Part 4: Roblox Scripts
1. Enable HTTP Service in the Game Settings.
2. Put the Script below in the Main script in ServerScriptService.
Script
local HttpService = game:GetService("HttpService")
local Server = require(script.Server)
--/ Settings
local Settings = {
["GroupID"] = 00000, -- Group ID here
["RanksToRank"] = {
["RankName"] = "NAME HERE",
["RankName1"] = "NAME HERE" -- Copy if you need more.
}
}
--/ Leaderstats
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("PointsStats")
game.Players.PlayerAdded:Connect(function(Player)
local Leaderstats = Instance.new("Folder", Player)
Leaderstats.Name = "leaderstats"
local POINTS = Instance.new("IntValue", Leaderstats)
POINTS.Name = "Points"
POINTS.Value = 0
local Data = DataStore:GetAsync(Player.UserId)
if Data then
POINTS.Value = Data
else
POINTS.Value = 20 -- Change the 20 to whatever you want the points to be when the player first joins the game.
end
POINTS.Changed:Connect(function()
if Player.leaderstats.Points.Value >= 0 then -- Change the 0 to the value of the points that you want the player to get to get ranked.
Server.SetRank(Settings.GroupID, Player.UserId, 0) -- Change the 0 to the rank id of the rank that you want the player to get ranked to.
elseif Player.leaderstats.Points.Value >= 0 then -- Change the 0 to the value of the points that you want the player to get to get ranked.
Server.SetRank(Settings.GroupID, Player.UserId, 0) -- Change the 0 to the rank id of the rank that you want the player to get ranked to.
--elseif plr.leaderstats.Points.Value >= 0 then -- Change the 0 to the value of the points that you want the player to get to get ranked.
--Server.SetRank(Settings.GroupID, plr.UserId, 0) -- Change the 0 to the rank id of the rank that you want the player to get ranked to.
end
end)
end)
game.Players.PlayerRemoving:Connect(function(Player)
local success, f = pcall(function()
DataStore:SetAsync(Player.UserId, Player.leaderstats.Points.Value)
end)
if not success then
local count = 1
repeat
warn("[POINTS RANKING]: Error- saving " .. Player.Name .. "'s data failed.\nAttempt: " .. tostring(count) .. "\nError Message: " .. f)
success, f = pcall(function()
count += 1
DataStore:SetAsync(Player.UserId, Player.leaderstats.Points.Value)
end)
wait(5)
until success or count >= 5
end
end)
THANKS FOR READING
Hope you like the tutorial, I thank @CAP7A1N for his helpful Glitch tutorial and @oxazolone for helping me while making the tutorial.
Have a nice day.