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: How can I make a Game Pass give you a certain item?

Previous Thread :: Next Thread 
basset is not online. basset
Joined: 16 Jun 2008
Total Posts: 14510
01 Dec 2012 04:29 PM
The Crimson Katana pass in TheGamer101's Sword Fighting Tournament is an example of this. How can I make owners of a Game Pass have a certain item upon entering the game, in this case, a skateboard? Thanks!

Here's the ID of the Game Pass-
http://www.roblox.com/unnamed-item?id=99387383
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
01 Dec 2012 04:33 PM
    game.Players.PlayerAdded:connect(function(player)
        player.CharacterAdded:wait()
        if game:GetService("GamePassService"):PlayerHasPass(player, 99387383) then
            game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.Backpack
            game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.Backpack
        end
    end)

> thedeathmaster01 <
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
01 Dec 2012 04:33 PM
To make this script work, make it a normal script in workspace. Also put the sword in lighting and replace SWORDNAMEHERE with the name of the sword inside of the quotation marks.

> thedeathmaster01 <
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
01 Dec 2012 04:35 PM
Sorry, meant skateboard.

> thedeathmaster01 <
Report Abuse
basset is not online. basset
Joined: 16 Jun 2008
Total Posts: 14510
01 Dec 2012 04:37 PM
Thank you!
Report Abuse
strikedown10 is not online. strikedown10
Joined: 03 Nov 2012
Total Posts: 4370
20 Feb 2013 08:01 AM
Does that script work for anything? And where do you put the ID for the game pass?
Report Abuse
moryo7 is online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
20 Feb 2013 08:07 AM
@Strike, yes, it will work for anything. An as for your other question...

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
if game:GetService("GamePassService"):PlayerHasPass(player, PASSIDHERE) then
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.Backpack
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.Backpack
end
end)
Report Abuse
basset is not online. basset
Joined: 16 Jun 2008
Total Posts: 14510
20 Feb 2013 05:35 PM
It's cool, this didn't need to be bumped.
Report Abuse
hotrod56478 is not online. hotrod56478
Joined: 04 Oct 2009
Total Posts: 279
12 Aug 2013 05:07 AM
That worked but how do you get it to stay after you die?
Report Abuse
Greg3679 is not online. Greg3679
Joined: 08 Jun 2011
Total Posts: 13
14 Dec 2013 11:27 AM
The script works, just after death, it goes away....
Report Abuse
strikedown10 is not online. strikedown10
Joined: 03 Nov 2012
Total Posts: 4370
17 Dec 2013 06:04 PM
Update broke it. I have the same problem now. Did not before.
Report Abuse
minecraftbosslord is not online. minecraftbosslord
Joined: 07 Jun 2013
Total Posts: 80
24 Dec 2013 12:34 AM
Pretty cool needs updated
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
24 Dec 2013 12:54 AM
--This should make it stay after they die. Extreme productions.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
if game:GetService("GamePassService"):PlayerHasPass(player, PASSIDHERE) then
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.Backpack
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.StarterGear
end
end)
Report Abuse
minecraftbosslord is not online. minecraftbosslord
Joined: 07 Jun 2013
Total Posts: 80
24 Dec 2013 11:44 AM
wait when it says game service do I put the whole thing there or just the game id
Report Abuse
DokTurKai is not online. DokTurKai
Joined: 14 Nov 2012
Total Posts: 32
12 Apr 2014 11:00 AM
How do I make the script go into the workspace..
Report Abuse
majekman30 is not online. majekman30
Joined: 30 Jun 2013
Total Posts: 4
27 Jun 2014 12:12 PM
what do i put on GAMEPASS SERVICE?
Report Abuse
IridiumKills is not online. IridiumKills
Joined: 03 Dec 2013
Total Posts: 187
27 Jun 2014 12:22 PM
You put nothing in GamePassService, that part is just telling the script to use ROBLOX's GamePassService. The only thing you need to worry about is the GAMEPASSHERE and the SWORDNAMEHERE
Report Abuse
IridiumKills is not online. IridiumKills
Joined: 03 Dec 2013
Total Posts: 187
27 Jun 2014 12:22 PM
I meant PASSIDHERE instead of GAMEPASSHERE
Report Abuse
majekman30 is not online. majekman30
Joined: 30 Jun 2013
Total Posts: 4
27 Jun 2014 03:54 PM
ok thanks for the tip but when i did everything everybody suggested i didnt get the weapon i wanted for the gamepass. i didnt get any weapon.
Report Abuse
majekman30 is not online. majekman30
Joined: 30 Jun 2013
Total Posts: 4
27 Jun 2014 04:22 PM
plz help wit this problem
Report Abuse
Kirbyfan56 is not online. Kirbyfan56
Joined: 29 Oct 2007
Total Posts: 179
27 Jun 2014 04:29 PM
^ you are the cutest thing i have ever seen
Report Abuse
majekman30 is not online. majekman30
Joined: 30 Jun 2013
Total Posts: 4
28 Jun 2014 05:36 PM
Rar! :l
Report Abuse
Vinny0TheMinecrafter is not online. Vinny0TheMinecrafter
Joined: 12 May 2014
Total Posts: 54
31 Jul 2014 08:01 AM
why is there 2 sword name here do they have to be the same or is it just 2 items that you can put in
Report Abuse
Patrolics is not online. Patrolics
Joined: 09 Aug 2013
Total Posts: 149
31 Jul 2014 08:18 AM
lel dude, That just means, the same sword goes in two areas, the player's Backpack, so they have the sword, and the player's startergear, so they have it all the time, even after they die.

~ The noob of all forums. ~
Report Abuse
MFSA289 is not online. MFSA289
Joined: 14 May 2012
Total Posts: 507
07 Aug 2014 03:28 PM
Question, is "PASSIDHERE" the ID of the item or the ID of the game pass?
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