Advertisement
Sungmingamerpro13

ShopGui STORY GAME

Aug 29th, 2022
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local ShopButton = script.Parent.ShopButton
  2. local ShopFrame = script.Parent.ShopFrame
  3.  
  4. local MPS = game:GetService("MarketplaceService")
  5. local player = game:GetService("Players").LocalPlayer
  6.  
  7. ShopButton.MouseButton1Click:Connect(function()
  8. if ShopFrame.Visible == false then
  9. ShopFrame.Visible = true
  10. else
  11. ShopFrame.Visible = false
  12. end
  13. end)
  14.  
  15. for i, Button in pairs(ShopFrame:GetChildren()) do
  16. if Button:IsA("ImageButton") or Button:IsA("TextButton") then
  17.  
  18. Button.MouseButton1Click:Connect(function()
  19. local ID = Button:FindFirstChild("ID")
  20.  
  21. MPS:PromptGamePassPurchase(player, ID.Value)
  22. end)
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement