You’ve answered your question yourself already. Using tool events .Equipped and .Unequipped, you can change change walk speed this way:
local Players = game:GetService("Players")
local character = Players.LocalPlayer.Character or Players.LocalPlayer.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
script.Parent.Equipped:Connect(function()
humanoid.WalkSpeed += 5
end)
script.Parent.Unequipped:Connect(function()
humanoid.WalkSpeed -= 5
end)
This script should be put in local script and belongs inside a tool. In case your tool doesn’t have a handle, you have to uncheck the “Requires handles” property.