I’m trying to make a mini in-game gamepass shop however every time the player attempts to purchase a game pass (whether from touching a physical purchase prompt block in game or through the shop gui) the message “This item is currently not for sale” pops up.
.
📜 Here's the localscript:
script.Parent.MouseButton1Down:Connect(function()
local marketPlaceService = game:GetService("MarketplaceService")
marketPlaceService:PromptProductPurchase(game.Players.LocalPlayer, 265700950)
local Click = Instance.new ("Sound")
Click.Parent = script
Click.SoundId = 421058925
Click:Play()
wait(1)
Click:Destroy()
end)
local button = script.Parent
local originalSize = button.Size
local originalPosition = button.Position
local scaleFactor = 1.05
local function onMouseEnter()
local newOffsetX = originalPosition.X.Offset - (originalSize.X.Offset * (scaleFactor - 1) / 2)
local newOffsetY = originalPosition.Y.Offset - (originalSize.Y.Offset * (scaleFactor - 1) / 2)
button.Size = UDim2.new(originalSize.X.Scale * scaleFactor, originalSize.X.Offset * scaleFactor, originalSize.Y.Scale * scaleFactor, originalSize.Y.Offset * scaleFactor)
button.Position = UDim2.new(originalPosition.X.Scale, newOffsetX, originalPosition.Y.Scale, newOffsetY)
end
local function onMouseLeave()
button.Size = UDim2.new(originalSize.X.Scale, 0, originalSize.Y.Scale, 0)
button.Position = UDim2.new(originalPosition.X.Scale, 0, originalPosition.Y.Scale, 0)
end
button.MouseEnter:Connect(onMouseEnter)
button.MouseLeave:Connect(onMouseLeave)
What can I do to make it so the GUI shop works?
Links to the gamepasses (if necessary)
Speed Coil - Roblox
Gravity Coil - Roblox
Fusion Coil - Roblox
Rainbow Flying Magic Carpet - Roblox