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
|
  |
| Joined: 23 Jun 2013 |
| Total Posts: 6305 |
|
| |
|
Triviox
|
  |
| Joined: 23 Jun 2013 |
| Total Posts: 6305 |
|
| |
|
Triviox
|
  |
| Joined: 23 Jun 2013 |
| Total Posts: 6305 |
|
| |
|
|
| 10 Apr 2014 04:13 PM |
gamepassservice n stuff
ROBLOX has one already made in toolbox. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 23 Jun 2013 |
| Total Posts: 6305 |
|
| |
|
|
| 10 Apr 2014 04:15 PM |
| you put it into workspace or serverscriptservice |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 10 Apr 2014 04:16 PM |
| nope, you might need to edit the script where it prompts you to though. |
|
|
| Report Abuse |
|
|
Triviox
|
  |
| Joined: 23 Jun 2013 |
| Total Posts: 6305 |
|
|
| 10 Apr 2014 04:19 PM |
| do you put anything in linked source? |
|
|
| Report Abuse |
|
|
| |
|
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
|
  |
| Joined: 23 Jun 2013 |
| Total Posts: 6305 |
|
| |
|
|
| 10 Apr 2014 04:22 PM |
| Just read, edit, and test it, if you have errors post the script. |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
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 |
|
|
|
| 10 Apr 2014 04:31 PM |
Oh, edit the properties under the script.
|
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 10 Apr 2014 04:34 PM |
| let me just create one for you, wait |
|
|
| Report Abuse |
|
|
Triviox
|
  |
| Joined: 23 Jun 2013 |
| Total Posts: 6305 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|