Every function a script can call. Positions are Luau vectors; entities are identified by their runtime id.
nickel
nickel.module{name, category, description} | Declares a module and returns it. |
nickel.command{name, description, args, run} | Declares a chat command (.name). |
nickel.modules.list(), .get(name) | Built-in modules: name, category, isEnabled, setEnabled, toggle, settings, setting. |
Module object
| Settings | boolean, number, integer, choice, color, text, key; each returns a setting with get, set, name, type. |
| State | onEnable(fn), onDisable(fn), isEnabled(), setEnabled(on) |
| Events | on(event, fn) |
| HUD | hud(w, h), hudFrame(): a movable element drawn in render2d. |
| Actions | rotate(yaw, pitch, {mode, priority, smooth}), aimAt(target, options), useItem(options) |
Events
update tick render2d render3d attack packetSend packetReceive chat key move jump hurt death respawn join leave dimension screen containerOpen containerClose pathEnd teleport hit. Where the game allows it, ev:cancel() cancels the event.
Libraries
player
inWorld, position, eyePosition, velocity, rotation, anglesTo, health, name, runtimeId, actorUniqueId, onGround, isSprinting, isSneaking, inWater, inLava, fallDistance, gameMode, slot, setSlot, setVelocity, addVelocity, teleport, jump, swing, lookingAt, attack, interact, startBreak, continueBreak, stopBreak, useItemOn, releaseItem, simulate
world
entities, entity, target, dimension, time, block, raycast, isLoaded, findBlocks, placeBlock
inventory
item, size, held, offhand, armor, find, hotbarFind, swap, drop, equip, toOffhand. Moves return ok and a result: Submitted, Unavailable, Busy, InvalidContainer, InvalidSlot, InvalidAmount, IncompatibleItems.
container
isOpen, type, size, item, items, take, put, close
path
goto, follow, mine, wander, stop, pause, resume, isActive, status. Uses the Path Finder module.
projectile
trace(item, yaw, pitch), aim(item, target, tolerance)
chat · client · storage
chat: print, send, command. client: notify, time, tick, after, every, cancel, isKeyDown, server, ping, transport. storage: get, set (kept between sessions).
Drawing
In render2d: text, fill, rect, line, circle, gradient, worldToScreen, size. In render3d: box, filledBox, line, entityBox.