|
| 25 Aug 2014 08:10 PM |
So I wrote this
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) i = 100 repeat wait() until char.Humanoid.Health ~= i char:breakJoints() end) end)
The godmode exploit is tricky. I can't seem to pick it up as a number value above 100 or below 0. I'd like the player to be able to heave health below 0 but not anything besides that. I also tried this.
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) for i = 0, 100 repeat wait() until char.Humanoid.Health ~= i char:breakJoints() end end) end)
That just killed the player when they spawned... Any ideas?
Jesus saves. Let him in your heart! |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2014 08:14 PM |
You can use the .HealthChanged event on the humanoid
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) char.Humanoid.HealthChanged:connect(function () if char.Humanoid.Health < 0 or char.Humanoid.Health > 10000 then char:breakJoints() end end) end) end) |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2014 08:15 PM |
Thats why .Changed didn't work... THANKS
Jesus saves. Let him in your heart! |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2014 08:32 PM |
This is weird.. I did this and I makes the player godmode. e.e
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) char.Humanoid.HealthChanged:connect(function() if char.Humanoid.Health < 100 or char.Humanoid.Health == 100 then char.Humanoit.Health = char.Humanoid.Health else char:breakJoints() end end) end) end)
Jesus saves. Let him in your heart! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 Aug 2014 01:35 PM |
local p=game.Players.LocalPlayer repeat wait(.03)until p.Character p.Character:WaitForChild'Humanoid'.HealthChanged:connect(function(a) if a>100 then p.Character:BreakJoints() end end)
I'd suggest making this a LocalScript and put it in StarterGui/Pack |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2014 03:16 PM |
Nvm, I fixed it. What I was testing with changed the MaxHealth and got me all confused. But thanks!
Jesus saves. Let him in your heart! |
|
|
| Report Abuse |
|
|