isc88
|
  |
| Joined: 30 May 2013 |
| Total Posts: 27545 |
|
|
| 21 Jun 2015 08:51 PM |
I need it to check if the player has this gamepass http://www.roblox.com/Earbuds-item?id=261180742 and if the player has the gamepass execute this code
script.Parent.Frame.Visible = true local sound = Instance.new("Sound",script.Parent) sound.Volume=1 sound.Pitch=1 sound.Name="sound" sound.Looped=true sound.PlayOnRemove=false local player = game.Players.LocalPlayer local Format = "http://www.roblox.com/asset/?id=##ID##" local frame = script.Parent:WaitForChild("Frame")
frame:WaitForChild("Play").MouseButton1Click:connect(function() local input = tonumber(frame:WaitForChild("Input").Text) if input then sound:Stop() sound.SoundId=Format:gsub("##ID##", tostring(input)) sound:Play() end end) frame:WaitForChild("Stop").MouseButton1Click:connect(function() sound:Stop() end)
I can't find anything on this that works
what siggy |
|
|
| Report Abuse |
|
|
isc88
|
  |
| Joined: 30 May 2013 |
| Total Posts: 27545 |
|
| |
|
isc88
|
  |
| Joined: 30 May 2013 |
| Total Posts: 27545 |
|
| |
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
isc88
|
  |
| Joined: 30 May 2013 |
| Total Posts: 27545 |
|
| |
|
K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
|
| 21 Jun 2015 09:40 PM |
game.Players.PlayerAdded:connect(function(player) passId = PASS ID if game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId) then (YOUR CODE) |
|
|
| Report Abuse |
|
|
isc88
|
  |
| Joined: 30 May 2013 |
| Total Posts: 27545 |
|
|
| 21 Jun 2015 09:52 PM |
it's not working..
what siggy |
|
|
| Report Abuse |
|
|
vacha
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 1993 |
|
|
| 21 Jun 2015 09:56 PM |
local mps = game:GetService("MarketplaceService") local assetid = 66666666 game.Players.PlayerAdded:connect(function(player) if mps:PlayerOwnsAsset(assetid,player) then print'Player Owns the asset!' else print'Player doesn't own the asset I should prompt them to buy it --Code end end)
That is if you wanted to check if they own the pass every time a player enters your game. If not you can remove the last line and Line3 and incorporate it into any block while true do the do |
|
|
| Report Abuse |
|
|
vacha
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 1993 |
|
|
| 21 Jun 2015 09:57 PM |
if mps:PlayerOwnsAsset(player,assetid) then --the player instance is the first argument Replace line 4 with that ^^
while true do the do |
|
|
| Report Abuse |
|
|
isc88
|
  |
| Joined: 30 May 2013 |
| Total Posts: 27545 |
|
|
| 22 Jun 2015 10:36 AM |
it STILL doesn't work ;-; it's in a localscript
what siggy |
|
|
| Report Abuse |
|
|
vacha
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 1993 |
|
|
| 22 Jun 2015 02:05 PM |
put it in a server script
while true do the do |
|
|
| Report Abuse |
|
|