How to distroy the script

Hi, first of all I’m sorry about my English !!

Q: Is there any way to destroy the script “DontDestroyOnLoad” at certain level ??

I attached the script on empty GameObject to play some music but the problem is that I want to stop the music at certain level by destroying the script !!

Destroy(ComponentName) works just like destroying game objects. Notice the docs show a rigid body being destroyed, which is a component just like your script:

I got your point clearly, unfortunately I don’t know anything about scripting. Can you please edit the script for me so the component will be destroyed if the player reached the level “whatever” … Please I need this ):

function Awake () {
DontDestroyOnLoad (this);