Gamepass Team Help With GuiScripting

So… I was doing a TeamChanger Gui. I wanted to make “Special Units” to give gamepass users and in group rank users only. And I don’t really know how. Here is the settings.


Screenshot_14

I don’t know I should make a script to make that Special Unit is visible for GroupRank users and gamepass users only or is there another way to change the script in Team Changer Script?

I don’t quite know what you are asking. Can you say more?

I have to go now, I will be back.

local GamepassID = 123123123 --change this to ur gamepass id

game.Players.PlayerAdded:Connect(function(plr)
if game:GetService(MarketPlaceService):UserOwnsGamePassAsync(plr.UserId,GamepassID) then
plr.Team = “TeamName”
plr:LoadCharacter()
else
print(“Player does not have the gamepass”)
end)

Mhm, I will try it out.
Thxxx <3