Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

1 comment

0

Actually the player needs to buy the developer product in order to get the 3:00 speed boost.

This discussion is preserved as it was. New answers, comments, and votes are closed.