I need to know how to make a run script with a time limit like, hold shift to run for 3 sec, then wait 5 sec to run again. this is what I have if you can build off of it.
--Script- X To Run
local x = script.XToRun:clone()
x.Disabled = false
x.Parent = game.StarterGui
script.Destroy()
--Local Script- XToRun
mouse = game.Players.LocalPlayer:GetMouse()
function run (key)
if key == "x" then
game.Players.LocalPlayer.Character.Humanoid.Walkspeed = 32
end
end
function stopRunning (key)
if key == "x" then
game.Players.LocalPlayer.Character.Humanoid.Walkspeed = 16
end
end
repeat wait()until game.Players.LocalPlayer
mouse.KeyDown:connect (run)
mouse.KeyUp:connect(stopRunning)

2 comments
PLEASE use the code block to hold code
ok