I heard a short while ago that there was a new way to detect whether a player had bought a gamepass without them having to rejoin the game. However, I'm not sure of the process (or services) to get this.
RepStore = game:GetService("ReplicatedStorage")
Handler = RepStore:WaitForChild("Handler")
if Handler:InvokeServer(266469588) then -- GAMEPASS ID HERE
script.Parent.Parent.Spawn.Visible = true
script.Parent.Visible = false
script.Parent.Parent.Parent.OwnedBikes.Bike15.Bike15.Visible = true
end
This is my current script that I have in a Local Script on my game's main menu GUI, how would I make it instantly hide if the player owns the gamepass?
Cheers,
Michael

1 comment
It's suggested that you should use MarketPlaceService instead of GPS for checking if a Player has a Gamepass to avoid said issue