
Random Object Spawner Script
- Item name
- Random Object Spawner Script
- Category
- Scripts
- Sold by
- MorganeParis
- Min. resale price
- 100
- Listed
- 3/15/2026
Description
Version 1.5.2 Spawn objects in your Sansar scene by visitor click, automatic timer, or Script Event. MPP - Random Object Spawner lets you configure a list of cluster resources and spawn one of them at a defined position, either at the exact same spot or randomly inside a radius. It can be used as a simple item rezzer, a random prop spawner, or an event-driven system connected to scripts like MPP - Action Button. For visitors, it is easy to use: when the object is ready, they see the hover text and click to spawn the configured item. Creators control who may click, the cooldown, the sounds, the cleanup, the auto-spawn interval and the event triggers. The script also includes a maximum active spawned items limit. Set it to 0 for unlimited spawns, or to 1-100 to automatically remove the oldest spawned object before creating a new one. This keeps scenes clean and safe, even in public. New in 1.5: settings grouped by category in the Build panel, the same Permission Mode + Whitelist + Blacklist scheme as every MPP script (avatar handles accepted), an Enable Click switch, a private "not allowed" message for refused clicks, the option to hide the spawner from denied visitors, a cleanup command that follows the permissions, a limit that holds under fast clicks, and warnings in the script console for risky settings. See "Updating from 1.4.7" below before you update spawners already placed in a scene. Perfect for item displays, pickup systems, random decorative props, timed spawning systems, loot buttons and interactive scene mechanics. ________________________________________ Key Features Spawning • One random object from a list of up to 20 cluster resources • Fixed spawn point (radius 0) or random spot inside a radius • Position offset and rotation, minimum spawn height • Max active items 0-100: the oldest object is replaced first (1 = single-item rezzer) Triggers • Visitor click with a custom hover text and a cooldown for everyone • Auto-spawn timer in minutes • Script Events for spawn and clean, from MPP - Action Button, a scheduler or your own script • Cleanup chat command (exact, case ignored) and cleanup event Access — New in 1.5 • Permission Mode 1 owner only, 2 owner + whitelist, 3 everyone except blacklist • Lists by avatar handle or UUID; the scene owner can never be locked out • Private "not allowed" message for refused clicks (customizable, or silent) • Optional: hide the spawner from denied visitors • Events: the avatar who pressed the button follows the same rules, or accept every event Sounds • Spawn sound at the new object, clean sound at the spawner • Volume 0-200 % (0 = silent) ________________________________________ Technical Details • 26 settings in six groups: Activation, Spawn, Access, Events, Sound, Debug • Works on any object; the cooldown hides the hover text until it ends • Warnings at start: empty list, empty slots, same name for both events, unlimited items on a public spawner, a list not used by the mode • Optional Debug Logging with the avatar handle and UUID • Robust: a cleanup during a spawn, an avatar who leaves, a throttled call never stop the spawner ________________________________________ Example 1 - Visitor Click, Same Item, Same Place One cluster, Spawn Radius 0, Max Active Items 1, Permission Mode 3. Result: the visitor clicks the spawner, the same item appears at the exact same location, and each new click replaces the previous one. Example 2 - Automatic Random Spawner Several clusters, Auto Spawn Minutes 5, Max Active Items 10, Enable Click off. Result: the script spawns random objects over time, never more than ten. Example 3 - Loot Button An MPP - Action Button sending mpp_randomspawn_spawn, the spawner in Permission Mode 3 with a Max Active Items. Result: each press makes one random object appear. ________________________________________ Full documentation online: https://mpp-mainstore.com/sansar/RandomObjectSpawner/ ________________________________________ Updating from 1.4.7 — please read • Take a screenshot of the Build panel of each spawner BEFORE updating the script. • Your settings are kept (clusters, positions, radius, limit, cooldown, lists, sounds, events), except two: the Permission Mode, which starts again at 1 (owner only) so visitors cannot click until you set 3 (everyone) or 2 (owner + whitelist); and "Allow Without Avatar", replaced by the Use Click Permission rule (on: an event without avatar passes in mode 3 only; off: every event accepted). • The cleanup command must now be typed exactly and follows the permissions (the owner can always clean). • New settings at their defaults: Enable Click (on), Denied Text, Hide From Denied (off). Changelog — Version 1.5.2 • Access control by Permission Mode (1 owner only, 2 owner + whitelist, 3 everyone except blacklist), the same scheme as every MPP script. • New Enable Click switch (off = no click, no hover text; timer, events and cleanup still work). • New Hide From Denied option. • Use Click Permission alone decides what happens to an event without avatar ("Allow Without Avatar" removed). Changelog — Version 1.5.0 • Settings grouped by category in the Build panel; module listed as "MPP - Random Object Spawner". • Cleanup command exact, case ignored, following the permissions; text posted by scripts ignored. • Private "not allowed" message for refused clicks, at most every 5 seconds. • Max Active Items held even under fast clicks; empty list slots skipped instead of destroying an object for nothing. • Silent 0.1 s safety between two spawns, even with the cooldown at 0. • Volume 0 = no sound for both sounds. • Lists accept avatar handles as well as UUIDs; annotated entries keep their UUIDs. • Auto spawn keeps going after an error; warnings at start for risky settings; more robust in busy scenes. Changelog — Version 1.4.6 • Added Max Active Items (0 = unlimited, 1-100 = oldest item replaced first). • Makes the script suitable for single-item rezzer use with a limit of 1. ________________________________________ Enjoy and Keep Good Vibes. Hugs from Morgane. ________________________________________