-
Download the entire FOXAPI folder containing
api.lua
and all its modules. -
Move the FOXAPI folder to your avatar's directory.
-
Delete any modules inside the module folder which you aren't going to use. More information about modules below.
FOXAPI is a modular API meaning that all its features are split into separate smaller scripts. When you first download FOXAPI using the link above, all modules will be downloaded at once Navigate to the FOXAPI\modules
folder and delete any modules you wish to not use (this includes subfolders).
If you already have FOXAPI, you can update modules separately by downloading their files and replacing the module in FOXAPI\modules
with the updated one.
Normal scripts that have not been written for FOXAPI shouldn't be placed in the modules folder.
All modules and libraries can be used by requiring FOXAPI itself FOXAPI\api.lua
. Here's an example of how you can require a module.
FOX's Line Module example
local line = require("FOXAPI.api").line
-- Using the line module to create a line
line.new():setPos(-client.getScaledWindowSize() / 2
5A93
, vec(0, 0, 0))
FOX's Patpat Module example
local foxpat = require("FOXAPI.api").foxpat
-- Editing a FOXPat config
foxpat.config.patParticle = "minecraft:heart"
-- Using an event
function events.entity_pat(entity, state)
print("Patted by " .. entity)
end