Please, do not optimize it, just make it working. The problem is probably in wrong writing Capital letters? help pls. that script is a hotkey thing and im sure its right, the problem is in the writing the main part.
local m = game.Players.LocalPlayer:GetMouse()
local player = game.Players.LocalPlayer.Character.Humanoid
db = true
m.KeyDown:connect(function(k)
k = k:lower()
if k == "l" then
if db == true then
wait(0.1)
player.WalkSpeed = 30
player.Torso.Transparency = 0.2
player.LeftArm.Transparency = 0.2
player.RightArm.Transparency = 0.2
player.LeftLeg.Transparency = 0.2
player.RightLeg.Transparency = 0.2
player.Head.Transparency = 0.2
wait(0.1)
player.WalkSpeed = 40
player.Torso.Transparency = 0.4
player.LeftArm.Transparency = 0.4
player.RightArm.Transparency = 0.4
player.LeftLeg.Transparency = 0.4
player.RightLeg.Transparency = 0.4
player.Head.Transparency = 0.4
wait(0.1)
player.WalkSpeed = 60
player.Torso.Transparency = 0.6
player.LeftArm.Transparency = 0.6
player.RightArm.Transparency = 0.6
player.LeftLeg.Transparency = 0.6
player.RightLeg.Transparency = 0.6
player.Head.Transparency = 0.6
wait(0.1)
player.WalkSpeed = 80
player.Torso.Transparency = 0.8
player.LeftArm.Transparency = 0.8
player.RightArm.Transparency = 0.8
player.LeftLeg.Transparency = 0.8
player.RightLeg.Transparency = 0.8
player.Head.Transparency = 0.8
wait(0.1)
player.WalkSpeed = 100
player.Torso.Transparency = 1
player.LeftArm.Transparency = 1
player.RightArm.Transparency = 1
player.LeftLeg.Transparency = 1
player.RightLeg.Transparency = 1
player.Head.Transparency = 1
wait(0.5)
player.WalkSpeed = 16
player.Torso.Transparency = 0
player.LeftArm.Transparency = 0
player.RightArm.Transparency = 0
player.LeftLeg.Transparency = 0
player.RightLeg.Transparency = 0
player.Head.Transparency = 0
db = false
wait(5)
db = true
end
end
end)
`

3 comments
also im kinda noob in scripting so pls help lol
Are you getting any errors in the output?
use UserInputService