This is the script and it works adding speed but breaks when decreasing
local tool = script.Parent
local Handle = tool:WaitForChild("Handle")
tool.Equipped:Connect(function()
local h = script.Parent.Parent:FindFirstChild("Humanoid")
h.WalkSpeed = h.WalkSpeed + 20
end)
tool.Unequipped:Connect(function()
local h = script.Parent.Parent:FindFirstChild("Humanoid")
h.WalkSpeed = h.WalkSpeed - 20 --Here is the problem. It says that walkspeed is not a valid member of Humanoid
end)

2 comments
I believe it is losing the proper humanoid, as when you unequip it, it goes into the player's backpack, and it is looking for the humanoid in the player's backpack.
Yep works just fine. Tahnk You stranger