Advertisement
NightGamingVN

public script 7 - anti death

Jun 16th, 2019
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. --anti death by pdnghiaqoi [marseio]
  2. --pretty messy nor gay
  3.  
  4. local x = nil
  5. local y = nil
  6. local z = nil
  7. local remote = Instance.new("RemoteEvent")
  8. remote.Name = owner.UserId
  9. remote.Parent = game:GetService("ReplicatedFirst")
  10. function tpoldpos()
  11. local human = owner.Character:FindFirstChild("HumanoidRootPart")
  12. human.Position = Vector3.new(x,y,z)
  13. end
  14. function check()
  15. local humanoid = owner.Character:FindFirstChildOfClass("Humanoid")
  16. if not humanoid then
  17. local human = owner.Character:FindFirstChild("HumanoidRootPart") or owner.Character:FindFirstChild("Torso")
  18. if human then
  19. human.Anchored = true
  20. end
  21. owner:LoadCharacter()
  22. wait()
  23. tpoldpos()
  24. return
  25. end
  26. if humanoid.Health ~= humanoid.MaxHealth and humanoid.Health > 0 then humanoid.Health = humanoid.MaxHealth end
  27. if humanoid.Health <= 0 then
  28. owner:LoadCharacter()
  29. wait()
  30. tpoldpos()
  31. end
  32. end
  33. spawn(function()
  34. while wait() do
  35. if not owner.Character then
  36. owner:LoadCharacter()
  37. wait()
  38. tpoldpos()
  39. end
  40. local humanoid = owner.Character:FindFirstChildOfClass("Humanoid")
  41. local human = owner.Character:FindFirstChild("HumanoidRootPart") or owner.Character:FindFirstChild("Torso")
  42. if not humanoid and not owner.Character then
  43. humanoid = owner.Character:FindFirstChildOfClass("Humanoid")
  44. end
  45. if not human then
  46. return
  47. end
  48. x = human.Position.X
  49. y = human.Position.Y
  50. z = human.Position.Z
  51. check()
  52. end
  53. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement