generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Add health to pass vip

Previous Thread :: Next Thread 
DeathByChina is not online. DeathByChina
Joined: 26 Apr 2010
Total Posts: 515
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
DeathByChina is not online. DeathByChina
Joined: 26 Apr 2010
Total Posts: 515
18 Nov 2013 05:46 AM
Help would be appreciated.

I meant to say This is correct script right?
Report Abuse
BenBonez is not online. 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 is not online. 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
DeathByChina is not online. DeathByChina
Joined: 26 Apr 2010
Total Posts: 515
18 Nov 2013 06:04 AM
Thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image