Dfgjfj

Clothing system

Feb 15th, 2025
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1.  
  2. local Players = game:GetService("Players")
  3. local MarketplaceService = game:GetService("MarketplaceService")
  4.  
  5.  
  6. local ShirtId = 962759094
  7. local PantId = 962759208
  8.  
  9. function Check(a,b)
  10. local Success,Info = pcall(function()
  11. return MarketplaceService:GetProductInfo(a,Enum.InfoType.Asset)
  12. end)
  13. for i,v in next, Info do
  14. if Info["AssetTypeId"] == b then
  15. return true
  16. end
  17. end
  18. return false
  19. end
  20.  
  21. local ShirtValid = Check(ShirtId,1)
  22. local PantValid = Check(PantId,1)
  23.  
  24. Players.PlayerAdded:Connect(function(plr)
  25. plr.CharacterAdded:Connect(function(Char)
  26. local Shirt = Char:FindFirstChildOfClass("Shirt") or Instance.new("Shirt",Char)
  27. local Pants = Char:FindFirstChildOfClass("Pants") or Instance.new("Pants",Char)
  28. if ShirtValid then
  29. Shirt.ShirtTemplate = string.format("rbxassetid://%s",ShirtId)
  30. end
  31. if PantValid then
  32. Pants.PantsTemplate = string.format("rbxassetid://%s",PantId)
  33. end
  34. end)
  35. end)
Add Comment
Please, Sign In to add comment