vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
|
| 05 Jul 2017 09:24 AM |
so basically, i have developer products set up
get $10,000 cash - 50 robux
when i purchase the product, it doesn't just give 10k. when i first purchased it, i received 20k. i purchased it again, 50k. again, 90k. again, 140k. it should be 10k -> 20k -> 30k and so on.
now for the gamepass guis i have set up, when you purchase the gamepass in game, you have to rejoin to receive the item. i'm not sure if that's fixable, but if it is i'd like to know how.
please add me on discord to help - hannah#4895
(3k group fund pay) |
|
|
| Report Abuse |
|
|
AIicks
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 788 |
|
|
| 05 Jul 2017 09:27 AM |
local debounce = true
local onTouch = function(hit) if debounce then debounce - false --do stuff debounce = true ned end
script.Parent.Touched:Connect(onTouch)
Debounce is a powerful concept, I often use them in tables so I can treat players on an individual basis |
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
|
| 05 Jul 2017 09:29 AM |
| i'm having a few different problems, so i'm not sure as to whether that was meant for the gamepasses or the developer products. |
|
|
| Report Abuse |
|
|
AIicks
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 788 |
|
|
| 05 Jul 2017 09:31 AM |
| it was to counter what appears to be the duplicating implementation of the purchases of dev products. For the gamepass thing you can check the reciept which is an event that is fired on the server to check if the gamepass was purchased or not. |
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
|
| 05 Jul 2017 09:33 AM |
| alright, thank you. any idea how to get the cash you receive from purchasing the developer products to only save for 15 minutes after leaving the game? |
|
|
| Report Abuse |
|
|
AIicks
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 788 |
|
|
| 05 Jul 2017 09:36 AM |
you could save it to the datastore with a timestamp. os.time() on the server returns seconds passed from jan 1970 in er... can't remember what timezone, but it's constant unlike: tick() returns timezone of server/client |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2017 09:38 AM |
so the money you bought disappears when you leave...? hmm
save a datastore; timeval = tick() then whenever the servers running (or when the player joins back) check if the players timeval = tick() + 900 --900 seconds = 15 minutes |
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
|
| 05 Jul 2017 09:39 AM |
the replicating cash amount script - thing you gave me actually made the developer products malfunction aha.
doesn't give cash entirely |
|
|
| Report Abuse |
|
|
| |
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
|
| 05 Jul 2017 09:47 AM |
this is the script under 'ServerScriptService' -
local MarketplaceService = game:GetService("MarketplaceService")
local prods = { [85896730] = 10000, [85896820] = 100000, [85896768] = 20000, [85896790] = 50000, [85896831] = 500000 } MarketplaceService.ProcessReceipt = function(info) for i,v in next, prods do if info.ProductId == i then game.ServerStorage:WaitForChild("PlayerMoney")[tostring(game.Players:GetNameFromUserIdAsync(info.PlayerId))].Value = ga####################################################################################################################onumber(v) end end end
and this is an example of one of the delevoper product gui local scripts (which i'm not sure have anything to do with this situation, i'm not a scripter) -
local button = script.Parent local devproductid = 85896730
button.MouseButton1Click:connect(function() game:GetService('MarketplaceService'):PromptProductPurchase(game.Players.LocalPlayer, devproductid) end) |
|
|
| Report Abuse |
|
|
| |
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
|
| 05 Jul 2017 09:48 AM |
| the censored part said - ################################################################################################################## + tonumber(v) end end end |
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
| |
|
AIicks
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 788 |
|
|
| 05 Jul 2017 09:48 AM |
| Are you using FE? Pretty sure the reciept is server security or whatever |
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
| |
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
| |
|
|
| 05 Jul 2017 09:51 AM |
After you add the money put
return Enum.ProductPurchase.PurchaseGranted
|
|
|
| Report Abuse |
|
|
|
| 05 Jul 2017 09:52 AM |
wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptPurchaseFinished
Connect to this event and apply effects when the assetId is one of your gamepasses and isPurchased is true.
|
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
|
| 05 Jul 2017 09:55 AM |
do you mind putting the script together and putting it into a pastebin as well?
i have zero "scripting knowledge". i'm just going off of the developer product a friend created, but clearly it's a little faulty. |
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
| |
|
RuizuKun
|
  |
| Joined: 20 Jan 2016 |
| Total Posts: 1133 |
|
|
| 05 Jul 2017 10:29 AM |
I skipped reading all of the Replies.
Anyways here , These are my scripts
-Gamepass Handler
-Devpro Handler
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=217793860
if you still need help, Contact me
This is Reality, NOT a Dream. |
|
|
| Report Abuse |
|
|
RuizuKun
|
  |
| Joined: 20 Jan 2016 |
| Total Posts: 1133 |
|
|
| 05 Jul 2017 10:32 AM |
Okay I read it a bit and saw this "now for the gamepass guis i have set up, when you purchase the gamepass in game, you have to rejoin to receive the item. i'm not sure if that's fixable, but if it is i'd like to know how. "
Well yes you can , there is an Event when the player Purchases something , it's in the Free script I am giving to you so check it out.
This is Reality, NOT a Dream. |
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
|
| 05 Jul 2017 10:37 AM |
| the developer product script didn't work for me. not sure if i did something wrong, but yeah. |
|
|
| Report Abuse |
|
|
vinIand
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 16481 |
|
| |
|
RuizuKun
|
  |
| Joined: 20 Jan 2016 |
| Total Posts: 1133 |
|
|
| 05 Jul 2017 10:45 AM |
Read the instructions , It works for everyone.
And yes I have discord
Ruizukun39#1734
This is Reality, NOT a Dream. |
|
|
| Report Abuse |
|
|