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
 

Re: Extra cash with Gamepass

Previous Thread :: Next Thread 
Poloboy567 is not online. Poloboy567
Joined: 24 Jun 2008
Total Posts: 62
08 Jul 2014 04:02 PM
How would I make it so when a player with a certain gamepass kills a zombie they get more points than a player without it would? I can't seem to figure out how to implement it into this script:

local Humanoid = script.Parent.Zombie
function onKill()
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:findFirstChild("leaderstats")
if Leaderstats ~= nil then
Leaderstats.Money.Value = Leaderstats.Money.Value + 1 --Change Money to the stat that is increased.
wait(0.1)
script:remove()
end
end
end
end
Humanoid.Died:connect(onKill)
Report Abuse
Poloboy567 is not online. Poloboy567
Joined: 24 Jun 2008
Total Posts: 62
09 Jul 2014 06:21 AM
Bump. I need help as soon as possible please.
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
09 Jul 2014 06:25 AM
im not going to tell you WHERE to put this

money = 1 --base money with no gamepass
if game:GetService("GamePassService"):PlayerHasPass(tag.Value, passId) then
money = 10 --money WITH gamepass
end

Leaderstats.Money.Value = Leaderstats.Money.Value + money
Report Abuse
Poloboy567 is not online. Poloboy567
Joined: 24 Jun 2008
Total Posts: 62
09 Jul 2014 02:44 PM
Thanks man, I know exactly what to do. When I tried coding it I was putting 'tag' instead of 'tag.Value'. Thanks for your help!
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