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
I think gamepass can't be instantaneous. I think what you heard was Developer product wich is instant and not permanent. Usually used for ingame currency. (http://wiki.roblox.com/index.php/Developer_product)
I found this gamepass script wich promisses to do something after purchase.I don't know if it works.
local passId = 0000 --change this to your GamePass Id local marketplaceService = game:GetService("MarketplaceService") marketplaceService.PromptPurchaseFinished:connect(function(player,assetId,isPurchased) if isPurchased then --if the player did pay if assetId == passId then --if what they bought is the pass print(player.Name .. " bought the pass (" .. passId .. ")") end end end)
--script from http://wiki.roblox.com/index.php?title=Game_pass#Giving_the_Game_Pass_an_effect