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
 

gamepass tool

Previous Thread :: Next Thread 
Mezur is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
01 Oct 2016 11:46 AM
Anybody know how to make it so you spawn with a tool which you purchased from a gamepass from your game?

Can't find any scripts that work for this..
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
01 Oct 2016 11:55 AM
local player = game.Players.PlayerName
local MAS = game:GetService("MarketplaceService")
local passid = [YOUR PASSID HERE]

function Authenticated()
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passid)
end

MAS.PrompPurchaseFinished:connect(function(assetId, player, Purchased)
if Purchased then
if assetId == passId then
player.CharacterAdded:connect(function()
local tool = game.Lighting.Tool:clone()
tool.Parent = player.Backpack
end)
end
end
end

game.Players.PlayerAdded:connect(function()
if Authenticated then
player.CharacterAdded:connect(function()
local tool = game.Lighting.Tool:clone()
tool.Parent = player.Bcakpack
end)
end
end)
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