// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Looping ambient sound // Not compiled or tested in-world // Setup: Add your properly licensed sound to this prim and use its exact inventory name below. Touch once to start. // Stop / restore: Touch again to stop, or remove the script. It starts stopped after reset. // Notes: Uses only the sound in this prim’s inventory. Keep volume low and get permission for supplied assets. // License: see LICENSE in this distribution. // Original Incoprea example. Add your own ambient sound to this prim. string AMBIENT_SOUND = "ambient_loop"; integer playing; default { state_entry() { playing = FALSE; llStopSound(); } touch_start(integer count) { if (playing) { llStopSound(); playing = FALSE; } else { llLoopSound(AMBIENT_SOUND, 0.12); playing = TRUE; } } }