Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-3

How do i make a temporary speed change script for robux?

Asked by 10 years ago

I am working on a script for Changing a players speed for 180 seconds (3 minutes) that is bought with a developer product so i has to be bought over and over. Here is my script for buying the product:

local productId = (Id goes here) -- change to your developer product ID
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function() --DONT CHANGE THIS
    Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)

I have the script for changing the speed here:

if local player = game.Players.LocalPlayer ProductPurchase = true then
local player = game.Players.LocalPlayer.Speed = 20
wait (180)
local player = game.Players.LocalPlayer.speed = 16
end

If i combind them like this:

local productId = (Id goes here) -- change to your developer product ID
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function() --DONT CHANGE THIS
    Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)
and if local player = game.Players.LocalPlayer ProductPurchase = true then
local player = game.Players.LocalPlayer.Speed = 20
wait (180)
local player = game.Players.LocalPlayer.speed = 16
end

Would that work or is this script broken really bad?

1 answer

Log in to vote
0
Answered by
Regate 0
10 years ago

This might work, but the wait time might be too long. If this doesn't work, you should probably try to use a button press, like Shift.

0
Actually the player needs to buy the developer product in order to get the 3:00 speed boost. User#210 0 — 10y
Ad

Answer this question