Advertisement
Deyer

Simple Reanimate

Feb 12th, 2023
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. --// Variables
  2. local RunService = game:GetService("RunService")
  3. local Player = game:GetService("Players").LocalPlayer
  4. local Character = Player.Character
  5. Character.Archivable = true
  6. local ClonedCharacter = Character:Clone()
  7.  
  8. --// Main
  9. ClonedCharacter.Archivable = true
  10. ClonedCharacter.Parent = Character
  11. ClonedCharacter.HumanoidRootPart.CFrame = Character.Torso.CFrame
  12. ClonedCharacter.Name = "Dummy"
  13.  
  14. --// Hide Clone
  15. for i, v in pairs(ClonedCharacter:GetDescendants()) do if v:IsA("BasePart") or v:IsA("Decal") then v.Transparency = 1 end end
  16.  
  17. --// Noclip
  18. local NoClipTrigger
  19. function Noclip()
  20. for i, v in pairs(Character:GetDescendants()) do
  21. if v:IsA("BasePart") then
  22. v.CanCollide = false
  23. end
  24. end
  25. end
  26.  
  27. NoClipTrigger = RunService.Stepped:Connect(Noclip)
  28.  
  29. --\\ Attaching
  30. function Attachments(P0,P1)
  31. local AlignPosition = Instance.new("AlignPosition", P0)
  32. local AlignOrientation = Instance.new("AlignOrientation", P0)
  33. local Attachment1 = Instance.new("Attachment", P0)
  34. local Attachment2 = Instance.new("Attachment", P1)
  35. AlignPosition.MaxForce = 9e9
  36. AlignOrientation.MaxTorque = 9e9
  37. AlignPosition.Responsiveness = 9e9
  38. AlignOrientation.Responsiveness = 9e9
  39.  
  40. AlignPosition.Attachment0 = Attachment1
  41. AlignOrientation.Attachment0 = Attachment1
  42. AlignPosition.Attachment1 = Attachment2
  43. AlignOrientation.Attachment1 = Attachment2
  44.  
  45. Attachment1.Position = Vector3.new(0,0,0)
  46. Attachment1.Orientation = Vector3.new(0,0,0)
  47. end
  48.  
  49. wait()
  50.  
  51. local Netlessing
  52. --// Align
  53. Character.Torso["Left Shoulder"]:Destroy();Character.Torso["Right Shoulder"]:Destroy();Character.Torso["Left Hip"]:Destroy();Character.Torso["Right Hip"]:Destroy()
  54.  
  55. Attachments(Character["Torso"],ClonedCharacter["Torso"])
  56. Attachments(Character["Right Arm"],ClonedCharacter["Right Arm"])
  57. Attachments(Character["Left Arm"],ClonedCharacter["Left Arm"])
  58. Attachments(Character["Right Leg"],ClonedCharacter["Right Leg"])
  59. Attachments(Character["Left Leg"],ClonedCharacter["Left Leg"])
  60. --// No Hats for the clone.
  61. for i, v in pairs (Character:GetChildren()) do
  62. if v:IsA("Accessory") then
  63. ClonedCharacter[v.Name]:Destroy()
  64. end
  65. end
  66. --// Movement
  67. game:GetService("RunService").RenderStepped:Connect(function()
  68. if Character:FindFirstChild("Dummy") then
  69. for i, v in pairs(Character.Humanoid:GetPlayingAnimationTracks()) do
  70. v:Stop()
  71. end
  72. ClonedCharacter:FindFirstChild("Humanoid"):Move(Character.Humanoid.MoveDirection, false)
  73. end
  74. end)
  75.  
  76. game:GetService("UserInputService").JumpRequest:connect(function()
  77. if Character:FindFirstChild("Dummy") then
  78. if ClonedCharacter.Humanoid.FloorMaterial ~= Enum.Material.Air then
  79. ClonedCharacter.Humanoid.Sit = false
  80. ClonedCharacter.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
  81. end
  82. end
  83. end)
  84. --// Ending
  85.  
  86. workspace[game.Players.LocalPlayer.Name].Humanoid.Died:Connect(function()
  87. NoClipTrigger:Disconnect()
  88. Netlessing:Disconnect()
  89. game.Players.LocalPlayer.Character = Character
  90. ClonedCharacter:Remove()
  91. Character:BreakJoints()
  92. _G.ScriptRunning = false
  93.  
  94. end)
  95.  
  96. --// Netless
  97. function Netless()
  98. for i,v in next, workspace[game.Players.LocalPlayer.Name]:GetChildren() do
  99. if v:IsA("BasePart") then
  100. v.Velocity = Vector3.new(0,-32.5,0)
  101. elseif v:IsA("Accessory") then
  102. v.Handle.Velocity = Vector3.new(0,-32.5,0)
  103. end
  104. end
  105. end
  106.  
  107. Netlessing = game:GetService("RunService").Heartbeat:Connect(Netless)
  108.  
  109. Character.HumanoidRootPart:Destroy()
  110. workspace.Camera.CameraSubject = ClonedCharacter.Humanoid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement