local button = script.Parent
local Player = game.Players.LocalPlayer
local MarketPlaceService = game:GetService('MarketplaceService')
local ProdID = 1319640492
button.MouseButton1Click:Connect(function()
MarketPlaceService:PromptProductPurchase(Player, ProdID)
end)
LocalScripts won’t work if they’re placed in the workspace - move it to StarterPlayerScripts or StarterGui, and see if it works then. (you’ll need to change the button variable and reference the specific button in the workspace if you change the localscript’s parent)