Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Rufus14, works on r6 aswell on r15 (WORKS ON EVERY SERVER), press z to die (RUN AS LOCAL)
- character = game:GetService("Players").LocalPlayer.Character
- humanoid = character:findFirstChildOfClass("Humanoid")
- mouse = game:GetService("Players").LocalPlayer:GetMouse()
- canuncollide = true
- function die()
- print("dead")
- local rootcframe = character.HumanoidRootPart.CFrame
- local deadsign = Instance.new("BoolValue", character)
- deadsign.Name = "ImDead"
- character.HumanoidRootPart:destroy()
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "MeshPart" or v.ClassName == "Part" then
- local position = Instance.new("CFrameValue", v)
- position.Name = "LimbPosition"
- position.Value = v.CFrame
- end
- end
- if character:findFirstChild("UpperTorso") then
- wait(1)
- elseif character:findFirstChild("Torso") then
- wait(3)
- end
- local function uncollide()
- while game:GetService("RunService").Stepped:wait() and canuncollide do
- if canuncollide then
- if character:findFirstChild("Torso") then
- character.Torso.CanCollide = false
- end
- end
- end
- end
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "MeshPart" or v.ClassName == "Part" and v:findFirstChild("LimbPosition") then
- local gyro = Instance.new("BodyGyro", v)
- gyro.CFrame = v.LimbPosition.Value
- if v.Name == "Torso" then
- spawn(uncollide)
- end
- for i = 0,0.7 , 0.08 do
- v.CFrame = v.CFrame:lerp(v.LimbPosition.Value, i)
- game:GetService("RunService").RenderStepped:wait()
- end
- local bodypos = Instance.new("BodyPosition", v)
- bodypos.Position = v.LimbPosition.Value.p
- bodypos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- end
- end
- while game:GetService("Players").LocalPlayer.Character:findFirstChild("ImDead") do
- game:GetService("RunService").RenderStepped:wait()
- end
- canuncollide = false
- print("teleporting")
- game:GetService("Players").LocalPlayer.Character:WaitForChild("HumanoidRootPart")
- if game:GetService("Players").LocalPlayer.Character:findFirstChild("ForceField") then
- game:GetService("Players").LocalPlayer.Character:findFirstChild("ForceField"):destroy()
- end
- for i = 1,8 do
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = rootcframe
- wait()
- end
- end
- function press(key)
- key = key:lower()
- if key == "z" and canuncollide then
- humanoid.Health = 0
- end
- end
- mouse.KeyDown:connect(press)
- humanoid.Died:connect(die)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement