the script below makes the player faster when holding down ctrl. is it possible that it isnt necesarry to hold it down and just tap ctrl once to go faster and tap again to slow down again?
local Player = game.Players.LocalPlayer
local Character = Player.Character
local UserInputService = game:GetService("UserInputService")
local Speed = 25
UserInputService.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftControl then
Character.Humanoid.WalkSpeed = Speed
end
end)
UserInputService.InputEnded:Connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftControl then
Character.Humanoid.WalkSpeed = 16
end
end)