Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local lp = game:GetService("Players").LocalPlayer
- local rs = game:GetService("RunService")
- local stored = {}
- function setupJoints()
- local char = lp.Character
- local new = {}
- for i, v in pairs(char:GetDescendants()) do
- if v:IsA"Motor6D" then
- new[v.Part1.Name] = v
- end
- end
- stored=new
- return new
- end
- setupJoints(lp.Character)
- _G.runninganimations = {}
- _G.tosequence = function(id)
- print(id)
- local animation = game:GetObjects("rbxassetid://"..tostring(id))[1]
- animation.Parent = workspace
- animation:ClearAllChildren()
- return string.gsub(animation.AnimationId,"[^%-%d]", "")
- end
- local ts = game:GetService"TweenService"
- _G.animate = function(id,speed,dontloop)
- local dontloop = false or dontloop
- local speed = speed or 1
- local index = #_G.runninganimations+1
- _G.runninganimations[index]=true
- local animation = game:GetObjects("rbxassetid://"..tostring(id))[1]
- animation.Parent = workspace
- coroutine.wrap(function()
- repeat wait()
- if lp.Character:FindFirstChild"Animate" then lp.Character.Animate.Disabled = true end
- for i,v in pairs(lp.Character.Humanoid:GetPlayingAnimationTracks()) do
- v:Stop() end local lastvalue = 0
- local char = lp.Character
- for _,frame in pairs(animation:GetChildren()) do
- for i, pose in pairs(frame:GetDescendants()) do
- if pose.Name ~= char:FindFirstChildWhichIsA"Humanoid".RootPart.Name then
- local z = setupJoints()[pose.Name]
- if z then
- local t = ts:Create(z,TweenInfo.new((frame.Time-lastvalue)/speed,Enum.EasingStyle[tostring(pose.EasingStyle):gsub("Enum.PoseEasingStyle.", "")]),{Transform = pose.CFrame})
- lastvalue=frame.Time
- t:Play()
- end
- end
- end
- wait((frame.Time-lastvalue)/speed)
- end
- until not char or not animation.Loop or not _G.runninganimations[index] or dontloop
- if lp.Character:FindFirstChild"Animate" then lp.Character.Animate.Disabled = false end
- end)()
- return index
- end
- local fakecharacters = {}
- local teleportparts = {}
- function applygod()
- local lp = game.Players.LocalPlayer
- local char = lp.Character;char.Archivable = true
- local new = char:Clone()
- new.Parent = workspace
- lp.Character= new
- fakecharacters[#fakecharacters+1]=new
- wait(2)
- local oldhum = char:FindFirstChildWhichIsA"Humanoid"
- local newhum = oldhum:Clone()
- newhum.Parent = char
- oldhum:Remove()
- wait(2)
- lp.Character = char
- return table.unpack({new,oldhum})
- end
- local alreadyrunning = false
- function apply(char)
- if not alreadyrunning and not table.find(fakecharacters,char) then
- for _,v in pairs(fakecharacters) do v:Destroy() end
- alreadyrunning = true
- local oldroot = char:FindFirstChildWhichIsA"Humanoid".RootPart
- wait(.5)
- local new, oldhum = applygod()
- wait(1)
- char:FindFirstChildWhichIsA"Humanoid".Health = 0
- wait(1)
- for i,a in pairs(new:GetChildren()) do
- if a:IsA"BasePart" and char:FindFirstChild(a.Name) then
- local b= char:FindFirstChild(a.Name)
- b.Name = "Part"
- b.CanCollide = false
- b.Transparency = 1
- b.Parent = new
- local aa = Instance.new("Attachment",a)
- local ba = Instance.new("Attachment",b)
- local hinge = Instance.new("HingeConstraint",b)
- hinge.Attachment0=aa hinge.Attachment1=ba
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.Restitution = 0
- hinge.UpperAngle = 0
- teleportparts[a]=b
- b.Massless = true
- if b:FindFirstChildWhichIsA"Decal" then
- b:FindFirstChildWhichIsA"Decal":Destroy() end
- end
- end
- for i,a in pairs(new:GetChildren()) do
- if a:IsA"Accessory" and char:FindFirstChild(a.Name) then
- local b= char:FindFirstChild(a.Name)['Handle']
- local a = a["Handle"]
- b.Name = "Part"
- b.CanCollide = false
- b.Transparency = 0
- b.Parent = new
- local aa = Instance.new("Attachment",a)
- local ba = Instance.new("Attachment",b)
- local hinge = Instance.new("HingeConstraint",b)
- hinge.Attachment0=aa hinge.Attachment1=ba
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.Restitution = 0
- hinge.UpperAngle = 0
- teleportparts[a]=b
- b.Massless = true
- end end
- new:FindFirstChildWhichIsA"Humanoid":Destroy()
- local newerhum = oldhum:Clone()
- wait()
- lp.Character = new
- wait()
- oldroot:GetPropertyChangedSignal("Position"):Connect(function()
- if (oldroot.Position-newerhum.RootPart.Position).magnitude >= 5 then
- new:SetPrimaryPartCFrame(root.CFrame)
- end
- end)
- game:GetService("UserInputService").InputBegan:Connect(function(input,g)
- if not g and input.KeyCode == Enum.KeyCode.Space then
- newerhum.Jump = true
- newerhum:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
- end
- end)
- if lp.Character:FindFirstChild"Animate" then lp.Character.Animate.Disabled = true wait(.1) lp.Character.Animate.Disabled = false end
- newerhum.Parent = new
- alreadyrunning=false
- end
- end
- lp.CharacterAdded:Connect(apply)
- apply(lp.Character)
- lp.Character:FindFirstChildWhichIsA"Humanoid".Health = 0
- rs.Heartbeat:Connect(function()
- if setsimulationradius then
- setsimulationradius(9e99,9e99)
- settings().Physics.AllowSleep = false
- end
- if lp.Character:FindFirstChildWhichIsA"Humanoid" then
- lp.Character:FindFirstChildWhichIsA"Humanoid":SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
- end
- for a, b in pairs(teleportparts) do
- if a and b then
- b.CFrame = a.CFrame
- b.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0,0,0)
- b.Massless = true
- b.CanCollide = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement