Advertisement
Kezoto

Untitled

Apr 17th, 2021
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. local MarketPlaceService = game:GetService("MarketplaceService")
  2. local IDKoszulka = script.Parent.ShirtID.Value
  3. local IDSpodnie = script.Parent.PantsID.Value
  4. local DKoszulki = script.Parent.ShirtDetector.ClickDetector
  5. local DSpodni = script.Parent.PantsDetector.ClickDetector
  6. local DTKoszulki = script.Parent.TRYShirt.ClickDetector
  7. local DTSpodni = script.Parent.TRYPants.ClickDetector
  8. local Koszulka = script.Parent.Shirt.ShirtTemplate
  9. local Spodnie = script.Parent.Pants.PantsTemplate
  10. local Koszulga = script.Parent.Shirt
  11. local Gacie = script.Parent.Pants
  12.  
  13. Koszulka = "http://www.roblox.com/asset/?id="..IDKoszulka
  14. Spodnie = "http://www.roblox.com/asset/?id="..IDSpodnie
  15.  
  16. DKoszulki.MouseClick:Connect(function(player)
  17. MarketPlaceService:PromptPurchase(player, IDKoszulka)
  18. end)
  19.  
  20. MarketPlaceService.PromptPurchaseFinished:Connect(function(playerUserId, PurchasedId, Purchase)
  21. if Purchase == true and PurchasedId == IDKoszulka then
  22. local Players = game.Players:GetPlayers()
  23.  
  24. for _, player in pairs(Players) do
  25. player.leaderstats.Purchases.Value = player.leaderstats.Purchases.Value + 1
  26. end
  27. end
  28. end)
  29.  
  30. DSpodni.MouseClick:connect(function(player)
  31. MarketPlaceService:PromptPurchase(player,IDSpodnie)
  32. end)
  33.  
  34. MarketPlaceService.PromptPurchaseFinished:Connect(function(playerUserId, PurchasedId, Purchase)
  35. if Purchase == true and PurchasedId == IDSpodnie then
  36. local Players = game.Players:GetPlayers()
  37.  
  38. for _, player in pairs(Players) do
  39. player.leaderstats.Purchases.Value = player.leaderstats.Purchases.Value + 1
  40. end
  41. end
  42. end)
  43.  
  44. DTKoszulki.MouseClick:connect(function(player)
  45. if player.Character ~= nil then
  46. if player.Character:FindFirstChild("Shirt") then
  47. player.Character["Shirt"]:remove()
  48. Koszulga:Clone().Parent = player.Character
  49. else
  50. Koszulga:Clone().Parent = player.Character
  51. end
  52. end
  53. end)
  54.  
  55. DTSpodni.MouseClick:connect(function(player)
  56. if player.Character ~= nil then
  57. if player.Character:FindFirstChild("Pants") then
  58. player.Character["Pants"]:remove()
  59. Gacie:Clone().Parent = player.Character
  60. else
  61. Gacie:Clone().Parent = player.Character
  62. end
  63. end
  64. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement