call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 27 Dec 2013 07:44 PM |
I'm working on a gui system where you can click a gui to purchase an item. I have made all the vip t-shirts which work and made all the guis and open and close guis. I tried using this http://wiki.roblox.com/index.php/PromptPurchase_(Method). I got this which didn't work: game.Players.PlayerAdded:connect(function(player) function q() id = 139999539 game:GetService("MarketplaceService"):PromptPurchase(player,id) end end) script.Parent.MouseButton1Down:connect(q)
and no I don't want to use game passes.
-"The wise never quote." |
|
|
| Report Abuse |
|
|
ozzzyt
|
  |
| Joined: 08 Jan 2013 |
| Total Posts: 3576 |
|
| |
|
|
| 27 Dec 2013 08:04 PM |
Tshirts :P You probably weren't looking for that either. You do need to refer to an item or it will not work. |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 27 Dec 2013 08:07 PM |
wait do how would I do that?
-"The wise never quote." |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 27 Dec 2013 08:09 PM |
*so
-"The wise never quote." |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 27 Dec 2013 08:10 PM |
| Replace "game.Players.PlayerAdded:connect(function(player)" with "repeat wait() until script.Parent.Parent.BlahUntilPlayerObject |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 08:11 PM |
This script should work.
hasVIP=game:GetService("BadgeService"):UserHasBadge(--[[userId]], --[[VIP Shirt ID]])
if(hasVIP)then --user has VIP shirt then do as vip should (whatever you want) else -- torture the imposter >:D end |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 08:12 PM |
Just a little script that used to be frequently used before the gamepass era. BTW, my first account is from 2008. |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 27 Dec 2013 08:15 PM |
@vesp but would that work if it was a gui that you clicked on to get the t-shirt
-"The wise never quote." |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 08:24 PM |
Whoops, forgot you wanted to sell it, not define what to do when it is obtained. Put a block in your game that says "click to buy VIP". Put a click detector and a script within the block. Put this script within the block.
local tshirtId = TSHIRTIDHERE script.Parent.ClickDetector.MouseClick:connect(function(player) Game:GetService("MarketplaceService")PromptPurchase(player, tshirtId) end) --Enjoy!
|
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 27 Dec 2013 08:27 PM |
but this is a gui,not a brick
-"The wise never quote." |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 08:28 PM |
| Put it in a text button with a clickdetector in the scripts parent as well. Brick was theoretical. |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 27 Dec 2013 08:29 PM |
oh ok
-"The wise never quote." |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 27 Dec 2013 08:32 PM |
it still doesn't work
-"The wise never quote." |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 08:35 PM |
| You sure you did it right? Always works for me. |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 27 Dec 2013 08:37 PM |
yeah and the click detector goes in the textbutton right?
-"The wise never quote." |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 28 Dec 2013 12:11 AM |
bump
-"The wise never quote." |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 09:26 PM |
| Yup, goes in textbutton and the script is also in the text button, make sure id is right. |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 30 Dec 2013 10:01 PM |
I did something else that worked. Thanks anyways
-"The wise never quote." |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 30 Dec 2013 10:05 PM |
To those who are curious
function q() id = 139999539 game:GetService("MarketplaceService"):PromptPurchase(script.Parent.Parent.Parent,id)--However many Parents you need. end script.Parent.MouseButton1Down:connect(q) |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 30 Dec 2013 10:33 PM |
My is where you click a gui that says something like "Purchase Darkheart". You click it and the purchase gui pops up.
id = 139999539 script.Parent.MouseButton1Down:connect(function() "script.Parent"... Player = script repeat Player = Player.Parent until Player.Parent == game.Players game:GetService("MarketplaceService"):PromptPurchase(Player,id) end)
-"The wise never quote." |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 30 Dec 2013 10:37 PM |
| I wont deny, thats a pretty clever and unique way of getting Player... |
|
|
| Report Abuse |
|
|
call23re
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 9070 |
|
|
| 30 Dec 2013 10:45 PM |
lol
-"The wise never quote." |
|
|
| Report Abuse |
|
|