Advertisement
NeverCords

Untitled

May 24th, 2022
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.59 KB | None | 0 0
  1. local lp = game:GetService("Players").LocalPlayer
  2. local rs = game:GetService("RunService")
  3.  
  4. local stored = {}
  5.  
  6. function setupJoints()
  7. local char = lp.Character
  8. local new = {}
  9. for i, v in pairs(char:GetDescendants()) do
  10. if v:IsA"Motor6D" then
  11. new[v.Part1.Name] = v
  12. end
  13. end
  14. stored=new
  15. return new
  16. end
  17. setupJoints(lp.Character)
  18. _G.runninganimations = {}
  19. _G.tosequence = function(id)
  20. print(id)
  21. local animation = game:GetObjects("rbxassetid://"..tostring(id))[1]
  22. animation.Parent = workspace
  23. animation:ClearAllChildren()
  24. return string.gsub(animation.AnimationId,"[^%-%d]", "")
  25. end
  26.  
  27. local ts = game:GetService"TweenService"
  28. _G.animate = function(id,speed,dontloop)
  29. local dontloop = false or dontloop
  30. local speed = speed or 1
  31. local index = #_G.runninganimations+1
  32. _G.runninganimations[index]=true
  33. local animation = game:GetObjects("rbxassetid://"..tostring(id))[1]
  34. animation.Parent = workspace
  35. coroutine.wrap(function()
  36. repeat wait()
  37. if lp.Character:FindFirstChild"Animate" then lp.Character.Animate.Disabled = true end
  38. for i,v in pairs(lp.Character.Humanoid:GetPlayingAnimationTracks()) do
  39. v:Stop() end local lastvalue = 0
  40.  
  41. local char = lp.Character
  42. for _,frame in pairs(animation:GetChildren()) do
  43.  
  44. for i, pose in pairs(frame:GetDescendants()) do
  45. if pose.Name ~= char:FindFirstChildWhichIsA"Humanoid".RootPart.Name then
  46. local z = setupJoints()[pose.Name]
  47. if z then
  48. local t = ts:Create(z,TweenInfo.new((frame.Time-lastvalue)/speed,Enum.EasingStyle[tostring(pose.EasingStyle):gsub("Enum.PoseEasingStyle.", "")]),{Transform = pose.CFrame})
  49. lastvalue=frame.Time
  50. t:Play()
  51. end
  52. end
  53. end
  54. wait((frame.Time-lastvalue)/speed)
  55. end
  56. until not char or not animation.Loop or not _G.runninganimations[index] or dontloop
  57. if lp.Character:FindFirstChild"Animate" then lp.Character.Animate.Disabled = false end
  58.  
  59. end)()
  60. return index
  61. end
  62. local fakecharacters = {}
  63. local teleportparts = {}
  64. function applygod()
  65. local lp = game.Players.LocalPlayer
  66. local char = lp.Character;char.Archivable = true
  67. local new = char:Clone()
  68. new.Parent = workspace
  69. lp.Character= new
  70. fakecharacters[#fakecharacters+1]=new
  71. wait(2)
  72. local oldhum = char:FindFirstChildWhichIsA"Humanoid"
  73. local newhum = oldhum:Clone()
  74. newhum.Parent = char
  75. oldhum:Remove()
  76. wait(2)
  77. lp.Character = char
  78. return table.unpack({new,oldhum})
  79. end
  80.  
  81. local alreadyrunning = false
  82. function apply(char)
  83. if not alreadyrunning and not table.find(fakecharacters,char) then
  84. for _,v in pairs(fakecharacters) do v:Destroy() end
  85. alreadyrunning = true
  86. local oldroot = char:FindFirstChildWhichIsA"Humanoid".RootPart
  87. wait(.5)
  88. local new, oldhum = applygod()
  89. wait(1)
  90. char:FindFirstChildWhichIsA"Humanoid".Health = 0
  91. wait(1)
  92. for i,a in pairs(new:GetChildren()) do
  93. if a:IsA"BasePart" and char:FindFirstChild(a.Name) then
  94. local b= char:FindFirstChild(a.Name)
  95. b.Name = "Part"
  96. b.CanCollide = false
  97. b.Transparency = 1
  98. b.Parent = new
  99. local aa = Instance.new("Attachment",a)
  100. local ba = Instance.new("Attachment",b)
  101. local hinge = Instance.new("HingeConstraint",b)
  102. hinge.Attachment0=aa hinge.Attachment1=ba
  103. hinge.LimitsEnabled = true
  104. hinge.LowerAngle = 0
  105. hinge.Restitution = 0
  106. hinge.UpperAngle = 0
  107. teleportparts[a]=b
  108. b.Massless = true
  109. if b:FindFirstChildWhichIsA"Decal" then
  110. b:FindFirstChildWhichIsA"Decal":Destroy() end
  111. end
  112. end
  113.  
  114. for i,a in pairs(new:GetChildren()) do
  115. if a:IsA"Accessory" and char:FindFirstChild(a.Name) then
  116. local b= char:FindFirstChild(a.Name)['Handle']
  117. local a = a["Handle"]
  118. b.Name = "Part"
  119. b.CanCollide = false
  120. b.Transparency = 0
  121. b.Parent = new
  122. local aa = Instance.new("Attachment",a)
  123. local ba = Instance.new("Attachment",b)
  124. local hinge = Instance.new("HingeConstraint",b)
  125. hinge.Attachment0=aa hinge.Attachment1=ba
  126. hinge.LimitsEnabled = true
  127. hinge.LowerAngle = 0
  128. hinge.Restitution = 0
  129. hinge.UpperAngle = 0
  130. teleportparts[a]=b
  131. b.Massless = true
  132. end end
  133. new:FindFirstChildWhichIsA"Humanoid":Destroy()
  134. local newerhum = oldhum:Clone()
  135. wait()
  136. lp.Character = new
  137. wait()
  138. oldroot:GetPropertyChangedSignal("Position"):Connect(function()
  139. if (oldroot.Position-newerhum.RootPart.Position).magnitude >= 5 then
  140. new:SetPrimaryPartCFrame(root.CFrame)
  141. end
  142. end)
  143. game:GetService("UserInputService").InputBegan:Connect(function(input,g)
  144. if not g and input.KeyCode == Enum.KeyCode.Space then
  145. newerhum.Jump = true
  146. newerhum:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
  147. end
  148.  
  149. end)
  150. if lp.Character:FindFirstChild"Animate" then lp.Character.Animate.Disabled = true wait(.1) lp.Character.Animate.Disabled = false end
  151. newerhum.Parent = new
  152. alreadyrunning=false
  153. end
  154. end
  155. lp.CharacterAdded:Connect(apply)
  156. apply(lp.Character)
  157. lp.Character:FindFirstChildWhichIsA"Humanoid".Health = 0
  158. rs.Heartbeat:Connect(function()
  159. if setsimulationradius then
  160. setsimulationradius(9e99,9e99)
  161. settings().Physics.AllowSleep = false
  162. end
  163. if lp.Character:FindFirstChildWhichIsA"Humanoid" then
  164. lp.Character:FindFirstChildWhichIsA"Humanoid":SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
  165. end
  166. for a, b in pairs(teleportparts) do
  167. if a and b then
  168. b.CFrame = a.CFrame
  169. b.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0,0,0)
  170. b.Massless = true
  171. b.CanCollide = false
  172.  
  173. end
  174. end
  175. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement