Bug scripting