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: NEED HELP FOR A GAMEPASS SCRIPT

Previous Thread :: Next Thread 
superyoda08 is not online. superyoda08
Joined: 01 May 2010
Total Posts: 30107
25 Aug 2014 11:29 PM
Basicly I need help for a gamepass script, when a user enters a game they get a hat.

Players = game:GetService("Players")
GamePassService = game:GetService("MarketplaceService")
PassId = ID
Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
if GamePassService:PlayerHasPass(Player.userId, PassId) then
Spawn(function()


^^^ Im asumming its like that, but i dont know the last line.. helP?

69k/100k
Report Abuse
Vuxz is not online. Vuxz
Joined: 23 Dec 2011
Total Posts: 7217
25 Aug 2014 11:33 PM
gps = game:GetService("GamePassService");

id = 000000 --id here

game.Players.PlayerAdded:connect(function(Player)
Player:WaitForDataReady()
if gps:PlayerHasPass(Player , id.Value) then
coroutine.resume(coroutine.create(function()
while wait() do
repeat wait() until Player.Character~=nil
hat = game.Lighting.Hat:clone() -- change hat name and put hat in lighting
hat.Parent = Player.Character
end
end))
end
end)
Report Abuse
smunkey is not online. smunkey
Joined: 17 Dec 2011
Total Posts: 342
25 Aug 2014 11:33 PM
game.newPlayer.playerAdded()

or something like that
Report Abuse
Vuxz is not online. Vuxz
Joined: 23 Dec 2011
Total Posts: 7217
25 Aug 2014 11:38 PM
--Sorry, accidentally messed up the last post.

gps = game:GetService("GamePassService")

id = 000000 --id here

game.Players.PlayerAdded:connect(function(Player)
Player:WaitForDataReady()
if gps:PlayerHasPass(Player , id) then
coroutine.resume(coroutine.create(function()
while wait() do
repeat wait() until Player.Character~=nil
hat = game.Lighting.Hat:clone() -- change hat name and put hat in lighting
hat.Parent = Player.Character
end
end))
end
end)
Report Abuse
superyoda08 is not online. superyoda08
Joined: 01 May 2010
Total Posts: 30107
26 Aug 2014 02:29 AM
^ worked but causes lag because it does not stop being place on the cahracter
Report Abuse
superyoda08 is not online. superyoda08
Joined: 01 May 2010
Total Posts: 30107
26 Aug 2014 01:47 PM
Morning scripters help?
Report Abuse
superyoda08 is not online. superyoda08
Joined: 01 May 2010
Total Posts: 30107
26 Aug 2014 01:59 PM
arudooa
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