Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- || 📜 AUTHOR: @4zx16 || GAMEPASS GUI PURCHASE HANDLER || SELL GUIs USING GAMEPASSES.
- ]]
- local MPS = game:GetService("MarketplaceService")
- local plr = game:GetService("Players").LocalPlayer
- local event = game:GetService("ReplicatedStorage").GUI
- local id = 0
- local function HandlePurchase()
- if MPS:UserOwnsGamePassAsync(plr.UserId, id) then
- wait(1)
- event:FireServer()
- else
- MPS:PromptGamePassPurchase(plr, id)
- end
- end
- script.Parent.MouseButton1Click:Connect(HandlePurchase)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement