|
| 18 Nov 2013 05:41 AM |
Hello I am stuck on how to be able to make it so if you buy a certain pass you get let's say 15 extra health and like 1 walkspeed my current script I am using:
game.Players.PlayerAdded:connect(function(player)
local VIP = game.Lighting.VIP:GetChildren() for i = 1,#VIP do if game:GetService("GamePassService"):PlayerHasPass(player, 104035285) --Edit id here then if VIP[i].Name == "Minigun" --Add name here then VIP[i]:Clone().Parent = player.Backpack VIP[i]:Clone().Parent = player.StarterGear --I changed from "v" to "VIP" end end end end)
This correct script right? |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2013 05:46 AM |
Help would be appreciated.
I meant to say This is correct script right? |
|
|
| Report Abuse |
|
|
BenBonez
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 19362 |
|
|
| 18 Nov 2013 05:48 AM |
game.Players.PlayerAdded:connect(function(player) if game:GetService("GamePassService"):PlayerHasPass(player, 104035285) then repeat wait() until player.Character player.Character.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Walkspeed = character.Humanoid.Walkspeed + 1 character.Humanoid.MaxHealth = character.Humanoid.MaxHealth + 15 end end) end)
local VIP = game.Lighting.VIP:GetChildren() for i = 1,#VIP do --Edit id here then if VIP[i].Name == "Minigun" --Add name here then VIP[i]:Clone().Parent = player.Backpack VIP[i]:Clone().Parent = player.StarterGear --I changed from "v" to "VIP" end end end |
|
|
| Report Abuse |
|
|
BenBonez
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 19362 |
|
|
| 18 Nov 2013 05:49 AM |
| Whoops forgot to delete that, ignore the part starting with "local VIP" |
|
|
| Report Abuse |
|
|
| |
|