generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: PAYING FOR HELP - Dev Products and in game gamepass guis

Previous Thread :: Next Thread 
vinIand is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
KiwiTronik is not online. KiwiTronik
Joined: 18 Feb 2010
Total Posts: 3221
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 is not online. 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
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
05 Jul 2017 09:43 AM
Just post the script here


Report Abuse
vinIand is not online. 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
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
05 Jul 2017 09:47 AM
pastebin?


Report Abuse
vinIand is not online. 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 is not online. vinIand
Joined: 04 Sep 2011
Total Posts: 16481
05 Jul 2017 09:48 AM
one moment.
Report Abuse
AIicks is not online. 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 is not online. vinIand
Joined: 04 Sep 2011
Total Posts: 16481
05 Jul 2017 09:49 AM
/k8yYciXj
Report Abuse
vinIand is not online. vinIand
Joined: 04 Sep 2011
Total Posts: 16481
05 Jul 2017 09:51 AM
it's not FE
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
05 Jul 2017 09:51 AM
After you add the money put

return Enum.ProductPurchase.PurchaseGranted


Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
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 is not online. 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 is not online. vinIand
Joined: 04 Sep 2011
Total Posts: 16481
05 Jul 2017 10:12 AM
@dis ^
Report Abuse
RuizuKun is not online. 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 is not online. 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 is not online. 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 is not online. vinIand
Joined: 04 Sep 2011
Total Posts: 16481
05 Jul 2017 10:43 AM
do you have discord @ru?
Report Abuse
RuizuKun is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image