The LSL Item Counter Script is a simple yet powerful utility designed to automatically count and display the number of items contained inside a prim in Second Life. Whether you are managing vendors, organizers, gachas, storage boxes, or interactive systems, this script provides a clean and efficient way to track inventory without manual checking.
Built for reliability and ease of use, this script immediately counts the items inside a prim upon being dropped in and displays the total as floating text. It automatically updates whenever the inventory changes or when the prim is touched, ensuring the displayed count is always accurate.
Automatic Inventory Detection
The script uses llGetInventoryNumber to count items of a specified inventory type. By default, it is configured to count Notecards, making it ideal for systems such as:
Notecard vendors
Information kiosks
Roleplay lore dispensers
Documentation holders
However, the script is fully customizable. With a simple change to the inventory type, it can be adapted to count:
Objects
Scripts
Textures
Sounds
Animations
This flexibility makes it useful across a wide variety of projects.
Real-Time Updates
One of the script’s biggest strengths is its ability to stay up to date automatically. It refreshes the item count when:
The script starts
Inventory contents change
The prim is touched
This means you never need to reset the script manually after adding or removing items. The displayed number is always current, saving time and reducing user error.
Clear Floating Text Display
The script displays the item count using floating hover text, making it instantly visible to anyone near the object. This is perfect for:
Public vendors
Storage containers
Administrative tools
Shared project objects
The text color and label are easy to modify, allowing you to match your brand, theme, or UI style.
Lightweight and Efficient
This script is designed to be minimal and low impact:
No listeners
No timers
No unnecessary loops
Very low script time
Because it only runs when needed (on change or touch), it is safe for use in high-traffic areas and large builds without contributing to lag.
Full Permission – Creator Friendly
This script is released with full permissions, meaning you are free to:
Modify the code
Include it in commercial products
Resell it as part of your builds
Use it as a learning reference
It is also released into the public domain, making it ideal for developers who want a dependable base script they can build upon without restrictions.
Ideal Use Cases
Item or notecard vendors
Storage boxes and organizers
Gacha machines
Admin and debugging tools
Educational or informational displays
Automated inventory systems
Easy Setup
Using the script is extremely simple:
Drop the script into a prim
Add the items you want to count
Edit the item label if needed
Done — the count displays automatically
No configuration menus, no setup dialogs, and no user interaction required unless you want to extend it.
Expandable for Advanced Users
Advanced scripters can easily expand this script by:
Adding dialog menus
Supporting multiple inventory types
Sending counts to chat or link messages
Logging inventory changes
Syncing counts across linked prims
The clean structure and readable code make it an excellent foundation for more complex systems.
Professional Utility for Any Build
If you’re looking for a reliable, efficient, and easy-to-use item counter script, this solution delivers exactly what you need. It’s perfect for both beginners and experienced creators who want a dependable utility that “just works.”
- Automatically counts items inside a prim
- Updates instantly on touch or inventory change
- Customizable item type label (e.g., Notecards, Objects)
- Floating text display for clear visibility
- Full permission – free to modify and resell








