Zwabb
|
  |
| Joined: 14 Jun 2009 |
| Total Posts: 1002 |
|
| |
|
|
| 11 Apr 2014 02:39 PM |
| What EXACTLY do you need help with? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 14 Jun 2009 |
| Total Posts: 1002 |
|
| |
|
|
| 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 |
|
|