I have a button that allows you to purchase a boombox gamepass, where it gives you a boombox (go figure). But it allows you to keep purchasing it over and over again, giving you more and more boomboxes at the price of 500 R$. Is this just how Studio test purchasing works or is there something wrong with this script?
This is the local script located inside of the shopMenu ScreenGui. I have another regular script inside of the button itself that focuses on giving the player the boombox, I’m 99% sure it has nothing to do with the issue.
local MarketplaceService = game:GetService("MarketplaceService")
local ServerStorage = game:GetService("ServerStorage")
local MainFrame = script.Parent.Frame
local player = game.Players.LocalPlayer
local GP_bb = MainFrame.ScrollingFrame.boombox.bb_button
local ID_bb = 14537695 -- boombox gamepass 500$
GP_bb.MouseButton1Down:Connect(function()
local sucess, message = pcall(function()
hasPass4 = MarketplaceService:UserOwnsGamePassAsync(player.UserId, ID_bb)
end)
if hasPass4 then
print("Player already has BOOMBOX gamepass")
else
MarketplaceService:PromptGamePassPurchase(player, ID_bb)
print("Initiated BOOMBOX Gamepass Prompt")
end
end)
Have you checked if the asset was a GamePass or a Developer Product? Dev Products can be purchased multiple times while GamePasses can only be purchased once (as long as the user doesn’t delete the GamePass from their account and buy it again).
I checked that as well. Definitely a gamepass. I’m thinking it’s Studio thing, but I haven’t gotten to work in-game. Plus, I just realized RoSync virus is back in my game, so I’m going through deleting that. Maybe that’ll maybe make a difference, I don’t know.
Edit: Now GetService(“StarterPack”) isn’t working anymore…?