Answered by
8 years ago Edited 8 years ago
The way your code is written, the first gamepass that the Player has purchased, in the order you have typed them, is the only one they get. elseif
doesn't trigger if a previous if
or elseif
in the same 'tree' triggered:
02 | game.Players.PlayerAdded:connect( function (player) |
03 | if game.GamePassService:PlayerHasPass(player, 574426548 ) then |
04 | player.CharacterAdded:connect( function (char) |
05 | if char:WaitForChild( "Humanoid" ) then |
06 | char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 10 |
07 | char.Humanoid.Health = char.Humanoid.Health + 10 |
08 | game.Lighting.WoodenSword:Clone().Parent = player.Backpack |
12 | if game.GamePassService:PlayerHasPass(player, 574427239 ) then |
13 | player.CharacterAdded:connect( function (char) |
14 | if char:WaitForChild( "Humanoid" ) then |
15 | char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 25 |
16 | char.Humanoid.Health = char.Humanoid.Health + 25 |
17 | game.Lighting.SubspaceTripmine:Clone().Parent = player.Backpack |
21 | if game.GamePassService:PlayerHasPass(player, 574430612 ) then |
22 | player.CharacterAdded:connect( function (char) |
23 | if char:WaitForChild( "Humanoid" ) then |
24 | char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 50 |
25 | char.Humanoid.Health = char.Humanoid.Health + 50 |
26 | game.Lighting.EpicKatana:Clone().Parent = player.Backpack |
30 | if game.GamePassService:PlayerHasPass(player, 574437515 ) then |
31 | player.CharacterAdded:connect( function (char) |
32 | if char:WaitForChild( "Humanoid" ) then |
33 | char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 75 |
34 | char.Humanoid.Health = char.Humanoid.Health + 75 |
35 | game.Lighting.RayGunBio:Clone().Parent = player.Backpack |
39 | if game.GamePassService:PlayerHasPass(player, 574439700 ) then |
40 | player.CharacterAdded:connect( function (char) |
41 | if char:WaitForChild( "Humanoid" ) then |
42 | char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 100 |
43 | char.Humanoid.Health = char.Humanoid.Health + 100 |
44 | game.Lighting.Phoenix:Clone().Parent = player.Backpack |
48 | if game.GamePassService:PlayerHasPass(player, 574441188 ) then |
49 | player.CharacterAdded:connect( function (char) |
50 | if char:WaitForChild( "Humanoid" ) then |
51 | char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 200 |
52 | char.Humanoid.Health = char.Humanoid.Health + 200 |
53 | game.Lighting [ "Ro-Orb" ] :Clone().Parent = player.Backpack |
54 | game.Lighting.Darkheart:Clone().Parent = player.Backpack |