Skip to main content
To properly use API, you need permissions on your extension. Create your Permission Values inside Permissions. In this example, we will just give ourselves full permission:
• Root (BoolValue, true)
Which then should look like this:
Example of permissions
For more information on Permissions, look up this page
Functions that start with a _ (underscore) are usually exposed internal functions and should not be used if you don’t know what they do.

Shared

  • manifest
    A table on all the attributes you set in the extension.
  • capabilities
    Another table, this time with the permissions.
  • remotes
    Allows you to access the Remotes for Orbit’s namespace.
    Uses ByteNet-Max.
    More Information in the future.
  • Notify
    An API that you always have access to.
    Allows you to send notifications.
    Leave out target if on client.
export type onelinerData = {
	message: string,
	icon: string?,
	duration: number?,
}

function notify:oneliner(target: Player?, data: onelinerData) : boolean
export type twolinerData = {
	title: string,
	description: string,
	icon: string?,
	duration: number?,
}

function notify:twoliner(target: Player?, data: twolinerData) : boolean
  • Logger
    Debug API. Instead of prints we have a centralized log that prints by entering --orbit logs into the console.
function logger.Log(content: string) : boolean
function logger.Get(lines: number) : {[number]: string}

Server

  • permitted(userId: number, permission: string)
    A function exposed to check for permission. To see if someone has access to the panel, simply check for the Active permission.
  • info
    A configuration instance provided, that allows you to read following info (through attributes):
    thumbnail The game’s thumbnail.
    description The game’s description.
    icon The game’s icon.
    serverCode The server code generated by networking. (Keep in mind this will not be changed if Networking is disabled)
    uptime Uptime tracked by Orbit.
    version The version of Orbit currently running.

Client

  • contextmenu
    Allows usage of the context menu.
export type ContextMenuData = {
	Header: string,
	Buttons: {
		{
			Icon: string,
			Label: string,
		}
	},
}
export type SignalInstance = {
	Connect = function(self, callback: () -> ()),
	-- ...
}
export type Events = {
	isHovering: boolean,
	isInitialized: boolean,
	ContextMenuOpened: boolean,
	ButtonClicked: SignalInstance,
}
contextmenu:ContextMenu(State: boolean, Data: ContextMenuData?) : Events|{}
  • breadcrumbs
    Self-explanatory.
    breadcrumbs:_jumpTo(crumbs: {string})
    breadcrumbs:crumb(data: string, fromRoot: boolean?)
    
    The data on crumb can be formatted like this: Extension/Settings, or just Settings. FromRoot will set the crumb to Orbit/ and continue from there. Modals and Navkit do this automatically!

Client (Permission-based)

  • navkit (UseNavkit)
    function navkit:_jumpToPage(button: ImageButton)
    function navkit:_bind(button: ImageButton)
    export type catdata = {
    	name: string,
    	layoutorder: number?,
    }
    function navkit.newCategory(identifier: string, catdata: catdata)
    function navkit.getCategory(identifier: string)
    export type navdata = {
    	category: string,
    	name: string,
    	icon: string?,
    	layoutorder: number?,
    	clone: boolean?,
    }
    function navkit.newButton(identifier: string, navdata: navdata, window: GuiObject)
    function navkit.deleteButton(identifier: string, category: string)
    
    We recommend keeping category identifiers like this: extension.category.
    A perfect example is Orbit’s categories.
    The Main category is under orbit.main, and More is under orbit.more.
    Both get created at runtime using .newCategory.
    Example of navbar
  • modals (UseModals)
    function modalService.new(id: string, modal: GuiObject, constructor: ((modal: GuiObject, ...any) -> ())?) : GuiObject
    function modalService:switchTo(modal: string|GuiObject, data: {any}) : boolean
    function modalService:back()