|
| 31 Mar 2014 08:55 PM |
Id = "http://www.roblox.com/asset/?id="
function Respawn(p) wait(5) if p.Character.Torso.roblox.Texture == Id then p.Character.Humanoid.MaxHealth = p.Character.Humanoid.MaxHealth + 10000 p.Character.Humanoid.Health = p.Character.Humanoid.Health + 10000
end end function onPlayerAdded(p) p.Changed:connect(function(property) if property == "Character" then Respawn(p) end end) end
game.Players.ChildAdded:connect(onPlayerAdded)
^Theres the script I need help making it so changing the ID will work for gamepasses, because at the moment it only works for t-shirts. |
|
|
| Report Abuse |
|
|
| |
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 01 Apr 2014 03:33 PM |
You're using a T-Shirt instead of a gamepass
passid = 0 -- gamepass ID h = 500 -- The health you get with the gamepass
game.Players.PlayerAdded:connect(function(p) if game:GetService("GamePassService"):PlayerHasPass(passid,p) then p.CharacterAdded:connect(function(c) c.Humanoid.MaxHealth = h c.Humanoid.Health = c.Humanoid.MaxHealth end) end end)
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 01 Apr 2014 03:35 PM |
local id = --PassIDHere(Last about 6 numbers of the URL)
game.Players.PlayerAdded:connect(function(plr) plr:WaitForDataReady() if Game:GetService("GamePassService"):PlayerHasPass(plr, id) then plr.CharacterAdded:connect(function(char) wait(5) p.Character.Humanoid.MaxHealth = p.Character.Humanoid.MaxHealth + 10000 p.Character.Humanoid.Health = p.Character.Humanoid.Health + 10000 end)end end)
|
|
|
| Report Abuse |
|
|
Scriptury
|
  |
| Joined: 21 Aug 2013 |
| Total Posts: 220 |
|
|
| 01 Apr 2014 03:36 PM |
| You might want to add a WaitForChild to Jonibus' script as it takes time for a humanoid to replicate which is dangerous considering the speed of CharacterAdded. |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 01 Apr 2014 03:39 PM |
passid = 0 -- gamepass ID h = 500 -- The health you get with the gamepass
game.Players.PlayerAdded:connect(function(p) p:WaitForDataReady() if game:GetService("GamePassService"):PlayerHasPass(passid,p) then p.CharacterAdded:connect(function(c) repeat wait() until c:findFirstChild("Humanoid") c.Humanoid.MaxHealth = h c.Humanoid.Health = c.Humanoid.MaxHealth end) end end)
Improved it.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
|
| 01 Apr 2014 05:13 PM |
| @jon I need it to ADD to health, not equal it. |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 01 Apr 2014 07:54 PM |
It's a very easy fix to change it to how you want.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
| |
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 01 Apr 2014 08:46 PM |
passid = 0 -- gamepass ID h = 500 -- The health you add
game.Players.PlayerAdded:connect(function(p) p:WaitForDataReady() if game:GetService("GamePassService"):PlayerHasPass(passid,p) then p.CharacterAdded:connect(function(c) repeat wait() until c:findFirstChild("Humanoid") c.Humanoid.MaxHealth = c.Humanoid.MaxHealth + h c.Humanoid.Health = c.Humanoid.MaxHealth end) end end)
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Apr 2014 09:02 PM |
Doesnt seem to be working... I put in my own game pass, and it didnt work, then I tried the test gamepass, and it didnt work either. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 04 Apr 2014 11:37 AM |
ID =
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) repeat wait() until c if game:GetService("GamePassService"):PlayerHasPass(p,ID) then c.Humanoid.MaxHealth = c.Humanoid.MaxHealth + 10000 wait(.3) c.Humanoid.Health = c.Humanoid.Health + 10000 end) end)
~Hyroad~ |
|
|
| Report Abuse |
|
|
|
| 05 Apr 2014 03:50 PM |
| Doesnt seem to be working? >_> |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 05 Apr 2014 05:16 PM |
passid = 0 -- gamepass ID h = 500 -- The health you add
game.Players.PlayerAdded:connect(function(p) p:WaitForDataReady() if game:GetService("GamePassService"):PlayerHasPass(p,passid) then p.CharacterAdded:connect(function(c) repeat wait() until c:findFirstChild("Humanoid") c.Humanoid.MaxHealth = c.Humanoid.MaxHealth + h c.Humanoid.Health = c.Humanoid.MaxHealth end) end end)
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|