Certainly! Here's a modified version of the script that takes a function definition as an argument:
``` 
def derivative(f, a, b):
    h = 0.0001  # Step size for approximation
    return (f(b) - f(a)) / (b - a)

# Example usage
def my_function(x):
    return x ** 2

x = float(input("Enter a value for x: "))
print("The derivative of f(x) at x = {} is {}".format(x, derivative(my_function, x - 0.5, x + 0.5)))
``` 
In this version of the script, the function my_function is defined separately using a regular function definition instead of a lambda expression. The derivative function remains the same as before.

To use this modified script, simply define your own function my_function as a regular function, and then pass it as the first argument to the derivative function. The script will output the derivative of my_function at the specified value of x.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence