Thot27Bits

Roblox Script Showcase Better God Mode

Oct 6th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. --[[Improved by Cit, You can press a key to respawn, and you don't lose your animation.]]
  2. --[[Good for places with lots of explosions or things that would otherwise kill you in normal math.huge godmode.]]
  3.  
  4. --[[ Press p to turn on godmode. Quickly doubletap p to respawn. ]]
  5.  
  6.  
  7.  
  8. ----------------------------------------------
  9.  
  10. local p = game.Players.LocalPlayer
  11. local char = game.Players.LocalPlayer.Character
  12. local isReset = false
  13. local mouse = p:GetMouse()
  14. local torso = char.Torso
  15. local torw = char.HumanoidRootPart.RootJoint
  16. local char_hum = char:WaitForChild'Humanoid'
  17. local selfname = game.Players.LocalPlayer.Name
  18. isGod = false
  19.  
  20. ----------------------------------------------
  21.  
  22. mouse.KeyDown:connect(function(k)
  23. if k=='p' then
  24. if isGod == false then
  25. isGod = true
  26.  
  27.  
  28.  
  29. char_hum:Destroy()
  30. local fakehum=Instance.new('Humanoid',char)
  31. fakehum:SetStateEnabled(Enum.HumanoidStateType.Dead,false)
  32. char_hum = fakehum
  33.  
  34. wlds={}
  35. for i,v in pairs(torso:children())do
  36. local cl = v:Clone()
  37. table.insert(wlds,cl)
  38. end local clj = torw:Clone()
  39.  
  40. local con
  41. function onDeath(h)
  42. -- for i,v in pairs(torso:children())do v:Destroy()end
  43.  
  44. if h <= 0 then
  45. for i,v in pairs(wlds)do
  46. local cl = v:Clone()cl.Parent=torso
  47. end
  48. -- for i,v in pairs(char:children())do if v:IsA'BasePart'then v:MakeJoints()end end
  49. local cl=clj:Clone()cl.Parent=char
  50. char_hum.Health = 100
  51. -- con:disconnect()
  52. -- con=char_hum.HealthChanged:connect(function(h)onDeath(h)end)
  53. end
  54. end
  55. con = char_hum.HealthChanged:connect(function(h)onDeath(h)end)
  56.  
  57. wait(0.1)
  58. char.Parent = game.Lighting
  59. wait(0.1)
  60. char.Parent = game.Workspace
  61.  
  62. print("Godded.")
  63.  
  64. end
  65. end
  66.  
  67. end)
  68.  
  69. mouse.KeyDown:connect(function(k)
  70. if k=='p' then
  71. if isGod == true then
  72. isGod = false
  73. wlds = {}
  74. print("Un-godded and respawned")
  75. game.Players.LocalPlayer.Character.Parent = game.Lighting
  76. p:LoadCharacter()
  77. local redo = script:Clone()
  78. redo.Parent = game.Players.LocalPlayer.Character
  79. script:Destroy()
  80.  
  81. end
  82. end
  83.  
  84.  
  85. end)
Add Comment
Please, Sign In to add comment