Advertisement
Idirina

Shadow Clone 2

Dec 3rd, 2017
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. wait(1/30)
  2.  
  3. --Player
  4. local player = game.Players.Unyuho
  5. local character = player.Character
  6.  
  7. --Limbs
  8. local head = character.Head
  9. local torso = character.Torso
  10. local rootpart = character.HumanoidRootPart
  11. local leftarm = character["Left Arm"]
  12. local rightarm = character["Right Arm"]
  13. local leftleg = character["Left Leg"]
  14. local rightleg = character["Right Leg"]
  15.  
  16. --Useful Functions
  17. local function Mesh(meshname, parent, scale)
  18. local meshy = Instance.new("SpecialMesh")
  19. if scale ~= nil then
  20. meshy.Scale = scale
  21. end
  22. meshy.MeshType = meshname
  23. meshy.Name = "Meshy"
  24. meshy.Parent = parent
  25. end
  26.  
  27. --Person
  28. local bcharacter = Instance.new("Model")
  29. bcharacter.Name = "Fake Character 2"
  30. bcharacter.Parent = workspace
  31.  
  32. for i,v in pairs(character:GetChildren()) do
  33. if v:IsA("Part") and v ~= rootpart then
  34. local clone = v:Clone()
  35. for i,b in pairs(clone:GetChildren()) do
  36. if not b:IsA("SpecialMesh") then
  37. b:Destroy()
  38. end
  39. end
  40. clone.CFrame = CFrame.new((v.Position + Vector3.new(4,0.5,0)) + (torso.CFrame.lookVector * -5.5)) * CFrame.Angles(math.rad(v.Orientation.x), math.rad(v.Orientation.y), math.rad(v.Orientation.z))
  41. clone.BrickColor = BrickColor.new("Really black")
  42. clone.Transparency = 0.5
  43. clone.Name = v.Name
  44. clone.CanCollide = false
  45. clone.Anchored = true
  46. clone.Parent = bcharacter
  47. end
  48. end
  49.  
  50. --Person 2
  51. local gcharacter = Instance.new("Model")
  52. gcharacter.Name = "Fake Character"
  53. gcharacter.Parent = workspace
  54.  
  55. for i,v in pairs(character:GetChildren()) do
  56. if v:IsA("Part") and v ~= rootpart then
  57. local clone = v:Clone()
  58. for i,b in pairs(clone:GetChildren()) do
  59. if not b:IsA("SpecialMesh") then
  60. b:Destroy()
  61. end
  62. end
  63. clone.CFrame = CFrame.new((v.Position + Vector3.new(9,0.5,0)) + (torso.CFrame.lookVector * -5.5)) * CFrame.Angles(math.rad(v.Orientation.x), math.rad(v.Orientation.y), math.rad(v.Orientation.z))
  64. clone.BrickColor = BrickColor.new("Really black")
  65. clone.Transparency = 0.5
  66. clone.CanCollide = false
  67. clone.Name = v.Name
  68. clone.Anchored = true
  69. clone.Parent = gcharacter
  70. end
  71. end
  72.  
  73. while true do
  74. for i,b in pairs(gcharacter:GetChildren()) do
  75. b.CFrame = b.CFrame:lerp(character:FindFirstChild(b.Name).CFrame, 0.3)
  76. b.CFrame = b.CFrame:lerp(CFrame.new(b.Position + (torso.CFrame.lookVector * -1.5) + (torso.CFrame.rightVector * -2.5), character:FindFirstChild(b.Name).Position + (character:FindFirstChild(b.Name).CFrame.lookVector * 1000000000000)), 0.3)
  77. local shadowclone = b:Clone()
  78. shadowclone.Name = b.Name
  79. shadowclone.Parent = workspace
  80. coroutine.resume(coroutine.create(function()
  81. for i=1,10 do
  82. shadowclone.Transparency = shadowclone.Transparency + ((1/30) * i)
  83. shadowclone.CFrame = shadowclone.CFrame:lerp(b.CFrame, i / 50)
  84. wait()
  85. end
  86. shadowclone:Destroy()
  87. end))
  88. end
  89. for i,b in pairs(bcharacter:GetChildren()) do
  90. b.CFrame = b.CFrame:lerp(character:FindFirstChild(b.Name).CFrame, 0.3)
  91. b.CFrame = b.CFrame:lerp(CFrame.new(b.Position + (torso.CFrame.lookVector * -1.5) + (torso.CFrame.rightVector * 2.5), character:FindFirstChild(b.Name).Position + (character:FindFirstChild(b.Name).CFrame.lookVector * 1000000000000)), 0.3)
  92. local shadowclone = b:Clone()
  93. shadowclone.Name = b.Name
  94. shadowclone.Parent = workspace
  95. coroutine.resume(coroutine.create(function()
  96. for i=1,10 do
  97. shadowclone.Transparency = shadowclone.Transparency + ((1/30) * i)
  98. shadowclone.CFrame = shadowclone.CFrame:lerp(b.CFrame, i / 50)
  99. wait()
  100. end
  101. shadowclone:Destroy()
  102. end))
  103. end
  104. wait()
  105. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement