of     1   

Destr0i
#139547724Monday, July 07, 2014 6:04 PM GMT

I want this script to only work for people who have a specific gamepass, and if they dont have the gamepass the purchase feature pops up I got the script down already, I dont know how to do the VIP part.. clickdetector = script.Parent:FindFirstChild("ClickDetector") -- Put script in same part as clickdetector toolname = "Pistol" -- Change this to tool's name tool = game.ServerStorage:FindFirstChild(toolname) -- Change this to the location where the tool is located in clickdetector.MouseClick:connect(function(player) nevermind = false if player:FindFirstChild("Backpack") ~= nil then if player.Backpack:FindFirstChild(toolname) then nevermind = true end end if player.Character then if player.Character:FindFirstChild(toolname) then nevermind = true end end if not nevermind then if player:FindFirstChild("Backpack") then tool:clone() tool.Parent = player:FindFirstChild("Backpack") end end end) --Never forget. |R$232
Destr0i
#139548057Monday, July 07, 2014 6:07 PM GMT

It already works btw, nothing needs fixing, I just need to add on the vip part. Never forget. |R$232
later_k
#139548411Monday, July 07, 2014 6:10 PM GMT

Destr0i
#139548573Monday, July 07, 2014 6:11 PM GMT

well I got there and "There is currently no text in this page. You can search for this page title in other pages, or search the related logs, but you do not have permission to create this page." Never forget. |R$232
domorox17
#139548601Monday, July 07, 2014 6:11 PM GMT

@epic No need for that. Use the PlayerHassPass() method, which is part of GamePassService.
Destr0i
#139548751Monday, July 07, 2014 6:13 PM GMT

PlayerHasPass? would it also do this part "and if they dont have the gamepass the purchase feature pops up" Never forget. |R$232
later_k
#139548961Monday, July 07, 2014 6:15 PM GMT

PlayerOwnsAsset has always worked for me, I don't see why not to use it :P Also, http://wiki.roblox.com/index.php?title=PromptPurchase_(Method)
Destr0i
#139549365Monday, July 07, 2014 6:19 PM GMT

tried something out with both of those would this work? any ID is just stated as ID. clickdetector = script.Parent:FindFirstChild("ClickDetector") -- Put script in same part as clickdetector toolname = "Pistol" -- Change this to tool's name tool = game.ServerStorage:FindFirstChild(toolname) -- Change this to the location where the tool is located in clickdetector.MouseClick:connect(function(player) nevermind = false game.Players.PlayerAdded:connect(function(plr) if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,ID) then if player:FindFirstChild("Backpack") ~= nil then if player.Backpack:FindFirstChild(toolname) then nevermind = true end end if player.Character then if player.Character:FindFirstChild(toolname) then nevermind = true end end if not nevermind then if player:FindFirstChild("Backpack") then tool:clone() tool.Parent = player:FindFirstChild("Backpack") end end end) else id = ID --Beautiful Hair for Beautiful People game.Players.PlayerAdded:connect(function(player) game:GetService("MarketplaceService"):PromptPurchase(player,id) end) end end) --Never forget. |R$232
later_k
#139549772Monday, July 07, 2014 6:23 PM GMT

I don't recommend just copy and pasting stuff from the wiki. clickdetector = script.Parent:FindFirstChild("ClickDetector") -- Put script in same part as clickdetector toolname = "Pistol" -- Change this to tool's name tool = game.ServerStorage:FindFirstChild(toolname) -- Change this to the location where the tool is located in clickdetector.MouseClick:connect(function(player) nevermind = false if game:GetService("MarketplaceService"):PlayerOwnsAsset(player,YourID) then if player:FindFirstChild("Backpack") ~= nil then if player.Backpack:FindFirstChild(toolname) then nevermind = true end end if player.Character then if player.Character:FindFirstChild(toolname) then nevermind = true end end if not nevermind then if player:FindFirstChild("Backpack") then tool:clone() tool.Parent = player:FindFirstChild("Backpack") end end else game:GetService("MarketplaceService"):PromptPurchase(player,YourID) end) end)
later_k
#139549960Monday, July 07, 2014 6:24 PM GMT

Sorry, messed that up slightly. Just take off the ) on the first "end)"
Destr0i
#139550075Monday, July 07, 2014 6:25 PM GMT

alright, thanks Never forget. |R$232

    of     1