Thundear
|
  |
| Joined: 28 Jan 2013 |
| Total Posts: 790 |
|
|
| 16 May 2014 09:20 PM |
| Anyone got a script that will award temporary speed (until death) for buying a gamepass? |
|
|
| Report Abuse |
|
|
Thundear
|
  |
| Joined: 28 Jan 2013 |
| Total Posts: 790 |
|
| |
|
Thundear
|
  |
| Joined: 28 Jan 2013 |
| Total Posts: 790 |
|
| |
|
Airennor
|
  |
| Joined: 31 Oct 2012 |
| Total Posts: 1607 |
|
|
| 16 May 2014 09:52 PM |
| Just make a BoolValue true once bought in the StarterGui, once they die it automatically sets the value to false. So they will have to buy it again to make it true. |
|
|
| Report Abuse |
|
|
|
| 16 May 2014 10:13 PM |
local itemId = 0000 --Replace with the id of the developer product local newWalkspeed = 30 --The walkspeed the user gets from purchasing the developer product
local Players = game:GetService("Players")
function getPlayerByUserId(id) for i,Player in pairs(Players:GetPlayers()) do if Player.userId == id then return Player end end end
game:GetService("MarketplaceService").ProcessReceipt = function(info) local Player = getPlayerByUserId(info[PlayerId]) if info[ProductId] == itemId and Player and Player.Character and Player.Character:FindFirstChild("Humanoid") then Player.Character.Humanoid.WalkSpeed = newWalkspeed return Enum.ProductPurchaseDecision.PurchaseGranted end end |
|
|
| Report Abuse |
|
|