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 do you make game pass gear?

Previous Thread :: Next Thread 
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:08 PM
i know how to enter game id but were do i put the gear into lighting or workspace or starterpack?
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:10 PM
please help
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:11 PM
???????????
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:12 PM
please any one
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:13 PM
gamepassservice n stuff

ROBLOX has one already made in toolbox.
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:14 PM
ik but were do i put ids and script into
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:14 PM
mor plz
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:15 PM
you put it into workspace or serverscriptservice
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:16 PM
so everything in workspace dont need to move anything?
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:16 PM
nope, you might need to edit the script where it prompts you to though.
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:19 PM
do you put anything in linked source?
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:19 PM
nope
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:19 PM
and do you put gamepass id in value or game
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:20 PM
?
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:22 PM
Just read, edit, and test it, if you have errors post the script.
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:27 PM
still not working i put gamepass id into value still wont work
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:28 PM
post the script
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:29 PM
--------------------
--| WaitForChild |--
--------------------

-- Waits for parent.child to exist, then returns it
local function WaitForChild(parent, childName)
assert(parent, "ERROR: WaitForChild: parent is nil")
while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
return parent[childName]
end

-----------------
--| Variables |--
-----------------

local GamePassService = Game:GetService('GamePassService')
local PlayersService = Game:GetService('Players')
local InsertService = Game:GetService('InsertService')
local LightingService = Game:GetService('Lighting') --TODO: Use new data store service once that exists

local GamePassIdObject = WaitForChild(script, 'GamePassId')
local ToolAssetsToLoad = WaitForChild(script, 'ToolAssetsToLoad')

local AdminTools = LightingService:FindFirstChild('AdminTools')

-----------------
--| Functions |--
-----------------

-- Makes copies of all the admin tools and puts them in target
local function CloneAdminTools(target)
for _, tool in pairs(AdminTools:GetChildren()) do
local toolClone = tool:Clone()
toolClone.Parent = target
end
end

-- When a player with the game pass joins, give them the admin tools
local function OnPlayerAdded(player)
if GamePassService:PlayerHasPass(player, GamePassIdObject.Value) then
local starterGear = WaitForChild(player, 'StarterGear')
CloneAdminTools(starterGear)
if player.Character then -- They've already loaded and won't get their StarterGear until next spawn
local backpack = WaitForChild(player, 'Backpack')
CloneAdminTools(backpack)
end
end
end

--------------------
--| Script Logic |--
--------------------

-- Create AdminTools if it doesn't exist
if not AdminTools then
AdminTools = Instance.new('Model')
AdminTools.Name = 'AdminTools'

-- Load all of the assets in ToolAssetsToLoad and put them in AdminTools
for _, intObject in pairs(ToolAssetsToLoad:GetChildren()) do
if intObject and intObject:IsA('IntValue') and intObject.Value then
local assetModel = InsertService:LoadAsset(intObject.Value)
if assetModel then
local asset = assetModel:GetChildren()[1]
if asset then
asset.Parent = AdminTools
end
end
end
end

AdminTools.Parent = LightingService
end

PlayersService.PlayerAdded:connect(OnPlayerAdded)
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:31 PM
Oh, edit the properties under the script.
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:33 PM
i did still dosnt work all i know is to put game pass id into properties of script thats all
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:34 PM
let me just create one for you, wait
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:36 PM
thankyou
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 04:39 PM
gp = game:GetService("GamePassService")
tools = game.Lighting.AdminTools --Change to where tools are
id = 0 --Change to Id

game.Players.PlayerAdded:connect(function(plr)
if gp:PlayerHasPass(plr, id) then
for _,v in pairs(tools:GetChildren()) do
v:Clone().Parent = player:WaitForChild("Backpack")
v:Clone().Parent = player:WaitForChild("StarterGear")
end
end
end)
Report Abuse
Triviox is not online. Triviox
Joined: 23 Jun 2013
Total Posts: 6305
10 Apr 2014 04:40 PM
dueling its fine i give up on it just waste of 100 robux
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