Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerAdded:connect(function(plr)
- plr.CharacterAdded:connect(function(char)
- wait(2)
- if plr.PlayerGui:FindFirstChild("Shop") ~= nil then
- plr.PlayerGui:FindFirstChild("Shop").FrameA.A.MouseButton1Click:connect(function()
- local MarketplaceService = Game:GetService("MarketplaceService")
- local productId = 21317700
- MarketplaceService:PromptProductPurchase(plr, productId)
- end)
- plr.PlayerGui:FindFirstChild("Shop").FrameA.B.MouseButton1Click:connect(function()
- local MarketplaceService = Game:GetService("MarketplaceService")
- local productId = 21317713
- MarketplaceService:PromptProductPurchase(plr, productId)
- end)
- plr.PlayerGui:FindFirstChild("Shop").FrameA.C.MouseButton1Click:connect(function()
- local MarketplaceService = Game:GetService("MarketplaceService")
- local productId = 21317718
- MarketplaceService:PromptProductPurchase(plr, productId)
- end)
- plr.PlayerGui:FindFirstChild("Shop").FrameA.D.MouseButton1Click:connect(function()
- local MarketplaceService = Game:GetService("MarketplaceService")
- local productId = 21317723
- MarketplaceService:PromptProductPurchase(plr, productId)
- end)
- plr.PlayerGui:FindFirstChild("Shop").FrameA.E.MouseButton1Click:connect(function()
- local MarketplaceService = Game:GetService("MarketplaceService")
- local productId = 21317728
- MarketplaceService:PromptProductPurchase(plr, productId)
- end)
- plr.PlayerGui:FindFirstChild("Shop").FrameA.F.MouseButton1Click:connect(function()
- local MarketplaceService = Game:GetService("MarketplaceService")
- local productId = 21317731
- MarketplaceService:PromptProductPurchase(plr, productId)
- end)
- plr.PlayerGui:FindFirstChild("Shop").FrameA.G.MouseButton1Click:connect(function()
- local MarketplaceService = Game:GetService("MarketplaceService")
- local productId = 21317742
- MarketplaceService:PromptProductPurchase(plr, productId)
- end)
- plr.PlayerGui:FindFirstChild("Shop").FrameA.EXCH.MouseButton1Click:connect(function()
- local Amoun = tonumber(plr.PlayerGui:FindFirstChild("Shop").FrameA.Amount.Text)
- if Amoun ~= nil then
- if plr.leaderstats.Cash.Value >= Amoun then
- local PointsService = Game:GetService("PointsService")
- local pointsToAward = PointsService:GetAwardablePoints()
- if pointsToAward > 0 then
- plr.leaderstats.Cash.Value = plr.leaderstats.Cash.Value - Amoun
- pcall(function()
- PointsService:AwardPoints(plr.userId, Amoun)
- end)
- end
- end
- end
- end)
- else
- print("Shop Failed")
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment