Advertisement
refrop

Property giver

Jun 21st, 2021
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. local runner = game.Workspace:WaitForChild("refrop")
  2. runner.Head.Mesh:Destroy()
  3. local leftleg = runner:FindFirstChild("Left Leg")
  4. local rightleg = runner:FindFirstChild("Right Leg")
  5. local leftarm = runner:FindFirstChild("Left Arm")
  6. local rightarm = runner:FindFirstChild("Right Arm")
  7.  
  8. local detect = Instance.new("Part")
  9. local weld = Instance.new("WeldConstraint")
  10.  
  11. local children = runner:GetChildren()
  12. for i = 1, #children do
  13.  
  14. if children[i].Shirt then
  15. children[i].Shirt:Destroy()
  16. end
  17. if children[i].Pants then
  18. children[i].Pants:Destroy()
  19. end
  20.  
  21. end
  22.  
  23.  
  24. detect.Parent = game.Workspace
  25. detect.Position = runner.Torso.Position - Vector3.new(0, 3, 0)
  26. detect.Size = Vector3.new(0.5, 0.5, 0.5)
  27. detect.Anchored = false
  28. detect.CanCollide = false
  29. detect.Transparency = 1
  30.  
  31. weld.Parent = detect
  32. weld.Part0 = runner.Torso
  33. weld.Part1 = detect
  34.  
  35.  
  36. function onTouch(part)
  37. local part = part
  38. if (part ~= nil) then
  39. print(part.Name)
  40. runner.Head.Color = part.Color
  41. runner.Head.Material = part.Material
  42.  
  43.  
  44. runner.Torso.Color = part.Color
  45. runner.Torso.Material = part.Material
  46.  
  47. rightarm.Color = part.Color
  48. rightarm.Material = part.Material
  49.  
  50. leftarm.Color = part.Color
  51. leftarm.Material = part.Material
  52.  
  53. leftleg.Color = part.Color
  54. leftleg.Material = part.Material
  55.  
  56. rightleg.Color = part.Color
  57. rightleg.Material = part.Material
  58.  
  59. end
  60. end
  61. detect.Touched:connect(onTouch)
  62.  
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement