Why doesn’t he offer to buy a gamepass if you don’t have one?
---Player---
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
------
local Teamq = game.Teams["T.F.P"]
local PlayersTeam = Teamq:GetPlayers()
local MaxPlayer = 6
------
local GamepassID = 184269264
local Market = game:GetService("MarketplaceService")
------
local Sounds = script.Parent.Parent.Parent.Sounds
local Accept = Sounds.Accept
local Denied = Sounds.Denied
--Events---
local RemoteFolder = game.ReplicatedStorage.ChangeTeam
local RemoteEvent = RemoteFolder.ChangeTeam
------
function Click(mouse)
if Player.Team ~= Teamq then
if #PlayersTeam <= MaxPlayer then
if Market:UserOwnsGamePassAsync(Player.UserId, GamepassID) then
Accept:Play()
RemoteEvent:FireServer(Teamq)
else
Denied:Play()
Market:PromptGamePassPurchase(Player.UserId, GamepassID)
end
end
end
end
script.Parent.MouseButton1Down:connect(Click)