RoScripter

Rank Management Server

May 17th, 2020
7,635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. local GlitchURL = "" --Place the glitch project URL inside of the quotes
  2.  
  3. function rankUser(UserId, RoleId)
  4.     game:GetService("HttpService"):GetAsync(GlitchURL .. "ranker?userid=" .. UserId .. "&rank=" .. RoleId)
  5. end
  6.  
  7.  
  8.  
  9. local MarketplaceService = game:GetService("MarketplaceService")
  10.  
  11.  
  12. local Configuration = {
  13. {PASSID, RANKID}
  14. }
  15.  
  16. game.ReplicatedStorage.ClaimRank.OnServerEvent:Connect(function(Player)
  17.     for i = 1, #Configuration do
  18.         local GamepassId = Configuration[i][1]
  19.         local RankId = Configuration[i][2]
  20.        
  21.         if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId) then
  22.             print("Ranked player to " .. RankId)
  23.             rankUser(Player.UserId, RankId)
  24.         end
  25.     end
  26. end)
Add Comment
Please, Sign In to add comment