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: Hi I need a bit of help with game passes.

Previous Thread :: Next Thread 
Zwabb is not online. Zwabb
Joined: 14 Jun 2009
Total Posts: 1002
11 Apr 2014 02:35 PM
[ Content Deleted ]
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
11 Apr 2014 02:39 PM
What EXACTLY do you need help with?
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
11 Apr 2014 02:44 PM
illumina = game.ServerStorage.Illumina:clone()
illuminaPassId = 000000

function getPass(player, passId, item)
if game:GetService("GamePassService"):PlayerHasPass(player, passId) then
item().Parent = player.Backpack
item().Parent = player.StarterGear
end
end

game.Players.PlayerAdded:connect(function(player)
player:WaitForDataReady()
getPass(player, illuminaPassId, illumina) --ARGS: player that entered, passId, item _____to give (must be a defined variable)

end)

This is basically a function that will give a player a tool if they have a pass. It will clone the tool and put it in their backpack and starter gear.
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
11 Apr 2014 02:45 PM
Oops, typo. This is what the function should look like.

function getPass(player, passId, item)
if game:GetService("GamePassService"):PlayerHasPass(player, passId) then
item:clone().Parent = player.Backpack
item:clone().Parent = player.StarterGear
end
end
Report Abuse
Zwabb is not online. Zwabb
Joined: 14 Jun 2009
Total Posts: 1002
11 Apr 2014 03:09 PM
[ Content Deleted ]
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
11 Apr 2014 03:31 PM
illumina = game.ServerStorage.Illumina:clone() --The location of the tool *TOOL LOCATION HERE*
illuminaPassId = 000000 --the ID of the pass you need *PASS ID HERE*



function getPass(player, passId, item)
if game:GetService("GamePassService"):PlayerHasPass(player, passId) then
item().Parent = player.Backpack
item().Parent = player.StarterGear
end
end



game.Players.PlayerAdded:connect(function(player) --player the person that joins the game
player:WaitForDataReady()
getPass(player, illuminaPassId, illumina) --ARGS: player that entered, passId, item _____to give (must be a defined variable)

end)

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