In my game I have a GUI instead of using the paid access in the games access settings, because it makes access cheaper...
I've got 2 buttons, 1 for tix and 1 for robux, and Im trying to make it so when they buy one of the two Dev Products the GUI gets removed and they can see. (The GUI takes up all of the screen)
INFO: My GUI is like this: ScreenGui(named Entry) in starter GUI. And inside this I have my 2 buttons named Purchase with a local script in... The transactions work, I've tested it on an alt, its just the GUI dosent get removed... Heres my script:
local developerProduct = 22199999 -- Product id
game:GetService("MarketplaceService").ProcessReceipt = function(receipt)
if receipt.ProductId == developerProduct then
for i,v in pairs(game.Players:GetPlayers()) do
if v.userId == receipt.PlayerId then
v.game.StarterGui.Entry.Background.Visible = false
end
end
end
end
Ps: I know Dev Products are a one time thing.... I also got some of this code from other questions, I've just modified it a little to suit what I need it for.
I have 2 of these scrips, one for each button, and they're both in ServerScriptService

3 comments
Haha noob scripter errors =D Cheers man
One question. Is it possible to somehow have a list of players that this GUI dosent come up for?? I'm trying to test things but dont want to pay to see what Im doing in my own game, But if people follow me they will see whats behind the GUI for free ..
You mean like next time they join to not have to prompt them with this again? You'd have to use datastores to log the players that have bought the Developer Product. You can PM me about this if you want, I love DataStores(: