Advertisement
NyonicBear

hghghghghghghghghyg

Feb 27th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.83 KB | None | 0 0
  1. --NOTE: This version uses a hack to create a second part for shirt textures
  2. -- Mesh behavior may change to where this hack will become un-needed
  3. -- Let me know if you want me to create a toggle for this
  4.  
  5. game.Players.PlayerAdded:connect(function(Player)
  6. wait()
  7. local function CharacterAdded(Character)
  8. if Character then
  9.  
  10. local R15Model = Instance.new("Model")
  11. R15Model.Name = "R15Model"
  12. R15Model.Parent = Character
  13.  
  14. local function CreateLimb(Name,Color,Size,Transparency,ConnectToLimb,MotorName,C0,C1,MeshId)
  15. local Part = Instance.new("Part")
  16. Part.FormFactor = "Custom"
  17. Part.Size = Size
  18. Part.BrickColor = Color
  19. Part.CanCollide = false
  20. Part.Name = Name
  21. Part.Transparency = (Transparency == 0.001 and 0 or Transparency)
  22. Part.TopSurface = "Smooth"
  23. Part.BottomSurface = "Smooth"
  24.  
  25. local Motor = Instance.new("Motor6D")
  26. Motor.C0 = C0
  27. Motor.C1 = C1
  28. Motor.Part0 = ConnectToLimb
  29. Motor.Part1 = Part
  30. Motor.Name = MotorName
  31. Motor.MaxVelocity = 0.1
  32. Motor.Parent = ConnectToLimb
  33.  
  34. if MeshId then
  35. local Mesh = Instance.new("SpecialMesh")
  36. Mesh.MeshType = "FileMesh"
  37. Mesh.MeshId = MeshId
  38. Mesh.Scale = Vector3.new(0.99,0.99,0.99)
  39. Mesh.Parent = Part
  40. end
  41.  
  42. if MeshId and Transparency == 0.001 then
  43. local ShirtTexturePart = Instance.new("Part")
  44. ShirtTexturePart.FormFactor = "Custom"
  45. ShirtTexturePart.Size = Size
  46. ShirtTexturePart.BrickColor = Color
  47. ShirtTexturePart.CanCollide = false
  48. ShirtTexturePart.Name = "ShirtTexturePart"
  49. ShirtTexturePart.Transparency = Transparency
  50. ShirtTexturePart.TopSurface = "Smooth"
  51. ShirtTexturePart.BottomSurface = "Smooth"
  52.  
  53. local Mesh = Instance.new("SpecialMesh")
  54. Mesh.MeshType = "FileMesh"
  55. Mesh.MeshId = MeshId
  56. Mesh.Parent = ShirtTexturePart
  57.  
  58. local Weld = Instance.new("Weld")
  59. Weld.Part0 = Part
  60. Weld.Part1 = ShirtTexturePart
  61. Weld.Parent = ShirtTexturePart
  62.  
  63. ShirtTexturePart.Parent = Part
  64. end
  65. Part.Parent = R15Model
  66. return Part
  67. end
  68.  
  69. local HumanoidRootPart = CreateLimb("HumanoidRootPart",BrickColor.new("Medium stone grey"),Vector3.new(1,1,1),1,Character.HumanoidRootPart,"RootConnector",CFrame.new(),CFrame.new(0,0.7,0))
  70. local TorsoLower = CreateLimb("TorsoLower",BrickColor.new("Bright blue"),Vector3.new(0.5,0.5,0.5),0.001,HumanoidRootPart,"Root",CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366190286")
  71. local TorsoUpper = CreateLimb("TorsoUpper",BrickColor.new("Bright blue"),Vector3.new(0.2,0.74,0.2),0.001,TorsoLower,"Waist",CFrame.new(0, 0.739968002, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.369984001, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366190087")
  72. local Head = CreateLimb("FakeHead",BrickColor.new("Bright yellow"),Vector3.new(1,1,1),0,TorsoUpper,"Neck",CFrame.new(0, 0.566236973, -0.0666489974, 1, 0, 0, 0, 0.993143976, 0.116898, 0, -0.116898, 0.993143976),CFrame.new(0, -0.285073012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366190426")
  73. local LeftArmUpper = CreateLimb("LeftArmUpper",BrickColor.new("Bright yellow"),Vector3.new(0.2,0.536,0.2),0.001,TorsoUpper,"LeftShoulder",CFrame.new(1.50177097, 0.220340997, 0, 0, -0.999044001, -0.0437170006, -1, 0, 0, 0, 0.0437170006, -0.999044001),CFrame.new(0, 0.336115986, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366186808")
  74. local LeftArmLower = CreateLimb("LeftArmLower",BrickColor.new("Bright yellow"),Vector3.new(0.2,0.739,0.2),0.001,LeftArmUpper,"LeftElbow",CFrame.new(0, -0.267791986, 0, 1, 0, 0, 0, 0.998493016, -0.0548710003, 0, 0.0548710003, 0.998493016),CFrame.new(0, 0.369605988, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366187079")
  75. local LeftHand = CreateLimb("LeftHand",BrickColor.new("Bright yellow"),Vector3.new(0.2,0.37,0.2),0.001,LeftArmLower,"LeftWrist",CFrame.new(0, -0.369605988, 0, 1, 0, 0, 0, -1, 0, 0, 0, -1),CFrame.new(0, -0.184802994, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366187331")
  76. local RightArmUpper = CreateLimb("RightArmUpper",BrickColor.new("Bright yellow"),Vector3.new(0.2,0.536,0.2),0.001,TorsoUpper,"RightShoulder",CFrame.new(-1.50049305, 0.219521001, 0, 0, 0.999041975, -0.0437709987, -1, 0, 0, 0, 0.0437709987, 0.999041975),CFrame.new(0, 0.335705996, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366188623")
  77. local RightArmLower = CreateLimb("RightArmLower",BrickColor.new("Bright yellow"),Vector3.new(0.2,0.739,0.2),0.001,RightArmUpper,"RightElbow",CFrame.new(0, -0.296110988, 0, 1, 0, 0, 0, 0.998767972, 0.0496239997, 0, -0.0496239997, 0.998767972),CFrame.new(0, 0.337754011, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366188798")
  78. local RightHand = CreateLimb("RightHand",BrickColor.new("Bright yellow"),Vector3.new(),0.001,RightArmLower,"RightWrist",CFrame.new(0, -0.337754011, 0, 1, 0, 0, 0, -1, 0, 0, 0, -1),CFrame.new(0, -0.168877006, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366189081")
  79. local LeftLegUpper = CreateLimb("LeftLegUpper",BrickColor.new("Br. yellowish green"),Vector3.new(0.2,0.784,0.2),0.001,TorsoLower,"LeftHip",CFrame.new(0.457044005, -0.495086014, 0, 1, 0, 0, 0, 1, -0.000100999998, 0, 0.000100999998, 1),CFrame.new(0, 0.388933986, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366187724")
  80. local LeftLegLower = CreateLimb("LeftLegLower",BrickColor.new("Br. yellowish green"),Vector3.new(0.2,0.803,0.2),0.001,LeftLegUpper,"LeftKnee",CFrame.new(0, -0.388933986, 0, 1, 9.99999997e-007, 0, -9.99999997e-007, 0.991840005, -0.127486005, 0, 0.127486005, 0.991840005),CFrame.new(0, 0.401580006, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366188102")
  81. local LeftFoot = CreateLimb("LeftFoot",BrickColor.new("Br. yellowish green"),Vector3.new(0.2,0.402,0.2),0.001,LeftLegLower,"LeftAnkle",CFrame.new(0, -0.401578993, 0, 1, 0, 0, 0, -1, 0, 0, 0, -1),CFrame.new(0, -0.200790003, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366188387")
  82. local RightLegUpper = CreateLimb("RightLegUpper",BrickColor.new("Br. yellowish green"),Vector3.new(0.2,0.784,0.2),0.001,TorsoLower,"RightHip",CFrame.new(-0.451141, -0.498115987, 0, 1, 0, 0, 0, 0.999954998, 0.0095180003, 0, -0.0095180003, 0.999954998),CFrame.new(0, 0.391921997, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366189770")
  83. local RightLegLower = CreateLimb("RightLegLower",BrickColor.new("Br. yellowish green"),Vector3.new(0.2,0.796,0.2),0.001,RightLegUpper,"RightKnee",CFrame.new(0, -0.391921997, 0, 1, 0, 0, 0, 0.992762029, -0.120096996, 0, 0.120096996, 0.992762029),CFrame.new(0, 0.39814499, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366189509")
  84. local RightFoot = CreateLimb("RightFoot",BrickColor.new("Br. yellowish green"),Vector3.new(0.2, 0.398, 0.2),0.001,RightLegLower,"RightAnkle",CFrame.new(0, -0.39814499, 0, 1, 0, 0, 0, -1, 0, 0, 0, -1),CFrame.new(0, -0.199073002, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),"http://www.roblox.com/asset/?id=366189977")
  85.  
  86. --if Character:WaitForChild("Head"):WaitForChild("Mesh").MeshId ~= "" then
  87. -- Head.MeshId = Character.Head.Mesh.MeshId
  88. --end
  89.  
  90. spawn(function() Character:WaitForChild("Animate").Disabled = false end)
  91. script.NewAnimate:Clone().Parent = Character
  92.  
  93.  
  94. local function Clear(Name,Alternative,ColorParts)
  95. local Part = Character:WaitForChild(Name)
  96. Part.Transparency = (Name == "Head" and 0.99 or 1)
  97. local function ChildAdded(Ins)
  98. delay(0.05,function()
  99. if Ins.Name == "face" then
  100. if Alternative:FindFirstChild("face") then Alternative:FindFirstChild("face"):Destroy() end
  101. Ins.Parent = Alternative
  102. elseif Ins:IsA("Motor6D") and string.sub(Ins.Name,1,5) ~= "Fake_" then
  103. Ins.Name = "Fake_"..Ins.Name
  104. elseif Ins.Name == "HeadWeld" then
  105. delay(0.05,function()
  106. Ins.Parent = Head
  107. Ins.Part0 = Head
  108. Ins.C1 = CFrame.new(0,-0.15,0.125) * Ins.C1 * CFrame.Angles(0,math.pi,0)
  109. end)
  110. elseif not Ins:IsA("Weld") then
  111. Ins:Destroy()
  112. end
  113. end)
  114. end
  115. for _,Sub in pairs(Part:GetChildren()) do
  116. ChildAdded(Sub)
  117. end
  118. Part.ChildAdded:connect(ChildAdded)
  119.  
  120. local function Color()
  121. for _,Sub in pairs(ColorParts) do
  122. Sub.BrickColor = Part.BrickColor
  123. local TexturePart = Sub:FindFirstChild("ShirtTexturePart")
  124. if TexturePart then
  125. TexturePart.BrickColor = Part.BrickColor
  126. end
  127. end
  128. end
  129. Color()
  130. Part.Changed:connect(Color)
  131. end
  132.  
  133. Clear("HumanoidRootPart",HumanoidRootPart,{HumanoidRootPart})
  134. Clear("Head",Head,{Head})
  135. Clear("Torso",nil,{TorsoLower,TorsoUpper})
  136. Clear("Left Arm",nil,{LeftArmLower,LeftArmUpper,LeftHand})
  137. Clear("Right Arm",nil,{RightArmLower,RightArmUpper,RightHand})
  138. Clear("Left Leg",nil,{LeftLegLower,LeftLegUpper,LeftFoot})
  139. Clear("Right Leg",nil,{RightLegLower,RightLegUpper,RightFoot})
  140.  
  141. local ShirtUsed = false
  142. local function ChildAdded(Ins)
  143. if Ins:IsA("Hat") and string.sub(Ins.Name,1,7) ~= "Scaled_" then
  144. delay(0.05,function()
  145. local Mesh = Ins:WaitForChild("Handle"):WaitForChild("Mesh")
  146. Ins.AttachmentPos = Ins.AttachmentPos
  147. Mesh.Scale = Mesh.Scale
  148. Ins.Name = "Scaled_"..Ins.Name
  149. end)
  150. elseif Ins:IsA("Shirt") then
  151. ShirtUsed = true
  152. TorsoLower.ShirtTexturePart.Mesh.TextureId = Ins.ShirtTemplate
  153. TorsoUpper.ShirtTexturePart.Mesh.TextureId = Ins.ShirtTemplate
  154. LeftArmLower.ShirtTexturePart.Mesh.TextureId = Ins.ShirtTemplate
  155. LeftArmUpper.ShirtTexturePart.Mesh.TextureId = Ins.ShirtTemplate
  156. LeftHand.ShirtTexturePart.Mesh.TextureId = Ins.ShirtTemplate
  157. RightArmLower.ShirtTexturePart.Mesh.TextureId = Ins.ShirtTemplate
  158. RightArmUpper.ShirtTexturePart.Mesh.TextureId = Ins.ShirtTemplate
  159. RightHand.ShirtTexturePart.Mesh.TextureId = Ins.ShirtTemplate
  160. elseif Ins:IsA("Pants") then
  161. LeftLegUpper.ShirtTexturePart.Mesh.TextureId = Ins.PantsTemplate
  162. LeftLegLower.ShirtTexturePart.Mesh.TextureId = Ins.PantsTemplate
  163. LeftFoot.ShirtTexturePart.Mesh.TextureId = Ins.PantsTemplate
  164. RightLegUpper.ShirtTexturePart.Mesh.TextureId = Ins.PantsTemplate
  165. RightLegLower.ShirtTexturePart.Mesh.TextureId = Ins.PantsTemplate
  166. RightFoot.ShirtTexturePart.Mesh.TextureId = Ins.PantsTemplate
  167. if ShirtUsed ~= true then
  168. TorsoLower.ShirtTexturePart.Mesh.TextureId = Ins.PantsTemplate
  169. TorsoUpper.ShirtTexturePart.Mesh.TextureId = Ins.PantsTemplate
  170. end
  171. end
  172. end
  173.  
  174. for _,Sub in pairs(Character:GetChildren()) do
  175. ChildAdded(Sub)
  176. end
  177. Character.ChildAdded:connect(ChildAdded)
  178. end
  179. end
  180.  
  181. CharacterAdded(Player.Character)
  182. Player.CharacterAdded:connect(CharacterAdded)
  183. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement