Advertisement
pitrioptixiop

Untitled

Nov 8th, 2020
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. return function()
  2. warn('RE ANIM FUNCTION BY RETRO_JONO')
  3. local p = game:GetService('Players').LocalPlayer
  4. if _G.NetOn == nil then
  5. --_G.NetOn = true
  6. game:GetService('RunService').RenderStepped:Connect(function()
  7. settings().Physics.AllowSleep = false
  8. sethiddenproperty(p,'MaximumSimulationRadius',math.huge)
  9. sethiddenproperty(p,'SimulationRadius',math.huge)
  10. end)
  11. end
  12. local c = p.Character
  13. local spos = c.HumanoidRootPart.CFrame
  14. c.Archivable = true
  15. local cc = c:Clone()
  16. local fc = Instance.new('Model',workspace)
  17. local pa = Instance.new('Part',fc)
  18. pa.Anchored = true
  19. pa.Transparency = 1
  20. pa.Name = 'Head'
  21. local pa = Instance.new('Part',fc)
  22. pa.Anchored = true
  23. pa.Transparency = 1
  24. pa.Name = 'Torso'
  25. Instance.new('Humanoid',fc)
  26. p.Character = fc
  27. local hc = p.Character.Humanoid:Clone()
  28. p.Character.Humanoid.Name = 'HumanoidF'
  29. hc.Parent = p.Character
  30. p.Character.HumanoidF:Destroy()
  31. wait(5.65)
  32. wait()
  33. p.Character.Humanoid.Health = 0
  34. p.Character = workspace[p.Name]
  35. wait(5.65)
  36. wait()
  37. p.Character.Humanoid.Health = 0
  38. local c = p.Character
  39. cc.Parent = workspace
  40. cc.HumanoidRootPart.CFrame = spos
  41. cc.Humanoid.BreakJointsOnDeath = false
  42. cc.Name = 'ClonedChar'
  43. local dc = workspace[p.Name]
  44.  
  45. local flingpart = dc.HumanoidRootPart
  46. flingpart.Massless = true
  47. flingpart.CustomPhysicalProperties = PhysicalProperties.new(0,0,0)
  48. cc.DescendantAdded:Connect(function(v)
  49. pcall(function()
  50. v.Massless = true
  51. v.Changed:Connect(function()
  52. v.Massless = true
  53. end)
  54. end)
  55. end)
  56.  
  57. workspace.CurrentCamera.CameraSubject = cc.Humanoid
  58. local campart = Instance.new('Part',workspace)
  59. campart.Anchored = true
  60. campart.Transparency = 1
  61. campart.CanCollide = false
  62. campart.Locked = true
  63. campart.Size = Vector3.new(0.5,0.5,0.5)
  64. game:GetService('RunService').RenderStepped:Connect(function()
  65. local lv = workspace.CurrentCamera.CFrame.LookVector
  66. campart.CFrame = CFrame.new(cc.HumanoidRootPart.Position,Vector3.new(lv.X*9999,lv.Y,lv.Z*9999))
  67. end)
  68.  
  69. local humanoid = cc.Humanoid
  70.  
  71. local UIS = game:GetService('UserInputService')
  72. local wd,ad,sd,dd,jd = false,false,false,false,false
  73. UIS.InputBegan:Connect(function(i,gp)
  74. if gp then return end
  75. if i.KeyCode == Enum.KeyCode.W or i.KeyCode == Enum.KeyCode.Up then wd = true end
  76. if i.KeyCode == Enum.KeyCode.A then ad = true end
  77. if i.KeyCode == Enum.KeyCode.S or i.KeyCode == Enum.KeyCode.Down then sd = true end
  78. if i.KeyCode == Enum.KeyCode.D then dd = true end
  79. if i.KeyCode == Enum.KeyCode.Space then jd = true end
  80. end)
  81. UIS.InputEnded:Connect(function(i,gp)
  82. if gp then return end
  83. if i.KeyCode == Enum.KeyCode.W or i.KeyCode == Enum.KeyCode.Up then wd = false end
  84. if i.KeyCode == Enum.KeyCode.A then ad = false end
  85. if i.KeyCode == Enum.KeyCode.S or i.KeyCode == Enum.KeyCode.Down then sd = false end
  86. if i.KeyCode == Enum.KeyCode.D then dd = false end
  87. if i.KeyCode == Enum.KeyCode.Space then jd = false end
  88. end)
  89. game:GetService('RunService').RenderStepped:Connect(function()
  90. local cf = campart.CFrame
  91. if wd then cf = cf * CFrame.new(0,0,-10) end
  92. if ad then cf = cf * CFrame.new(-10,0,0) end
  93. if sd then cf = cf * CFrame.new(0,0,10) end
  94. if dd then cf = cf * CFrame.new(10,0,0) end
  95. cf = cf.Position
  96. humanoid.WalkToPoint = cf
  97. if jd then
  98. humanoid.Jump = true
  99. else
  100. humanoid.Jump = false
  101. end
  102. end)
  103. local function align(a,b)
  104. local a0 = Instance.new('Attachment',a)
  105. local a1 = Instance.new('Attachment',b)
  106. local ap = Instance.new('AlignPosition',a)
  107. ap.RigidityEnabled = false
  108. ap.ReactionForceEnabled = false
  109. ap.ApplyAtCenterOfMass = true
  110. ap.MaxForce = 67752
  111. ap.MaxVelocity = math.huge / 9e110
  112. ap.Responsiveness = 0
  113. ap.Attachment0 = a0
  114. ap.Attachment1 = a1
  115. local ao = Instance.new('AlignOrientation',a)
  116. ao.RigidityEnabled = false
  117. ao.ReactionTorqueEnabled = true
  118. ao.PrimaryAxisOnly = false
  119. ao.MaxTorque = 67752
  120. ao.MaxAngularVelocity = math.huge / 9e110
  121. ao.Responsiveness = 0
  122. ao.Attachment0 = a0
  123. ao.Attachment1 = a1
  124. return ap,ao
  125. end
  126. local names = {'Head','Torso','Left Arm','Right Arm','Left Leg','Right Leg'}
  127. for _,v in pairs(names) do
  128. dc[v]:BreakJoints()
  129. dc[v].Massless = true
  130. cc[v].Massless = false
  131. cc[v].CustomPhysicalProperties = PhysicalProperties.new(999,999,999)
  132. local nc = Instance.new('NoCollisionConstraint',dc[v])
  133. nc.Part0 = dc[v]
  134. nc.Part1 = cc[v]
  135. align(dc[v],cc[v])
  136. end
  137. for _,v in pairs(dc:GetChildren()) do
  138. if v:IsA('Accessory') then
  139. pcall(function()
  140. if v.Handle:FindFirstChild('AccessoryWeld') then
  141. v.Handle:BreakJoints()
  142. v.Handle.Massless = true
  143. v.Handle.CanCollide = false
  144. align(v.Handle,cc[v.Name].Handle)
  145. end
  146. end)
  147. end
  148. end
  149.  
  150. game:GetService('RunService').RenderStepped:Connect(function()
  151. for _,v in pairs(dc:GetChildren()) do
  152. pcall(function()
  153. v.Transparency = 0.6
  154. v.CanCollide = false
  155. v.Massless = true
  156. if v ~= flingpart then
  157. v.CFrame = cc[v.Name].CFrame
  158. --v.Velocity = Vector3.new(0,0,0)
  159. --v.RotVelocity = Vector3.new(0,0,0)
  160. end
  161. end)
  162. pcall(function()
  163. if v:IsA('Accessory') then
  164. v.Handle.CFrame = cc[v.Name].Handle.CFrame
  165. end
  166. end)
  167. end
  168. for _,v in pairs(cc:GetChildren()) do
  169. pcall(function()
  170. v.CanCollide = false
  171. end)
  172. end
  173. end)
  174.  
  175. flingpart.Massless = true
  176. flingpart:BreakJoints()
  177. return cc, flingpart
  178. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement