local productId = 22933009 local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) end)
Did roblox studio break this script?
As said by Stigma, instead of having it as a Local Script, make it a Server-Sided script. To define the player, You'd need to keep adding ".Parent" until you reach the parent of the PlayerGui.