Skip to main content

MSK Core

MSK Core

MSK Core is the shared library that powers every MSK Scripts resource. It gives you a clean framework abstraction (ESX, QBCore, ox_core — or fully STANDALONE), a modern React-based NUI and a large set of battle-tested helper functions, all exposed through a single global MSK table that any resource can import in one line.

Version

This documentation covers msk_core v3.0.0. With v3 the whole core was rebuilt around a lazy-loading module system and the NUI was migrated to React + Vite + TypeScript. The public API (MSK.* and exports.msk_core:*) stays backwards-compatible — legacy names keep working through the alias and export layer.

Highlights

  • Framework bridge — write your script once and run it on ESX, QBCore, ox_core or STANDALONE. Detection is automatic (Config.Framework = 'AUTO').
  • Inventory bridgeox_inventory, core_inventory, jaksam_inventory, the ESX/Chezza default, or your own custom implementation.
  • Lazy-loaded modules — modules are compiled into your resource only when you first touch them, so there is no overhead for what you don't use.
  • Modern NUI — Notify, Input, Numpad, Progressbar and TextUI in the MSK design language (React, fully offline/bundled).
  • Everything twice — every function is reachable both as MSK.Function(...) and as exports.msk_core:Function(...).
  • Utilities — callbacks, cron jobs, ace permissions, commands, webhooks, math/string/table/vector helpers, version & dependency checking and more.

Requirements

Optional Requirements

Quick Start

Add the import to your resource's fxmanifest.lua (make sure lua54 'yes' is set):

lua54 'yes'

shared_script '@msk_core/import.lua'

You now have the global MSK table everywhere in that resource:

MSK.Notification('MSK Scripts', 'Welcome to my server!', 'success', 5000)

local players = MSK.GetPlayers()
print(('There are %s players online'):format(#players))

See Installation for the full setup, Configuration for config.lua, Frameworks for the bridge, and Functions for the complete API reference.

UI Preview

MSK.Notification

Notify

MSK.TextUI

TextUI

MSK.Progressbar

Progressbar

MSK.Input

Input Large Input Small

MSK.Numpad

Numpad Numpad Incorrect

Numpad Numbers Numpad Masked

License

msk_core is licensed under the GNU Lesser General Public License v3.0 or later (LGPL-3.0-or-later).

The core itself is open and must stay open, but any resource — free or paid — may use msk_core as a dependency without being forced to adopt the same license.

info

The names, logos, and brands "MSK Scripts" and "Musiker15" are trademarks of the Licensor and are not covered by the LGPL.