Is there a way that i can change the rank management centre from cookie to look for ownership of a tshirt instead of gamepass. The group i am setting it up for we don’t use gamepass but ownership of tshirts and then you get certain rank…
Thanks for any help in advance
Hiya!
Sorry for the late response, do you have the files of your system?
If you could send them to me (make sure to take out the important data) that would be great!
Happy Scripting,
I just used everything the same as in your rank management centre video, but i cannot figure out how i make it look for ownership of t-shirt and prompt purchase of a t-shirt instead of gamepass…
If you want i can send the scripts here as well, but it is the same as in one of your videos.
Alright, so to do this, we need to check whether a player owns a shirt.
We can use this alternative instead:
MarketplaceService.PlayerOwnsAsset
Now, we must replace the code inside each button.
We can then simply replace the code inside of ServerScriptService with this:
local ReplicatedStorage = game.ReplicatedStorage.Requests
local HttpService = game:GetService("HttpService")
local ReqRank = ReplicatedStorage.ReqRank
local url = "Application_URL"
local APIKEY = "API_KEY_HERE"
local groupId = 1234567
ReqRank.OnServerEvent:Connect(function(plr, Shirt_Id, role_number)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, Shirt_Id) then
print("User owns gamepass! Now ranking!")
local url_with_data = url.."?user_name="..plr.Name.."&key=".. APIKEY.."&groupid=" ..groupId.."&role_number="..role_number
local response = HttpService:GetAsync(url_with_data)
local data = HttpService:JSONDecode(response)
if data == "The user had their ranked changed" then
plr:Kick("You were ranked in the group!")
else
ReplicatedStorage.InfoOnRank:FireClient("Something went wrong on our end! Try again later, if the issue still persists contact the game owner.")
print("An error occured.")
end
else
ReplicatedStorage.InfoOnRank:FireClient("You do not own the gamepass!")
end
end)
Be sure to mark me as solution if this works for you!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.