Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --anti death by pdnghiaqoi [marseio]
- --pretty messy nor gay
- local x = nil
- local y = nil
- local z = nil
- local remote = Instance.new("RemoteEvent")
- remote.Name = owner.UserId
- remote.Parent = game:GetService("ReplicatedFirst")
- function tpoldpos()
- local human = owner.Character:FindFirstChild("HumanoidRootPart")
- human.Position = Vector3.new(x,y,z)
- end
- function check()
- local humanoid = owner.Character:FindFirstChildOfClass("Humanoid")
- if not humanoid then
- local human = owner.Character:FindFirstChild("HumanoidRootPart") or owner.Character:FindFirstChild("Torso")
- if human then
- human.Anchored = true
- end
- owner:LoadCharacter()
- wait()
- tpoldpos()
- return
- end
- if humanoid.Health ~= humanoid.MaxHealth and humanoid.Health > 0 then humanoid.Health = humanoid.MaxHealth end
- if humanoid.Health <= 0 then
- owner:LoadCharacter()
- wait()
- tpoldpos()
- end
- end
- spawn(function()
- while wait() do
- if not owner.Character then
- owner:LoadCharacter()
- wait()
- tpoldpos()
- end
- local humanoid = owner.Character:FindFirstChildOfClass("Humanoid")
- local human = owner.Character:FindFirstChild("HumanoidRootPart") or owner.Character:FindFirstChild("Torso")
- if not humanoid and not owner.Character then
- humanoid = owner.Character:FindFirstChildOfClass("Humanoid")
- end
- if not human then
- return
- end
- x = human.Position.X
- y = human.Position.Y
- z = human.Position.Z
- check()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement