|
| 18 Mar 2016 09:25 PM |
local passId = 1111111111111111111 local marketplaceService = game:GetService("MarketplaceService") marketplaceService.PromptPurchaseFinished:connect(function(player,assetId,isPurchased) if isPurchased then if assetId == passId then player.Humanoid.Health = 150 end end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Mar 2016 09:30 PM |
| I think roblox has broken a whole lot of stuff, same for me http://forum.roblox.com/Forum/ShowPost.aspx?PostID=185615428 |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Mar 2016 09:32 PM |
| couldnt it simply be that i made the script wrong? |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Mar 2016 10:51 PM |
You forgot MaxHealth ^^
Siggy for Ms. Piggy |
|
|
| Report Abuse |
|
|
unroot
|
  |
| Joined: 18 Sep 2009 |
| Total Posts: 1114 |
|
|
| 18 Mar 2016 10:56 PM |
player.Humanoid.MaxHealth = 150 player.Humanoid.Health = 150
#code print("yolo" .. string.rep("o", math.huge)) |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2016 11:38 PM |
@op your lucky, i don't open source my own personal code; but here: (edit to your liking)
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local bloxyColaId = 20701947 local bloxyColaId2 = 20616939 local bloxyColaId3 = 20799676 local PointsToGive = 100 --20701947 local PointsToGive2 = 500 --20616939 local PointsToGive3 = 5000 --20799676
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 |
|
|
|
| 18 Mar 2016 11:39 PM |
Thats for a gui this is for click detector:
-- Put the ID of the DevProduct in place of 29845207 local bloxyColaId = 29845207
-- When a player clicks on the sphere, they will be asked if they wish to purchase the DevProduct script.Parent.ClickDetector.MouseClick:connect(function(player) Game:GetService("MarketplaceService"):PromptProductPurchase(player, bloxyColaId) end)
local MarketplaceService = game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local ProductHat1 = game.ReplicatedStorage.Sten --local ProductHat3 = game.ReplicatedStorage.HATNAME
MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId==29845207 then ProductHat1:clone().Parent = player.Backpack end end end
local playerProductKey = "p_" .. receiptInfo.PlayerId .. "_p_" .. receiptInfo.PurchaseId ds:IncrementAsync(playerProductKey, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|