iJava
|
  |
| Joined: 06 Mar 2011 |
| Total Posts: 29914 |
|
|
| 17 Jun 2014 11:54 AM |
local MarketplaceService = Game:GetService("MarketplaceService") local PointsService = Game:GetService("PointsService") GAMEPASS_ID_HERE = 20081805 local points200 = 20165020 local points450 = 20165026 local points925 = 20165035 local points4700 = 20165064 local points9250 = 20165043
function awarder(player,amt) local pointsToAward = PointsService:GetAwardablePoints() print(player.Name.." gets ".. amt) if pointsToAward > 0 and pointsToAward >= amt then pcall(function() PointsService:AwardPoints(player.userId, amt) end) elseif pointsToAward > 0 and pointsToAward < amt then pcall(function() PointsService:AwardPoints(player.userId, pointsToAward) end) end end MarketplaceService.ProcessReceipt = function(receiptInfo)
local pointsToAward = PointsService:GetAwardablePoints()
print"got to this step"
for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == (points200) then awarder(player,200) elseif receiptInfo.ProductId == (points450) then awarder(player,450) elseif receiptInfo.ProductId == (points925) then awarder(player,925) elseif receiptInfo.ProductId == (points4700) then awarder(player,4700) elseif receiptInfo.ProductId == (points9250) then awarder(player,9250) end end end return Enum.ProductPurchaseDecision.PurchaseGranted end
-YOSkater |
|
|
| Report Abuse |
|
iJava
|
  |
| Joined: 06 Mar 2011 |
| Total Posts: 29914 |
|
| |