how to rewrite a script that will add a player’s image to the edited list of players and which will be provided only to those players who have a game pass
Script type what need remake (example) -
if Player:GetRankInGroup(0) >= 122 then
PlayerClone.Roles.Mod.Visible = true
end
Use MarketPlaceService:userOwnsGamePassAsync()
. Example of the code:
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, passId) then
... -- code here
end
Another way you could do this is just to use Player:GetRoleInGroup(GroupId) and then check for the role name, because it’s simpler than using GroupRank.
local Player = game.Players.LocalPlayer
local passID = 00000
local PlayerClone = ???
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, passId) then
PlayerClone.Roles.Mod.Visible = true
end
1 Like
You wrote
player:GetService(...)...
It is instead game:GetService()
.
game:GetService(...)...
Thanks for the initial help, but another person wrote a more working script :/, Thank you.
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.