--Function requires the same name as the file local soundPlaying = 0; function m2sound_main(e) -- Check for distance of 50. Modify this to whatever range works best. if GetPlayerDistance(e) < 50 then Prompt("Your Cerebral Cortex has experienced temporary modification!") if soundPlaying == 0 then PlaySound(e, 0); --LoopeSound(e, 0); soundPlaying = 1; end else if soundPlaying == 1 then StopSound(e, 0); soundPlaying = 0; end end end