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 » Scripters
Home Search
 

Re: Anyone knows how to do the GamePass Script ???? READ!!!

Previous Thread :: Next Thread 
WAHJH is not online. WAHJH
Joined: 10 Mar 2017
Total Posts: 1006
01 Jul 2017 08:51 AM
Anyone can copy paste a script of an example? If if bought gamepass , receive the gear items?
Report Abuse
HolyBiscuit69 is not online. HolyBiscuit69
Joined: 26 Jul 2015
Total Posts: 388
01 Jul 2017 08:57 AM
local GamePassService = game:GetService("GamePassService")
local player = game.Players.LocalPlayer
local GamePassId = INSERT NINE DIGIT ID
local tool = workspace.Tool


if GamePassService:PlayerHasPass(player, GamePassId) then
tool.Parent = player.BackPack
end


Your lack of Robux disturbs me.
Report Abuse
HolyBiscuit69 is not online. HolyBiscuit69
Joined: 26 Jul 2015
Total Posts: 388
01 Jul 2017 08:59 AM
Keep in mind that this has to be in a LocalScript for it to work. So put it in StarterPlayerScripts.


Your lack of Robux disturbs me.
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
01 Jul 2017 09:09 AM
--put the tools inside the script and put the script inside ServerScriptService
--use a Script not a LocalScript and make sure to put the right gamepassid bellow:
local gpid=1234567--gamepassid
local Players=game:GetService"Players"
local a
do
local GamePassService=game:GetService"GamePassService"
function a(char)wait(.6)
local player=Players:GetPlayerFromCharacter(char)
if GamePassService:PlayerHasPass(player,gpid)then
for i,v in ipairs(script:GetChildren())do
v:Clone().Parent=player:FindFirstChildOfClass"Backpack"
end
end
end
end
Players.PlayerAdded:Connect(function(player)
local char=player.Character
if char then a(char)end
player.CharacterAdded:Connect(a)
end)
Report Abuse
WAHJH is not online. WAHJH
Joined: 10 Mar 2017
Total Posts: 1006
02 Jul 2017 06:14 AM
Okay Thanks :D ill try it out !!!
Report Abuse
WAHJH is not online. WAHJH
Joined: 10 Mar 2017
Total Posts: 1006
02 Jul 2017 06:37 AM
Thanks Milenveliki it worked out for me :D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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