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: gamepass service.

Previous Thread :: Next Thread 
Motofied is online. Motofied
Joined: 26 May 2014
Total Posts: 3050
27 Feb 2017 07:49 AM
Can someone possibly start me a script where if the player has the gamepass they get +5000 cash when they enter a server. I've tried making this and failed.


#code print('My name is Moto and who cares?')
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
27 Feb 2017 08:07 AM
local ms = game:GetService("MarketPlaceService");
local pass = 00194823527835903485293853498524542344523592830305837475;

game.Players.PlayerAdded:connect(function(plr)
if ms:PlayerOwnsAsset(plr,pass) then
--award
end
end


Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
27 Feb 2017 08:08 AM
Lol but my dude people could leave and join and join and leave and leave and join and become billionaires


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
27 Feb 2017 09:05 AM
datastores


Report Abuse
malakh_hamavet is not online. malakh_hamavet
Joined: 19 Dec 2011
Total Posts: 1176
27 Feb 2017 09:11 AM
PassId = 666869112
game:GetService("Players").PlayerAdded:connect(function(Player)
if game:GetService("GamePassService"):PlayerHasPass(Player, PassId) then
wait(1)
Player:WaitForChild("leaderstats"):WaitForChild("Points").Value = 5000

print("worked")
end
end)

tested, works. i use for my game.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
27 Feb 2017 03:17 PM
^PlayerHasPass returns cached results from the start of the server. Not saying you're wrong but if ya don't want players to have to rejoin upon purchasing their passes, use PlayerOwnsAsset.


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