-- Check if character is there

if script.Owner.Value.Character ~= nil and script.Owner.Value.Character:FindFirstChild("Humanoid") ~= nil then
	
	-- Record base walkspeed
	local baseWalkSpeed = script.Owner.Value.Character.Humanoid.WalkSpeed
	
	-- Make it to change the walkspeed on knife entry/exit
	script.Owner.Value.Character.ChildAdded:connect(function(child)
		if child.Name == "Knife" and script.Owner.Value.Character:FindFirstChild("Humanoid") and script.Owner.Value.Character.Humanoid.WalkSpeed == baseWalkSpeed then
			script.Owner.Value.Character.Humanoid.WalkSpeed = baseWalkSpeed * WALKSPEED_CHANGE
		end
	end)
	script.Owner.Value.Character.ChildRemoved:connect(function(child)
		if child.Name == "Knife" and script.Owner.Value.Character:FindFirstChild("Humanoid") and script.Owner.Value.Character.Humanoid.WalkSpeed ~= baseWalkSpeed then
			script.Owner.Value.Character.Humanoid.WalkSpeed = baseWalkSpeed
		end
	end)
	
end
