Skip to main content

api reference

technical reference for lcs internals.

main.lua api

functions

loadFeature(featurePath)

loads a feature module from github.

parameters:

  • featurePath (string) - path to feature file

returns:

  • feature module table or nil

example:

local feature = loadFeature("features/freecam.lua")

toggleSuite()

toggles all enabled features on/off.

parameters: none

returns: none

side effects:

  • calls enable() on all enabled features if activating
  • calls disable() on all active features if deactivating

showNotification(text)

displays a notification to the user.

parameters:

  • text (string) - notification message

returns: none

example:

showNotification("feature loaded")

updateNotificationPositions()

repositions all active notifications.

parameters: none

returns: none

side effects:

  • animates notifications to new positions

tables

loadedFeatures

stores all loaded features.

structure:

{
[featureId] = {
module = {enable = function(), disable = function()},
config = {id, name, description, path, enabled},
active = boolean
}
}

activeNotifications

tracks active notification instances.

structure:

{
{label = TextLabel, removing = boolean},
...
}

config.lua api

structure

{
version = string,
categories = {
{
id = string,
name = string,
features = {
{
id = string,
name = string,
description = string,
path = string,
enabled = boolean
}
}
}
},
keybinds = {
toggle = Enum.KeyCode
}
}

feature module api

required exports

return {
enable = function() end,
disable = function() end
}

enable()

called when feature should activate.

parameters: none

returns: none

responsibilities:

  • initialize feature
  • apply changes
  • set up event listeners

disable()

called when feature should deactivate.

parameters: none

returns: none

responsibilities:

  • revert changes
  • disconnect events
  • clean up resources

roblox services used

frequently used

  • Players - player management
  • Workspace - world objects
  • UserInputService - input handling
  • RunService - frame updates
  • TweenService - animations

occasionally used

  • TextChatService - chat system
  • StarterGui - gui management
  • ContextActionService - input binding

common patterns

event connection

local connections = {}

-- in enable
connections.event = object.Event:Connect(handler)

-- in disable
for _, conn in pairs(connections) do
conn:Disconnect()
end
connections = {}

state management

local state = {}

-- in enable
state.original = object.Property
object.Property = newValue

-- in disable
object.Property = state.original
state = {}

batch operations

-- in enable
for _, item in ipairs(collection) do
processItem(item)
end

-- in disable
for _, item in ipairs(collection) do
revertItem(item)
end

error codes

lcs doesn't use formal error codes, but common errors:

  • "attempt to index nil" - object doesn't exist
  • "unable to cast value" - type mismatch
  • "http request failed" - network issue
  • "loadstring is not available" - executor limitation

version compatibility

current version: beta 0.1

breaking changes

none yet (first release)

deprecations

none yet (first release)

future api changes

planned:

  • feature dependencies
  • feature priorities
  • async operations
  • event system