Here's the script:
local UserInputService = game:GetService("UserInputService"))
local currWalkSpeed = 10
UserInputService.InputBegan:connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftControl then
if currWalkSpeed == 10 then
currWalkSpeed = 20
else
currWalkSpeed = 10
end
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = currWalkSpeed
end
end)

2 comments
What happens when you press control? Any errors in the console? check if the event even runs: just place a print statement into the function and check if it prints something when you press a button.
I placed a print and nothing happened