|
| 06 Mar 2016 11:43 AM |
[Smaller?]
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local bloxyColaId = 32468886 local PointsToGive = 50
script.Parent.MouseButton1Down:connect(function() local player = script.Parent.Parent.Parent.Parent.Parent game:GetService("MarketplaceService"):PromptProductPurchase(player, bloxyColaId) end)
game:GetService("MarketplaceService").ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId==32468886 then player.leaderstats.Points.Value = player.leaderstats.Points.Value + PointsToGive end end end
local playerProductKey = "p_" .. receiptInfo.PlayerId .. "_p_" .. receiptInfo.PurchaseId ds:IncrementAsync(playerProductKey, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Mar 2016 11:45 AM |
it's good as it is
#code R+ | local RAP = "R$438,334"; local robux = "R$8,551" |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 11:46 AM |
| Is there a easy way to simply make it smaller? or even more efficient? |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 11:47 AM |
> it's
> good
> as
> it
> is
#code R+ | local RAP = "R$438,334"; local robux = "R$8,551" |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 11:48 AM |
| I know its good as it is, just trying to make it smaller... Big scripts (yes to me this is big) bother me and if I want to add more etc making it smaller is well easier... |
|
|
| Report Abuse |
|
|
LTB4
|
  |
| Joined: 05 Mar 2016 |
| Total Posts: 298 |
|
|
| 06 Mar 2016 11:50 AM |
It's good. Ask again and I will get my alt army.
-LTB4 |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 11:50 AM |
Its good,dont make it smaller
Expect us.
|
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 11:51 AM |
ARE U AN IDIOT
THAT IS BASICALLY ALL THE INFO FOR A RECEIPT SCRIPT JFC
#code R+ | local RAP = "R$438,334"; local robux = "R$8,551" |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 11:52 AM |
If big scripts bother you then PLEASE do not make games and just quit scripting right now.
#code R+ | local RAP = "R$438,334"; local robux = "R$8,551" |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 11:54 AM |
| ;-; i never said i wont use them i just said they bother me ffs |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 12:02 PM |
[Here's the updated 1. (Sorta)]
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local bloxyColaId = 32468886 local bloxyColaId2 = 32488796 local bloxyColaId3 = 32488802 local PointsToGive = 50 local PointsToGive2 = 100 local PointsToGive3 = 500
script.Parent.Shop1Button.MouseButton1Down:connect(function() local player = script.Parent.Parent.Parent.Parent game:GetService("MarketplaceService"):PromptProductPurchase(player, bloxyColaId) end)
script.Parent.Shop2Button.MouseButton1Down:connect(function() local player = script.Parent.Parent.Parent.Parent game:GetService("MarketplaceService"):PromptProductPurchase(player, bloxyColaId2) end)
script.Parent.Shop3Button.MouseButton1Down:connect(function() local player = script.Parent.Parent.Parent.Parent game:GetService("MarketplaceService"):PromptProductPurchase(player, bloxyColaId3) end)
game:GetService("MarketplaceService").ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId==bloxyColaId then player.leaderstats.Points.Value = player.leaderstats.Points.Value + PointsToGive--1 end if receiptInfo.ProductId==bloxyColaId2 then player.leaderstats.Points.Value = player.leaderstats.Points.Value + PointsToGive2--2 end if receiptInfo.ProductId==bloxyColaId3 then player.leaderstats.Points.Value = player.leaderstats.Points.Value + PointsToGive3--3 end end end
local playerProductKey = "p_" .. receiptInfo.PlayerId .. "_p_" .. receiptInfo.PurchaseId ds:IncrementAsync(playerProductKey, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 12:03 PM |
^ Its even bigger now
Expect us.
|
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 12:04 PM |
| ^ Actually smaller* Instead of handling one per script it handles all of them. |
|
|
| Report Abuse |
|
|