Advertisement
Idirina

Shadow Clone

Dec 3rd, 2017
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. wait(1/30)
  2.  
  3. --Player
  4. local player = game.Players.LocalPlayer
  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 gcharacter = Instance.new("Model")
  29. gcharacter.Name = "Fake Character"
  30. gcharacter.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 = gcharacter
  47. end
  48. end
  49.  
  50. local ghead = gcharacter.Head
  51. local gtorso = gcharacter.Torso
  52. local gleftarm = gcharacter["Left Arm"]
  53. local grightarm = gcharacter["Right Arm"]
  54. local gleftleg = gcharacter["Left Leg"]
  55. local grightleg = gcharacter["Right Leg"]
  56.  
  57. while true do
  58. for i,b in pairs(gcharacter:GetChildren()) do
  59. b.CFrame = b.CFrame:lerp(character:FindFirstChild(b.Name).CFrame, 0.3)
  60. b.CFrame = b.CFrame:lerp(CFrame.new(b.Position + (torso.CFrame.lookVector * -1.5) + (torso.CFrame.rightVector * 2), character:FindFirstChild(b.Name).Position + (character:FindFirstChild(b.Name).CFrame.lookVector * 1000000000000)), 0.3)
  61. local shadowclone = b:Clone()
  62. shadowclone.Name = b.Name
  63. shadowclone.Parent = workspace
  64. coroutine.resume(coroutine.create(function()
  65. for i=1,10 do
  66. shadowclone.Transparency = shadowclone.Transparency + ((1/30) * i)
  67. shadowclone.CFrame = shadowclone.CFrame:lerp(b.CFrame, i / 50)
  68. wait()
  69. end
  70. shadowclone:Destroy()
  71. end))
  72. end
  73. wait()
  74. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement