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
 

Would this still work, as for a Game Pass?

Previous Thread :: Next Thread 
iCruze is not online. iCruze
Joined: 06 Aug 2012
Total Posts: 4361
26 Mar 2013 11:56 PM
So, this Points OnEntered script for sure works with a t-shirt, as I do not know with a game pass.
Would a gamepass still be considered a texture / if not, what to change?


permission = {"iCruze"}
texture = "http://www.roblox.com/asset/?id=109758253"
local Points = 250

function checkOkToLetIn(name)
for i = 1,#permission do
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end

game.Players.PlayerAdded:connect(function(p)
local stats = p:findFirstChild("leaderstats")
Wait(1)
print("Player Joined")
if p.Character.Torso.roblox.Texture == texture then
print("Player is VIP")
p:findFirstChild("leaderstats").Credits.Value = Points
elseif (checkOkToLetIn(p.Name)) then
p:findFirstChild("leaderstats").Credits.Value = Points


end
end)

--iCruze

If you can give me an answer, that'd be great.


-iC ツ
Report Abuse
iCruze is not online. iCruze
Joined: 06 Aug 2012
Total Posts: 4361
27 Mar 2013 09:17 AM
Bump, as I am struggling over this.

-iC ツ
Report Abuse
mylifeis2cooldlol is not online. mylifeis2cooldlol
Joined: 08 Mar 2011
Total Posts: 874
27 Mar 2013 09:27 AM
http://wiki.roblox.com/index.php/Game_Pass


Perfect site for you...explains everything

--Mylife
Report Abuse
PlusJon is not online. PlusJon
Joined: 27 Sep 2012
Total Posts: 1522
27 Mar 2013 10:37 AM
local points = 250;
local passID = 1337;

function hasPass(p, ID)
   return game:GetService("GamePassService"):PlayerHasPass(p, ID)
end)

game.Players.PlayerAdded:connect(function(p)
   p:WaitForChild("leaderstats")
   p:WaitForChild("Credits")
   if hasPass(p, passID) then
      p.leaderstats.Credits.Value = points
   end
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