Advertisement
Gokussjg

Untitled

Apr 20th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.51 KB | None | 0 0
  1. vip = "acb227"
  2. plyr = game.Players:findFirstChild(vip)
  3. pg = plyr:findFirstChild("PlayerGui")
  4. script.Parent = workspace.acb227
  5.  
  6. sc = Instance.new("ScreenGui")
  7. sc.Name = "unHide"
  8. sc.Parent = pg
  9.  
  10. tx = Instance.new("TextButton")
  11. tx.BackgroundTransparency = 0.3
  12. tx.Name = "Text - Reset"
  13. tx.Parent = sc
  14. tx.Position = UDim2.new(0, 200, 0, 125)
  15. tx.Size = UDim2.new(0, 99, 0, 20)
  16. tx.Text = "Transform"
  17.  
  18. tx.MouseButton1Click:connect(function()
  19. human = plyr.Character:findFirstChild("Humanoid")
  20. if human ~= nil then
  21.  
  22. local Player = script.Parent
  23. local transparencyFader = 0.1
  24. local playerStuff = Player:GetChildren()
  25.  
  26. local meshArray = {}
  27. local face = nil
  28. local decals = {}
  29.  
  30. for i = 1,10 do
  31. meshArray[i] = {0,0}
  32. end
  33.  
  34. -- various meshes to transform into
  35. meshArray[1] = {"http://www.roblox.com/asset/?id=24102128","http://www.roblox.com/asset/?id=24102113"}
  36. meshArray[2] = {"http://www.roblox.com/asset/?id=15089001","http://www.roblox.com/asset/?id=15088976"}
  37. meshArray[3] = {"http://www.roblox.com/asset/?id=11641931","http://www.roblox.com/asset/?id=11641912"}
  38. meshArray[4] = {"http://www.roblox.com/asset/?id=1290033","http://www.roblox.com/asset/?id=1290030"}
  39. meshArray[5] = {"http://www.roblox.com/asset/?id=14846869","http://www.roblox.com/asset/?id=14846834"}
  40. meshArray[6] = {"http://www.roblox.com/asset/?id=16190555","http://www.roblox.com/asset/?id=16285875"}
  41. meshArray[7] = {"http://www.roblox.com/asset/?id=1082816","http://www.roblox.com/asset/?id=28775189"}
  42. meshArray[8] = {"http://www.roblox.com/asset/?id=1029586","http://www.roblox.com/asset/?id=1029588"}
  43. meshArray[9] = {"http://www.roblox.com/asset/?id=19380188","http://www.roblox.com/asset/?id=19380153"}
  44. meshArray[10] = {"http://www.roblox.com/asset/?id=25646277","http://www.roblox.com/asset/?id=26415302"}
  45.  
  46. for j = 1,10 do
  47. for i = 1, #playerStuff do
  48.  
  49. local thing = playerStuff[i]
  50. if playerStuff[i].className == "Part" then
  51. playerStuff[i].Transparency = playerStuff[i].Transparency + transparencyFader
  52. if thing.Name == "Head" and thing:FindFirstChild("face") ~= nil then
  53. face = thing.face
  54. thing.face.Parent = nil
  55. end
  56. elseif playerStuff[i].className == "Hat" then
  57. playerStuff[i].Handle.Transparency = playerStuff[i].Handle.Transparency + transparencyFader
  58. elseif playerStuff[i].className == "Tool" then
  59. playerStuff[i].Handle.Transparency = playerStuff[i].Handle.Transparency + transparencyFader
  60. end
  61.  
  62. end
  63. wait()
  64. end
  65.  
  66. local torso = Player:FindFirstChild("Torso")
  67. local rightLeg = Player:FindFirstChild("Right Leg")
  68.  
  69. local part = Instance.new("Part")
  70. part.Position = rightLeg.Position
  71.  
  72. local meshToUse = math.random(1,10)
  73. specialMesh = Instance.new("SpecialMesh")
  74. specialMesh.MeshId = meshArray[meshToUse][1]
  75. specialMesh.TextureId = meshArray[meshToUse][2]
  76. specialMesh.Parent = part
  77.  
  78. part.Parent = Player
  79. part.Name = "Transmorph"
  80.  
  81. local weld = nil
  82.  
  83. if rightLeg ~= nil then
  84. weld = Instance.new("Weld")
  85. weld.Parent = part
  86. weld.Part0 = part
  87. weld.Part1 = torso
  88. if meshToUse == 2 then
  89. weld.C0 = CFrame.new(0,0,1.8) * CFrame.Angles(math.pi/2,math.pi/2,0)
  90. elseif meshToUse == 3 then
  91. weld.C0 = CFrame.new(0,2,0)
  92. elseif meshToUse == 7 then
  93. weld.C0 = CFrame.new(0,0,2.5) * CFrame.Angles(math.pi/2,0,0)
  94. elseif meshToUse == 10 then
  95. weld.C0 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0)
  96. else
  97. weld.C0 = CFrame.new(0,2.5,0)
  98. end
  99. end
  100.  
  101. wait(15)
  102.  
  103. part.Parent = nil
  104. part:remove()
  105.  
  106. -- below is not efficient :( can you make it better? If you do pm jeditkacheff with the subject "I made the transmorph better!" I'll respond I promise!
  107. for j = 1,10 do
  108. for i = 1, #playerStuff do
  109.  
  110. local thing = playerStuff[i]
  111. if playerStuff[i].className == "Part" then
  112. if j ~= 10 then
  113. playerStuff[i].Transparency = playerStuff[i].Transparency - transparencyFader
  114. else
  115. playerStuff[i].Transparency = 0
  116. end
  117. if thing.Name == "Head" then
  118. if face ~= nil then
  119. face.Parent = thing
  120. end
  121. end
  122. elseif playerStuff[i].className == "Hat" then
  123. if j ~= 10 then
  124. playerStuff[i].Handle.Transparency = playerStuff[i].Handle.Transparency - transparencyFader
  125. else
  126. playerStuff[i].Transparency = 0
  127. end
  128. elseif playerStuff[i].className == "Tool" then
  129. if j ~= 10 then
  130. playerStuff[i].Handle.Transparency = playerStuff[i].Handle.Transparency - transparencyFader
  131. else
  132. playerStuff[i].Transparency = 0
  133. end
  134. end
  135.  
  136. end
  137. wait()
  138. end
  139.  
  140. end
  141. end)
  142.  
  143. plyr.Chatted:connect(function(msg)
  144. if msg == "remove" then
  145. sc:Remove()
  146. end
  147. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement