Advertisement
_______homie_______

Untitled

Jul 27th, 2022 (edited)
1,326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. _G.enabled = true -- Re-execute to turn off
  2. _G.speed = 100 -- Keep around 100 or it wont play
  3.  
  4. -- Variables
  5. local RunService = game:GetService("RunService");
  6. local Players = game:GetService("Players");
  7. local LocalPlayer = game:GetService("Players").LocalPlayer;
  8.  
  9. local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait();
  10. local Humanoid = Character:WaitForChild("Humanoid") or Character:FindFirstChildOfClass("Humanoid");
  11. local HRP = Humanoid.RootPart or Humanoid:FindFirstChild("HumanoidRootPart")
  12.  
  13. -- Check
  14. if not Humanoid or not _G.enabled then
  15. if Humanoid and Humanoid.Health <= 0 then
  16. Humanoid:Destroy()
  17. end
  18. return
  19. end
  20.  
  21. -- Setting Up Humanoid
  22. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  23. Humanoid.BreakJointsOnDeath = false
  24. Humanoid.RequiresNeck = false
  25.  
  26. local con; con = RunService.Stepped:Connect(function()
  27. if not Humanoid then return con:Disconnect() end
  28. Humanoid:ChangeState(Enum.HumanoidStateType.Running) -- Change state so not die
  29. end)
  30.  
  31. -- Infinite Death [literally 3 lines dont make it complicated]
  32. LocalPlayer.Character = nil
  33. LocalPlayer.Character = Character
  34. task.wait(Players.RespawnTime + 0.1)
  35.  
  36. -- Looping Death
  37. while task.wait(1/_G.speed) do
  38. Humanoid:ChangeState(Enum.HumanoidStateType.Dead)
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement