Introduction¶
Enhanced only
Scripting is part of the enhanced version of fkdr. The classic version has no script engine.
A script is a plain .js file that fkdr loads at runtime. It becomes a module of its own, with a switch in the menu, a keybind, settings that survive reloads, HUD elements, commands and access to everything fkdr already knows about the lobby you are in.
Drop a file into your scripts folder (/fkdr script folder opens it), run /fkdr script reload, and it is live. You do not need a JDK, Gradle, an IDE or a compile step. Scripts hot-reload while the game is running.
Why JavaScript¶
A script is one text file you can edit with Notepad. There is nothing to install and nothing to build, and it works the same whichever launcher you play on.
What a script can do¶
- React to the game. Chat lines, game start and end, players joining the lobby, party changes,
/whorosters, key presses, every tick, every frame. - Draw. HUD text through the same drag-and-drop editor every built-in element uses, and 3D boxes, tracers and lines in the world.
- Read fkdr. The lobby threat model, Hypixel stats for anyone in the tab list, tags, your party, Bed Wars teams and bed state.
- Have settings. Toggles, sliders, dropdowns, text, colours and keybinds that show up in the menu and are saved with your config.
- Add commands under
/fkdr <name>. - Talk to the web with asynchronous HTTP, and keep per-script storage on disk.
- Decorate nametags and the tab list with a short coloured suffix.
What a script cannot do¶
Scripts run in a safe box. They cannot open files or network connections themselves, start threads, or reach into the game's own code. Each of those has a safe way in instead (storage, HTTP, scheduling, the render namespace), and the sandbox page lists them.
Lunar and Forge
Scripts behave the same on Lunar Client and on Forge.