Advertisement
MawinCK

Script that copy target Clothing they wearing

May 6th, 2024 (edited)
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. --how this script work put target in "You target username" then after finishing that you execute
  2. ---if script was successful is will print the classic pants and classic shirt the target wearing even they didn't wear it what they didn't wear it mean? Is mean like for example you target wearing "hello guy" shirt but the game changed the Clothing to "hey guy" shirt and is will copy Id of "hey guy" instead of "hello guy"
  3. ---to see what where does id of clothing target showed once script successful is typing in chat "/console" then you found it if id not founded scroll down until you see it
  4. -- Function to find a player by a partial username
  5. local function findPlayer(partialName)
  6. local players = game.Players:GetPlayers()
  7. for _, player in ipairs(players) do
  8. if player.Name:lower():match(partialName:lower()) then
  9. return player
  10. end
  11. end
  12. return nil
  13. end
  14.  
  15. -- Function to get the shirt and pants IDs of a player's character
  16. local function getPlayerClothingIds(player)
  17. local character = player.Character
  18. if character then
  19. local shirt = character:FindFirstChildOfClass("Shirt")
  20. local pants = character:FindFirstChildOfClass("Pants")
  21. if shirt and pants then
  22. return shirt.ShirtTemplate, pants.PantsTemplate
  23. end
  24. end
  25. return nil, nil
  26. end
  27.  
  28. -- Main script
  29. local targetPlayerName = "YourTargetName" -- Replace this with the target username or partial name
  30.  
  31. local targetPlayer = findPlayer(targetPlayerName)
  32. if targetPlayer then
  33. local shirtId, pantsId = getPlayerClothingIds(targetPlayer)
  34. if shirtId and pantsId then
  35. print("Shirt ID:", shirtId)
  36. print("Pants ID:", pantsId)
  37. else
  38. print("Could not find shirt and pants IDs for", targetPlayer.Name)
  39. end
  40. else
  41. print("Player not found with name containing:", targetPlayerName)
  42. end
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement