Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MarketPlaceService = game:GetService("MarketplaceService")
- local IDKoszulka = script.Parent.ShirtID.Value
- local IDSpodnie = script.Parent.PantsID.Value
- local DKoszulki = script.Parent.ShirtDetector.ClickDetector
- local DSpodni = script.Parent.PantsDetector.ClickDetector
- local DTKoszulki = script.Parent.TRYShirt.ClickDetector
- local DTSpodni = script.Parent.TRYPants.ClickDetector
- local Koszulka = script.Parent.Shirt.ShirtTemplate
- local Spodnie = script.Parent.Pants.PantsTemplate
- local Koszulga = script.Parent.Shirt
- local Gacie = script.Parent.Pants
- Koszulka = "http://www.roblox.com/asset/?id="..IDKoszulka
- Spodnie = "http://www.roblox.com/asset/?id="..IDSpodnie
- DKoszulki.MouseClick:Connect(function(player)
- MarketPlaceService:PromptPurchase(player, IDKoszulka)
- end)
- MarketPlaceService.PromptPurchaseFinished:Connect(function(playerUserId, PurchasedId, Purchase)
- if Purchase == true and PurchasedId == IDKoszulka then
- local Players = game.Players:GetPlayers()
- for _, player in pairs(Players) do
- player.leaderstats.Purchases.Value = player.leaderstats.Purchases.Value + 1
- end
- end
- end)
- DSpodni.MouseClick:connect(function(player)
- MarketPlaceService:PromptPurchase(player,IDSpodnie)
- end)
- MarketPlaceService.PromptPurchaseFinished:Connect(function(playerUserId, PurchasedId, Purchase)
- if Purchase == true and PurchasedId == IDSpodnie then
- local Players = game.Players:GetPlayers()
- for _, player in pairs(Players) do
- player.leaderstats.Purchases.Value = player.leaderstats.Purchases.Value + 1
- end
- end
- end)
- DTKoszulki.MouseClick:connect(function(player)
- if player.Character ~= nil then
- if player.Character:FindFirstChild("Shirt") then
- player.Character["Shirt"]:remove()
- Koszulga:Clone().Parent = player.Character
- else
- Koszulga:Clone().Parent = player.Character
- end
- end
- end)
- DTSpodni.MouseClick:connect(function(player)
- if player.Character ~= nil then
- if player.Character:FindFirstChild("Pants") then
- player.Character["Pants"]:remove()
- Gacie:Clone().Parent = player.Character
- else
- Gacie:Clone().Parent = player.Character
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement