|
| 10 Aug 2014 04:21 PM |
local version = 1.1 print("EncodedLua's GamePass Perks Script " .. version .. " loaded!")
local gamepasses = { [171096080] = {--Health +50 ["FireOnPlayerDeath"] = false, -- Will ["Action"] run when the player dies? ["Action"] = function(player) -- Action that fires if the joining player has the pass with the id of passId player.Character.Humanoid.MaxHealth=player.Character.Humanoid.MaxHealth+50 player.Character.Humanoid.Health=player.Character.Humanoid.MaxHealth end, }, }
game.Players.PlayerAdded:connect(function(player) local GamePassService = game:GetService("GamePassService") for i, v in pairs(gamepasses) do if GamePassService:PlayerHasPass(player, i) then v["Action"](player) end end player.CharacterRemoving:connect(function() player.CharacterAdded:connect(function(character) for i, v in pairs(gamepasses) do if GamePassService:PlayerHasPass(player, i) and v["FireOnPlayerDeath"] then v["Action"](player) end end end) end) end)
This wont work when you die your health goes back to normal. |
|
|
| Report Abuse |
|
|
ehern11
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1541 |
|
| |
|
|
| 10 Aug 2014 04:37 PM |
| Your right, my Dev Team Partner did. EncodedLua |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 10 Aug 2014 05:22 PM |
| NVM Encoded figured it out :D |
|
|
| Report Abuse |
|
|