generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Dev product for speed

Previous Thread :: Next Thread 
Thundear is not online. 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 is not online. Thundear
Joined: 28 Jan 2013
Total Posts: 790
16 May 2014 09:21 PM
Dev product*
Report Abuse
Thundear is not online. Thundear
Joined: 28 Jan 2013
Total Posts: 790
16 May 2014 09:35 PM
b
Report Abuse
Airennor is not online. 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
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image