Sturlafj
|
  |
| Joined: 12 Jun 2016 |
| Total Posts: 35 |
|
|
| 10 Aug 2016 09:48 AM |
I makes some buttons on the screen and they are half working: You can click them and buy +10 speed, etc but when you die (it is an obby) the effect just disapear and you need to rebuy! I`m talking about Robux prices. Can someone help me? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2016 09:57 AM |
Post your code here, please.
|
|
|
| Report Abuse |
|
|
Sturlafj
|
  |
| Joined: 12 Jun 2016 |
| Total Posts: 35 |
|
|
| 10 Aug 2016 10:55 AM |
iJacobness this is the script that I`m using!
-- If you do not know how to use this or the GUI, check out my YouTube video tutorial on this. -- Replace the 0's with your ID's -- Delete what you dont use, besides the first part of the function
game.StarterGui.ResetPlayerGuiOnSpawn = false old_fog = game.Lighting.FogStart local MarketplaceService = game:GetService("MarketplaceService")
function getPlayerFromId(id) for i,v in pairs(game.Players:GetChildren()) do if v.userId == id then return v end end return nil end MarketplaceService.ProcessReceipt = function(receiptInfo) local productId = receiptInfo.ProductId local playerId = receiptInfo.PlayerId local player = getPlayerFromId(playerId) local productName -- Down below is an example of a +10 Speed ------------------------------------------------------------------- if productId == 37257469 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 10 end end ------------------------------------------------------------------- -- Down below is an example of a Health boost ------------------------------------------------------------------- elseif productId == 37257471 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 20 end end ------------------------------------------------------------------- -- Down below is an example of a WalkSpeed boost ------------------------------------------------------------------- elseif productId == 37257472 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 30 end end -------------------------------------------------------------------
-- Down below is an example of a WalkSpeed boost ------------------------------------------------------------------- elseif productId == 37257507 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.JumpPower = human.JumpPower + 15 end end ------------------------------------------------------------------- -- Down below is an example of a gear giver ------------------------------------------------------------------- elseif productId == 37257482 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.JumpPower = human.JumpPower + 30 end end ------------------------------------------------------------------- end return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|
Sturlafj
|
  |
| Joined: 12 Jun 2016 |
| Total Posts: 35 |
|
|
| 10 Aug 2016 10:55 AM |
iJacobness this is the script that I`m using!
game.StarterGui.ResetPlayerGuiOnSpawn = false old_fog = game.Lighting.FogStart local MarketplaceService = game:GetService("MarketplaceService")
function getPlayerFromId(id) for i,v in pairs(game.Players:GetChildren()) do if v.userId == id then return v end end return nil end MarketplaceService.ProcessReceipt = function(receiptInfo) local productId = receiptInfo.ProductId local playerId = receiptInfo.PlayerId local player = getPlayerFromId(playerId) local productName -- Down below is an example of a +10 Speed ------------------------------------------------------------------- if productId == 37257469 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 10 end end ------------------------------------------------------------------- -- Down below is an example of a Health boost ------------------------------------------------------------------- elseif productId == 37257471 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 20 end end ------------------------------------------------------------------- -- Down below is an example of a WalkSpeed boost ------------------------------------------------------------------- elseif productId == 37257472 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 30 end end -------------------------------------------------------------------
-- Down below is an example of a WalkSpeed boost ------------------------------------------------------------------- elseif productId == 37257507 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.JumpPower = human.JumpPower + 15 end end ------------------------------------------------------------------- -- Down below is an example of a gear giver ------------------------------------------------------------------- elseif productId == 37257482 then local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.JumpPower = human.JumpPower + 30 end end ------------------------------------------------------------------- end return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2016 10:57 AM |
| why dont you check his youtube tutorial? |
|
|
| Report Abuse |
|
|
Sturlafj
|
  |
| Joined: 12 Jun 2016 |
| Total Posts: 35 |
|
|
| 10 Aug 2016 11:01 AM |
| I watched the tutorial but it just said things that I did! |
|
|
| Report Abuse |
|
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
|
| 10 Aug 2016 11:43 AM |
because this is a horrible made kit that your using
|
|
|
| Report Abuse |
|
|
Sturlafj
|
  |
| Joined: 12 Jun 2016 |
| Total Posts: 35 |
|
|
| 10 Aug 2016 11:49 AM |
| RobuxLife, do you have a good one? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2016 11:57 AM |
| even if he did he probably wouldn't give it to you for free, OP |
|
|
| Report Abuse |
|
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
|
| 10 Aug 2016 12:02 PM |
no I would, but I don't use "kits"
|
|
|
| Report Abuse |
|
|