We propose LicenseScript, a language for digital rights management (Drm) based on multiset rewriting and logic programming. LicenseScript enjoys a precise syntax and semantics, and it is rich enough to embed other rights expression languages (Rel). We show that LicenseScript is expressive and flexible by exploring several application domains representing different aspects ofDrm. We present an implementation. Finally, we extend the core of the language to account for multiple devices in authorized domains.