Skip to content

Using ClickCrystalsScript

ImproperIssues edited this page Oct 6, 2024 · 32 revisions

Introduction

ClickCrystalsScript (or CCS) is a custom scripting language used to create modules, macros, auto farms, hotkey binds, and much more through the mod ClickCrystals.

Welcome to the Google Docs version of ClickCrystals’ scripting documentation.

In this Wiki, we’ll cover these aspects of scripting with ClickCrystals:

  • More information
  • Downloading and installing ClickCrystals

  • Locating the .minecraft folder, and the .clickcrystals folder

  • Reloading your scripts or the entire client

  • Writing and running your own scripts

This documentation is written for versions of ClickCrystals 1.2.9 or above. Please note that there are versions of Minecraft that may be unsupported for this version of ClickCrystals.

Before you continue, it is strongly recommended you click on “Show document outline” on the side to help you see the overview.

More Information

CCS is an interpreted script language, meaning that it determines what each execution does before it runs and does not require compilation. This allows ClickCrystals users to easily reload or run their scripts in game.

All ClickCrystal scripts are run first thing upon game launch. This either includes the creation of new modules or other tasks such as saving the config or printing something into the console. If you want to execute scripts after launch, you can run the command ,ccs compile <your script>. If you want to execute a script file, ,ccs run <file path>.

All script files must have a file extension of .ccs or .txt. If the file does not have either one of these extensions, they will be skipped.

Downloading ClickCrystals

Hyped up and ready to script? Let’s download the mod itself!

To download ClickCrystals, you must first acknowledge the fake copies that exist on the internet out there. When things like this happen, it is least likely that someone is using the name of ClickCrystals to get their name out there; most of the time it is someone taking advantage of <70 IQ people to download their infected software.

Be sure that you only download the .jar from trusted sources. We would encourage most users to download our project on CurseForge. If you don’t trust the CurseForge site, you can always visit Modrinth, but it is not recommended due to content rule compatibility issues and has been discontinued.

If you are a developer and would rather build the jar yourself, ClickCrystals is a free and open source software on GitHub.

Opening GUI

When in-game, you can press on the apostrophe key on your keyboard. The key should look like this: .  Another name for the apostrophe is called the single quote. 

Navigating GUI

Once the home page has opened, you can either search up modules from the search bar or Browse the client options. For the sake of this tutorial, we will be checking out the “Browse Modules” option.


Navigating Files

When ClickCrystals first launches, it would create a folder named .clickcrystals inside of your .minecraft folder.

To access your .minecraft folder, press Win+R and type the following. A folder should pop up and in it select .minecraft. Inside of that folder you should see another one at the top named .clickcrystals.

There are a few key components in your .clickcrystals folder. These include your config, clickcrystals log, profile data, profiles folder, and scripts folder. This wiki will be covering the scripts folder located in .minecraft/.clickcrystals/scripts.

Navigating With VSCode

VSCode provides a fast and easier way to navigate your folders and files. The auto bracket enclosure and indentation provides a smoother development experience. If you do not have VSCode installed, you can use their web version.

Opening ClickCrystals Folder In-Game

To use VSCode, you must first open a folder locally. To do this type the command ,folder in chat. Remember that the default command prefix bind is set to comma.

You can then open this folder to VSCode by clicking on the “Open Folder” button and then selecting the .clickcrystals folder.

Creating Script Files

Now that you have everything set up in VSCode, you can start creating your script files. To do this click on the “New File” icon at the top of the navigation bar.

Name the file whatever you want, but the convention is to have all lowercase with hyphens instead of spaces or underscores. The file name extension, however, remains as .ccs at all times.

Once the file has been created, a preview would open to the right. Now you can start scripting! Remember to Ctrl+S to save any changes.

Reloading Scripts

All script files can be reloaded by simply executing our custom client command ,ccs reload-scripts

Do note that upon reloading scripts, all custom scripted modules will be disabled. Scripted modules save to the same config that other modules do. To avoid this, there is a new command ,reload that reloads the entire ClickCrystals Client. This would reload all scripts along with the client, and turn back on the modules that were disabled before.


ClickCrystals Script

CCS is an interpreted script language, meaning that it determines what each execution does before it runs and does not require compilation. This allows ClickCrystals users to easily reload or run their scripts in game.

All ClickCrystal scripts are run first thing upon game launch. This either includes the creation of new modules or other tasks such as saving the config or printing something into the console. If you want to execute scripts after launch, you can run the command ,ccs compile <your script>. If you want to execute a script file, ,ccs run <file path>.

Now, let’s dive deep into scripting.

All Script Commands

Category Name Description
Syntax on Registers an event listener.
if Evaluates an if statement.
if_not Evaluates an if statement and tests if value is false.
while Loops a CCS block or line until the condition is false.
while_not Loops a CCS block or line until the condition is true.
execute Executes any CCS script block or line.
execute_random Executes ONE RANDOM CCS script line from the next script block.
execute_period Executes the next code block with specified number of seconds of delay between each line
as Sets your script referencing entity to a specified target
wait Wait specified amount of seconds before executing a script line or block
wait_random Wait a random amount of time specified from the min and max arguments before executing a script line or block
loop Repeats a CCS block or line for the specified amount of times.
loop_period Repeats a CCS block or line for the specified amount of times, while also waiting a period before the next iteration.
print Prints the next quoted message in the console.
throw Throws an exception (error) with the message from the next quoted message.
exit Exits the Java JVM with the specified exit code.
function Calls a script function with the specified name.
cancel_packet Cancels the next packet with the specified type
uncancel_packet Removes the packet from cancel queue 
Client module Manages modules with the specified module id.
description Sets the description of the current script module to the next quoted message.
config Manages the config for ClickCrystals.
say Make the client type or execute the message of the next quote in chat.
send Direct messages the session user with the message of the next quote.
notify Sends a notification to the session user with the specified stay time and the message of the next quoted message.
playsound Plays a sound to the client session user with the specified volume and pitch.
define Defines a specific object for the client. Mostly used for scripting.
Macros drop Drop the item you have in your main hand with the specified amount.
teleport Send a teleport packet to the server to change your position instantly.
velocity Send a velocity packet to the server to change your velocity
turn_to Slowly turn your head camera to a specified object in the world to simulate player input.
snap_to Snaps your head camera instantly to a specified object in the world. Does not simulate player input.
damage Sends an attack packet to the nearest of the specified entity.
switch Hotkeys to the specified item in your hotbar.
swap Swap the item in your main hand with the one in your offhand.
input Simulates a player input: attack, use, walk, etc...
hold_input Holds a player input: attack, use, walk, etc… for specified number of seconds
gui_drop If inventory is opened, drop the specified item with the specified amount.
gui_switch If inventory is opened, hover the cursor over the specified item.
gui_swap If inventory is opened, swap the specified item with your offhand item.
gui_quickmove If inventory is opened, quickmove the specified item.

Argument Abbreviation Key

Symbol Meaning Example
** Argument format may not be uniform, some may require you to provide another one. A [**] prefix would indicate the argument is only needed for some specific previous arguments. **N
.. [..] argument would indicate any CCS script block or line can follow after. ..
N [N] argument indicates any decimal number. N
n [n] argument indicates any whole number (integer). n
+N [+N] argument indicates an operator in front of a decimal number, there are NO SPACES between the two. +N
+n [+n] argument indicates an operator in front of the whole number (integer), there are NO SPACES between the two. +n
ID [ID] argument indicates minecraft identifiers. Prefix [:] implies exact match, prefix [#] implies match contains. :diamond_sword_Or_#sword
“” A quoted message “Hello World!”

Script Blocks & Lines

A script line is a singular script command. This could sometimes be chained using then-chains. A script block is a collection of one or more script lines surrounded by brackets. If a script block is typed all on one line, semicolons are needed at the end of each line to distinguish it from the rest in the block.

A Script Line A Script Block

Declaring a Custom Module

All custom modules have a module id and a description to start off with. A module id is a singular lower-case string with hyphens instead of spaces. A description is surrounded by quotations. Both of these elements can be declared using the “define” command.

\

Script Abbreviations & Aliases

Sometimes some script commands may be a hassle to type for what it’s worth, so there are a few abbreviations that could come in handy.

Here’s a table of them:

Pattern Abbreviation
if_not !if
while_not !while
function func
description desc
define def
define description def desc
define function def func

Command: on

Registers an event listener.

All Events & Emissions

Name  Usage  Example  Emission 
right_click on right_click .. on right_click { send "Hello world!"; } pre
left_click on left_click .. on left_click { send "Hello World!"; } pre
middle_click on middle_click .. on middle_click { send "Hello World!"; } pre
right_release on right_release .. on right_release { send "Hello world!"; } pre
left_release on left_release .. on left_release { send "Hello World!"; } pre
middle_release on middle_release .. on middle_release { send "Hello World!"; } pre
place_block on place_block .. on place_block { if holding :dirt { send "Hello World!"; } } pre
break_block on break_block .. on break_block { if target_block :dirt { send "Hello World!"; } } post
punch_block on punch_block .. on punch_block { if target_block :dirt { send "Hello World!"; } } pre
interact_block on interact_block .. on interact_block { if target_block :dirt { send "Hello World!"; } } pre
tick on tick .. on tick { send "Hello World!"; } pre (>=1.2.7), post (<=1.2.6)
pre_tick  on pre_tick .. on pre_tick { send “Hello World!”; } pre
post_tick on post_tick .. on post_tick { send “Hello World!”; } post
item_use on item_use .. on item_use { send "Hello World!"; } pre
item_consume on item_consume on item_consume { send "Hello World!"; } pre
totem_pop on totem_pop .. on totem_pop { send "Hello World!"; } post
module_enable on module_enable .. on module_enable { send "Hello World!"; } post
module_disable on module_disable .. on module_disable { send "Hello World!"; } post
move_pos on move_pos .. on move_pos { send "Hello World!"; } pre
move_look on move_look .. on move_look { send "Hello World!"; } pre
key_press on key_press **key .. on key_press e { send "Hello World!"; } pre
key_release on key_release **key .. on key_release e { send "Hello World!"; } pre
damage on damage .. on damage { send "Hello World!"; } post
respawn on respawn .. on respawn { send "Hello World!"; } post
death on death .. on death { send "Hello World!"; } post
game_join on game_join .. on game_join { send "Hello World!"; } pre
game_leave on game_leave .. on game_leave { send "Hello World!"; } pre
chat_send on chat_send **message .. on chat_send "real" { send "Hello World!"; } pre
chat_receive on chat_receive **message .. on chat_receive "real" { send "Hello World!"; } post

Command: if, if_not

Evaluates an if statement.

All Conditions & Examples

Name  Usage  Example
holding if holding **ID .. if holding :diamond { send "Hello World!"; }
off_holding if off_holding **ID .. if off_holding :diamond { send "Hello World!"; }
inventory_has if inventory_has **ID .. if inventory_has :diamond { send "Hello World!"; }
hotbar_has if hotbar_has **ID .. if hotbar_has :diamond { send "Hello World!"; }
target_block if target_block **ID .. if target_block :diamond_block { send "Hello World!"; }
target_entity if target_entity **ID .. if target_entity :creeper { send "Hello World!"; }
targeting_entity if targeting_entity .. if targeting_entity { send "Hello World!"; }
targeting_block if targeting_block .. if targeting_block { send "Hello World!"; }
input_active if input_active **input .. if input_active attack { send "Hello World!"; }
block_in_range if block_in_range **ID **N .. if block_in_range #diamond_ore 16.0 { send "Hello World!"; }
entity_in_range if entity_in_range **ID **N .. if entity_in_range :zombie 16.0 { send "Hello World!"; }
attack_progress if attack_progress **+N .. if attack_progress >=0.9 { send "Hello World!"; }
health if health **+N .. if health >=20.0 { send "Hello World!"; }
armor if armor **+N .. if armor >=20.0 { send "Hello World!"; }
pos_x if pos_x **+N .. if pos_x >=20.0 { send "Hello World!"; }
pos_y if pos_y **+N .. if pos_y >=20.0 { send "Hello World!"; }
pos_z if pos_z **+N .. if pos_z >=20.0 { send "Hello World!"; }
module_enabled if module_enabled **a-module-id .. if module_enabled armor-hud { send "Hello World!"; }
module_disabled if module_disabled **a-module-id .. if module_disabled armor-hud { send "Hello World!"; }
block if block **N **N **N **ID .. if block ^ ^ ^1 :diamond_block { send "Hello World!"; }
entity if entity **N **N **N **ID .. as nearest_entity :item if entity ~ ~ ~ :armor_stand { send "Hello World!"; }
dimension if dimension **dimension_name .. if dimension the_nether { send "Hello World!"; }
effect_duration if effect_duration **ID **+N .. if effect_duration :poison >=1 { send "Hello World!"; }
effect_amplifier if effect_amplifier **ID **+N .. if effect_amplifier :poison >=1 { send "Hello World!"; }
in_game if in_game .. if in_game { send "I'm in the world, but I could be AFK."; }
playing if playing .. if playing { send "I'm in the world and not AFK."; }
chance_of if chance_of **N .. if chance_of 50 { send "A 50/50 chance!"; }
on_ground if on_ground .. if on_ground { send "Hello World!"; }
on_fire if on_fire .. if on_fire { send "Hello World!"; }
frozen if frozen .. if frozen { send "Hello World!"; }
has_equipment if has_equipment **ID .. if has_equipment #netherite { send "Hello World!"; }
blocking if blocking .. if blocking { send "Hello World!"; }
in_singleplayer if in_singleplayer .. if in_singleplayer { send "Hello World!"; }
hurt_time if hurt_time **+n .. if hurt_time >=1 { send "Hello World!"; }
cursor_item if cursor_item **ID .. if cursor_item #totem { send "Hello World!"; }
moving if moving .. if moving { send "Hello World!"; }
colliding if colliding .. if colliding { send "Hello World!"; }
colliding_horizontally if colliding_horizontally .. if colliding_horizontally { send "Hello World!"; }
colliding_vertically if colliding_vertically .. if colliding_vertically { send "Hello World!"; }
reference_entity if reference_entity **ID .. if reference_entity :player,:skeleton { send "Hello World!"; }
hunger if hunger **+N .. if hunger <=20 { send “Hello World!”; }
jumping if jumping .. if jumping { send “Jumping”; }
hovering_over if hovering_over **ID .. if hovering_over #totem { input key f; }
dead if dead .. if dead { send “I am dead”; }
item_count if item_count **ID **+N .. if item_count #pearls <=1 { send “Ender pearls are almost used up!”; }
item_durability if item_durability **ID **+N if item_durability #sword <=0.1 { send “Your sword is breaking!”; }

All Conditions & Meanings

Name  Meaning and What For
holding If the reference entity is holding this item in main hand
off_holding If the reference entity is holding this item in off hand
inventory_has If the reference entity’s inventory has this item
hotbar_has If the reference entity’s hotbar has this item
target_block If the reference entity is targeting this block
target_entity If the reference entity is targeting this entity
targeting_entity If the reference entity is targeting any entity
targeting_block If the reference entity is targeting any block
input_active If the player has this input active
block_in_range If the reference entity is around this block within this range
entity_in_range If the reference entity is around this entity within this range
attack_progress If the player’s attack cooldown is this range
health If the reference entity’s health value is this range
armor If the reference entity’s armor value is this range
pos_x If the reference entity’s x position is this range
pos_y If the reference entity’s y position is this range
pos_z If the reference entity’s z position is this range
module_enabled If the client has this module enabled
module_disabled If the client has this module disabled
block If the client world has this block at this x, y, z coordinates or reference entity’s relative ~ ~ ~ coordinates
entity If the client world has this entity at this x, y, z coordinates or reference entity’s relative ~ ~ ~ coordinates
dimension If the player is in this dimension (overworld, the_nether, the_end)
effect_duration If the reference entity has this effect with duration in this range
effect_amplifier If the reference entity has this effect with amplifier in this range
in_game If the player is inside of a world or a multiplayer server, but could be afk.
playing If the player is inside of a world or a multiplayer server and not afk.
chance_of A random chance in %
on_ground If the reference entity is on ground
on_fire If the reference entity is on fire
frozen If the reference entity is frozen
has_equipment If the reference entity has this item equipped
blocking If the reference entity is blocking with a shield
in_singleplayer If the client is in singleplayer
hurt_time If the reference entity’s hurt time value is in this range
cursor_item If the client’s cursor item matches this item (only works in inventory GUI)
moving If the reference entity is moving
colliding If the reference entity is colliding vertically or horizontally
colliding_horizontally If the reference entity is colliding horizontally
colliding_vertically If the reference entity is colliding vertically (true if on ground)
reference_entity If the script’s reference entity is a type of this entity
hunger Compares script’s reference entity’s hunger or saturation to a value
jumping If the player is jumping
hovering_over If the player is hovering over an item in the inventory
dead If the script’s reference entity is dead
item_count Compares the item’s count with a value
item_durability Compares the item’s count with a decimal value representing use progress

Command: while, while_not

Loops a script block or line until a condition is not met.

All Conditions & Examples

Name  Usage  Example
holding while **N holding **ID .. while 0.05 holding :diamond { send "Hello World!"; }
off_holding while **N off_holding **ID .. while 0.05 off_holding :diamond { send "Hello World!"; }
inventory_has while **N inventory_has **ID .. while 0.05 inventory_has :diamond { send "Hello World!"; }
hotbar_has while **N hotbar_has **ID .. while 0.05 hotbar_has :diamond { send "Hello World!"; }
target_block while **N target_block **ID .. while 0.05 target_block :diamond_block { send "Hello World!"; }
target_entity while **N target_entity **ID .. while 0.05 target_entity :creeper { send "Hello World!"; }
targeting_entity while **N targeting_entity .. while 0.05 targeting_entity { send "Hello World!"; }
targeting_block while **N targeting_block .. while 0.05 targeting_block { send "Hello World!"; }
input_active while **N input_active **input .. while 0.05 input_active attack { send "Hello World!"; }
block_in_range while **N block_in_range **ID **N .. while 0.05 block_in_range #diamond_ore 16.0 { send "Hello World!"; }
entity_in_range while **N entity_in_range **ID **N .. while 0.05 entity_in_range :zombie 16.0 { send "Hello World!"; }
attack_progress while **N attack_progress **+N .. while 0.05 attack_progress >=0.9 { send "Hello World!"; }
health while **N health **+N .. while 0.05 health >=20.0 { send "Hello World!"; }
armor while **N armor **+N .. while 0.05 armor >=20.0 { send "Hello World!"; }
pos_x while **N pos_x **+N .. while 0.05 pos_x >=20.0 { send "Hello World!"; }
pos_y while **N pos_y **+N .. while 0.05 pos_y >=20.0 { send "Hello World!"; }
pos_z while **N pos_z **+N .. while 0.05 pos_z >=20.0 { send "Hello World!"; }
module_enabled while **N module_enabled **a-module-id .. while 0.05 module_enabled armor-hud { send "Hello World!"; }
module_disabled while **N module_disabled **a-module-id .. while 0.05 module_disabled armor-hud { send "Hello World!"; }
block while **N block **N **N **N **ID .. while 0.05 block ^ ^ ^1 :diamond_block { send "Hello World!"; }
entity while **N entity **N **N **N **ID .. while 0.05 entity ^ ^ ^1 :creeper,:zombie { send "Hello World!"; }
dimension while **N dimension **dimension_name .. while 0.05 dimension the_nether { send "Hello World!"; }
effect_duration while **N effect_duration **ID **+N .. while 0.05 effect_duration :poison >=1 { send "Hello World!"; }
effect_amplifier while **N effect_amplifier **ID **+N .. while 0.05 effect_amplifier :poison >=1 { send "Hello World!"; }
in_game while **N in_game .. while 0.05 in_game { send "I'm in the world, but I could be AFK."; }
playing while **N playing .. while 0.05 playing { send "I'm in the world and not AFK."; }
chance_of while **N chance_of **N .. while 0.05 chance_of 50 { send "A 50/50 chance!"; }
on_ground while on_ground .. while  on_ground { send "Hello World!"; }
on_fire while on_fire .. while on_fire { send "Hello World!"; }
frozen while frozen .. while frozen { send "Hello World!"; }
has_equipment while has_equipment **ID .. while has_equipment #netherite { send "Hello World!"; }
blocking while blocking .. while blocking { send "Hello World!"; }
in_singleplayer while in_singleplayer .. while in_singleplayer { send "Hello World!"; }
hurt_time while hurt_time **+n .. while hurt_time >=1 { send "Hello World!"; }
cursor_item while cursor_item **ID .. while cursor_item #totem { send "Hello World!"; }
moving while moving .. while moving { send "Hello World!"; }
colliding while colliding .. while colliding { send "Hello World!"; }
colliding_horizontally while colliding_horizontally .. while colliding_horizontally { send "Hello World!"; }
colliding_vertically while colliding_vertically .. while colliding_vertically { send "Hello World!"; }
reference_entity while reference_entity **ID .. while reference_entity :player,:skeleton { send "Hello World!"; }
hunger while hunger **+N .. while hunger <=20 { send “Hello World!”; }
jumping while jumping .. while jumping { send “Jumping”; }
hovering_over while hovering_over **ID .. while hovering_over #totem { input key f; }
dead while dead .. while dead { send “I am dead”; }
item_count while item_count **ID **+N .. while item_count #pearls <=1 { send “Ender pearls are almost used up!”; }
item_durability while item_durability **ID **+N while item_durability #sword <=0.1 { send “Your sword is breaking!”; }

Command: execute

Executes a script block or line. Most of the time this is used as an execution for script blocks as script lines can be executed individually.

Usage Example
execute .. execute { send “Hello World”; send “Lol”; }

Command: execute_random

In a script block, choose a random line in it and execute it.

Usage Example
execute_random .. execute_random { send “Hello World”; send “Lol”; }

Command: execute_period

In a script block, wait N seconds between execution of each line in the block

Usage Example
execute_period **N  .. execute_period 0.25 { send “Hello World”; send “Lol”; }

Command: as

Set the script referencing entity to a target. Do note that this would only work for conditionals and nothing else. Not all conditions support referencing. The reference is reset after the next if command.

Usage Example
as **target **ID as nearest_entity :zombie if on_fire { send “A nearby zombie is on fire.” }
as **target as target_entity if on_fire { send “Target entity is on fire.” }
as client as client if playing { send “Client player entity is in game and not in a screen or afk.” }

Command: wait

Executes a script block or line. Most of the time this is used as an execution for script blocks as script lines can be executed individually.

Usage Example
wait **N .. wait 0.05 { send “Hello World”; send “Lol”; }

Command: wait_random

Executes a script block or line. Most of the time this is used as an execution for script blocks as script lines can be executed individually.

Usage Example
wait_random **N **N .. wait_random 0.05 0.15 { send “Hello World”; send “Lol”; }

Command: loop

Execute a script line or block N times.

Usage Example
loop **N .. loop 10 { send “Hello World”; }

Command: loop_period

Execute a script line or block Ntimes times with a period of Nperiod seconds.

Usage Example
loop_period **Ntimes **Nperiod .. loop_period 10 1 { send “Hello World”; }

Command: send, throw, say, description, print

Does something with the next quoted message.

Command Action Example
send Sends the message to the client send “Hello world!”
throw Throws an exception/error with with the message throw “Hello world!”
say Say the message in chat to the server say “Hello world!”
description Sets the current module description to the message description “Hello world!”
print Prints the message in console/log print “Hello world!”

Command: exit

Exits the Java JVM with the specified exit code.

Usage Example
exit **n exit -1

Command: module

Manages modules

Argument Usage Example
create module create **module-id module create kill-aura
enable module enable **module-id module enable click-crystal
disable module disable **module-id module disable click-crystal

\

Command: function

Calls a defined function in the current script file.

Usage Example
function **name function anyDeclaredFunctionName

To define or declare a function, see the define command.

Command: define

Defines an object

Argument Usage Example
function define function **name .. define function anyFunctionName { send “Hello World!”; send “Lol”; }
description define description ”” define description “This is a description”
module define module **module-id define module new-module

Command: config

Manages your current configuration profile.

Argument Usage Example
save config save config save
load config load config load
reload config reload config reload

Command: notify

Sends a notification to the client

Usage Example
notify **N ”” notify 3 “Hello World”

Command: playsound

Plays a sound to the client with Nvolume volume and Npitch pitch.

Usage Example
playsound **ID **Nvolume **Npitch playsound #trident.throw 1 0.1

Command: input, hold_input

Simulates a player input

Usage Example
input **input_name input attack
hold_input **input_name Nseconds hold_input attack 2.0
hold_input cancel hold_input cancel

All Input Names

Input Name Action Conditional 
attack Attacks with current hand item If player is holding down attack key
use Uses current hand item If player is holding down use key
forward Presses forward key for 10 ticks If player is holding down forward key
backward Presses backward key for 10 ticks If player is holding down backward key
strafe_left Presses left key for 10 ticks If player is holding down left key
strafe_right Presses right key for 10 ticks If player is holding down right key
jump Jumps  If player is holding down jump key
sprint Turns on toggle sprint then presses sprint If player is sprinting
sneak Presses sneak key for 10 ticks If player is sneaking
lock_cursor Locks your cursor If player’s cursor is locked
unlock_cursor Unlocks your cursor If player’s cursor is unlocked
left Presses left mouse button If player’s left mouse button is clicked
right Presses right mouse button If player’s right mouse button is clicked
middle Pressed middle mouse button If player’s middle mouse button is clicked
inventory Opens inventory if closed, closes if open. If players inventory is open
key Presses the specified key on your keyboard If the specified key is held down







\

Command: gui_switch, gui_swap, gui_quickmove

Manages inventory

Command Usage Example
gui_switch gui_switch **ID gui_switch :totem_of_undying
gui_swap gui_swap **ID gui_swap :totem_of_undying
gui_quickmove gui_quickmove **ID gui_quickmove :totem_of_undying
gui_quickmove gui_quickmove **ID **n gui_quickmove :totem_of_undying 7

Command: gui_drop

Drops a certain item type with N amount, or “al”l for the entire stack.

Usage Example
gui_drop **ID **N gui_drop :dirt 45
gui_drop **ID all gui_drop :dirt all

Command: switch

Hotkeys to a certain item in the hotbar, or “back” to the previous slot.

Usage Example
switch **ID switch #totem
switch back switch back

\

Command: swap

Swaps current hand item with offhand item.

Usage Example
swap swap

Command: turn_to, snap_to

Slowly turn to or snap instantly to a target, then when done, execute a callback.

Usage Example
turn_to **filtered_target_type **ID then .. turn_to nearest_entity :player then input attack
turn_to **singular_target_type then .. turn_to any_block then input use

\

All Target Types

Filtered Target Types Description
nearest_entity Nearest entity, but specifies which type
nearest_block Nearest block, but specifies which type
Singular Target Types
any_block Nearest block of any type
any_entity Nearest entity of any type

Command: damage

Sends a damage packet to the server

Usage Example
damage **filtered_target_type **ID damage nearest_entity :creeper
damage **singular_target_type damage any_entity

Command: drop

Drops the current hand item for N amount, or all for the entire stack.

Usage Example
drop **N drop 32
drop all drop all

Command: velocity, teleport

Modify movement/position

Usage Example
teleport **~N **~N **~N teleport ~ ~10 ~
velocity **~N **~N **~N velocity ^ ^ ^3

~N is a very special kind of decimal argument that allows: 

  • ~ to represent relativity position-wise

  • ^ to represent relativity vector-wise

Command: cancel_packet

Adds a packet type to a queue, then cancels the next packet that gets sent or received with the same type from the queue.

Usage Example
cancel_packet c2s **packetName cancel_packet c2s playerInteractBlock
cancel_packet s2c **packetName cancel_packet s2c playerInteractBlock

Packet Types

**packetName is a special argument that specifies the packet type to queue. A list of these packet types can be found in 

Packet Type Scripting ID
AcknowledgeChunksC2SPacket C2S acknowledgeChunks
AcknowledgeReconfigurationC2SPacket C2S acknowledgeReconfiguration
AdvancementTabC2SPacket C2S advancementTab
BoatPaddleStateC2SPacket C2S boatPaddleState
BookUpdateC2SPacket C2S bookUpdate
ButtonClickC2SPacket C2S buttonClick
ChatCommandSignedC2SPacket C2S chatCommandSigned
ChatMessageC2SPacket C2S chatMessage
ClickSlotC2SPacket C2S clickSlot
ClientCommandC2SPacket C2S clientCommand
ClientStatusC2SPacket C2S clientStatus
CloseHandledScreenC2SPacket C2S closeHandledScreen
CommandExecutionC2SPacket C2S commandExecution
CraftRequestC2SPacket C2S craftRequest
CreativeInventoryActionC2SPacket C2S creativeInventoryAction
DebugSampleSubscriptionC2SPacket C2S debugSampleSubscription
HandSwingC2SPacket C2S handSwing
JigsawGeneratingC2SPacket C2S jigsawGenerating
MessageAcknowledgmentC2SPacket C2S messageAcknowledgment
PickFromInventoryC2SPacket C2S pickFromInventory
PlayerActionC2SPacket C2S playerAction
PlayerInputC2SPacket C2S playerInput
PlayerInteractBlockC2SPacket C2S playerInteractBlock
PlayerInteractEntityC2SPacket C2S playerInteractEntity
PlayerInteractItemC2SPacket C2S playerInteractItem
PlayerMoveC2SPacket C2S playerMove
PlayerSessionC2SPacket C2S playerSession
QueryBlockNbtC2SPacket C2S queryBlockNbt
QueryEntityNbtC2SPacket C2S queryEntityNbt
RecipeBookDataC2SPacket C2S recipeBookData
RecipeCategoryOptionsC2SPacket C2S recipeCategoryOptions
RenameItemC2SPacket C2S renameItem
RequestCommandCompletionsC2SPacket C2S requestCommandCompletions
SelectMerchantTradeC2SPacket C2S selectMerchantTrade
SlotChangedStateC2SPacket C2S slotChangedState
SpectatorTeleportC2SPacket C2S spectatorTeleport
TeleportConfirmC2SPacket C2S teleportConfirm
UpdateBeaconC2SPacket C2S updateBeacon
UpdateCommandBlockC2SPacket C2S updateCommandBlock
UpdateCommandBlockMinecartC2SPacket C2S updateCommandBlockMinecart
UpdateDifficultyC2SPacket C2S updateDifficulty
UpdateDifficultyLockC2SPacket C2S updateDifficultyLock
UpdateJigsawC2SPacket C2S updateJigsaw
UpdatePlayerAbilitiesC2SPacket C2S updatePlayerAbilities
UpdateSelectedSlotC2SPacket C2S updateSelectedSlot
UpdateSignC2SPacket C2S updateSign
UpdateStructureBlockC2SPacket C2S updateStructureBlock
VehicleMoveC2SPacket C2S vehicleMove
AdvancementUpdateS2CPacket S2C advancementUpdate
BlockBreakingProgressS2CPacket S2C blockBreakingProgress
BlockEntityUpdateS2CPacket S2C blockEntityUpdate
BlockEventS2CPacket S2C blockEvent
BlockUpdateS2CPacket S2C blockUpdate
BossBarS2CPacket S2C bossBar
BundleDelimiterS2CPacket S2C bundleDelimiter
BundleS2CPacket S2C bundle
ChangeUnlockedRecipesS2CPacket S2C changeUnlockedRecipes
ChatMessageS2CPacket S2C chatMessage
ChatSuggestionsS2CPacket S2C chatSuggestions
ChunkBiomeDataS2CPacket S2C chunkBiomeData
ChunkDataS2CPacket S2C chunkData
ChunkDeltaUpdateS2CPacket S2C chunkDeltaUpdate
ChunkLoadDistanceS2CPacket S2C chunkLoadDistance
ChunkRenderDistanceCenterS2CPacket S2C chunkRenderDistanceCenter
ChunkSentS2CPacket S2C chunkSent
ClearTitleS2CPacket S2C clearTitle
CloseScreenS2CPacket S2C closeScreen
CommandSuggestionsS2CPacket S2C commandSuggestions
CommandTreeS2CPacket S2C commandTree
CooldownUpdateS2CPacket S2C cooldownUpdate
CraftFailedResponseS2CPacket S2C craftFailedResponse
DamageTiltS2CPacket S2C damageTilt
DeathMessageS2CPacket S2C deathMessage
DebugSampleS2CPacket S2C debugSample
DifficultyS2CPacket S2C difficulty
EndCombatS2CPacket S2C endCombat
EnterCombatS2CPacket S2C enterCombat
EnterReconfigurationS2CPacket S2C enterReconfiguration
EntitiesDestroyS2CPacket S2C entitiesDestroy
EntityAnimationS2CPacket S2C entityAnimation
EntityAttachS2CPacket S2C entityAttach
EntityAttributesS2CPacket S2C entityAttributes
EntityDamageS2CPacket S2C entityDamage
EntityEquipmentUpdateS2CPacket S2C entityEquipmentUpdate
EntityPassengersSetS2CPacket S2C entityPassengersSet
EntityPositionS2CPacket S2C entityPosition
EntityS2CPacket S2C entity
EntitySetHeadYawS2CPacket S2C entitySetHeadYaw
EntitySpawnS2CPacket S2C entitySpawn
EntityStatusEffectS2CPacket S2C entityStatusEffect
EntityStatusS2CPacket S2C entityStatus
EntityTrackerUpdateS2CPacket S2C entityTrackerUpdate
EntityVelocityUpdateS2CPacket S2C entityVelocityUpdate
ExperienceBarUpdateS2CPacket S2C experienceBarUpdate
ExperienceOrbSpawnS2CPacket S2C experienceOrbSpawn
ExplosionS2CPacket S2C explosion
GameJoinS2CPacket S2C gameJoin
GameMessageS2CPacket S2C gameMessage
GameStateChangeS2CPacket S2C gameStateChange
HealthUpdateS2CPacket S2C healthUpdate
InventoryS2CPacket S2C inventory
ItemPickupAnimationS2CPacket S2C itemPickupAnimation
LightUpdateS2CPacket S2C lightUpdate
LookAtS2CPacket S2C lookAt
MapUpdateS2CPacket S2C mapUpdate
NbtQueryResponseS2CPacket S2C nbtQueryResponse
OpenHorseScreenS2CPacket S2C openHorseScreen
OpenScreenS2CPacket S2C openScreen
OpenWrittenBookS2CPacket S2C openWrittenBook
OverlayMessageS2CPacket S2C overlayMessage
ParticleS2CPacket S2C particle
PlayerAbilitiesS2CPacket S2C playerAbilities
PlayerActionResponseS2CPacket S2C playerActionResponse
PlayerListHeaderS2CPacket S2C playerListHeader
PlayerListS2CPacket S2C playerList
PlayerPositionLookS2CPacket S2C playerPositionLook
PlayerRemoveS2CPacket S2C playerRemove
PlayerRespawnS2CPacket S2C playerRespawn
PlayerSpawnPositionS2CPacket S2C playerSpawnPosition
PlaySoundFromEntityS2CPacket S2C playSoundFromEntity
PlaySoundS2CPacket S2C playSound
ProfilelessChatMessageS2CPacket S2C profilelessChatMessage
ProjectilePowerS2CPacket S2C projectilePower
RemoveEntityStatusEffectS2CPacket S2C removeEntityStatusEffect
RemoveMessageS2CPacket S2C removeMessage
ScoreboardDisplayS2CPacket S2C scoreboardDisplay
ScoreboardObjectiveUpdateS2CPacket S2C scoreboardObjectiveUpdate
ScoreboardScoreResetS2CPacket S2C scoreboardScoreReset
ScoreboardScoreUpdateS2CPacket S2C scoreboardScoreUpdate
ScreenHandlerPropertyUpdateS2CPacket S2C screenHandlerPropertyUpdate
ScreenHandlerSlotUpdateS2CPacket S2C screenHandlerSlotUpdate
SelectAdvancementTabS2CPacket S2C selectAdvancementTab
ServerMetadataS2CPacket S2C serverMetadata
SetCameraEntityS2CPacket S2C setCameraEntity
SetTradeOffersS2CPacket S2C setTradeOffers
SignEditorOpenS2CPacket S2C signEditorOpen
SimulationDistanceS2CPacket S2C simulationDistance
StartChunkSendS2CPacket S2C startChunkSend
StatisticsS2CPacket S2C statistics
StopSoundS2CPacket S2C stopSound
SubtitleS2CPacket S2C subtitle
SynchronizeRecipesS2CPacket S2C synchronizeRecipes
TeamS2CPacket S2C team
TickStepS2CPacket S2C tickStep
TitleFadeS2CPacket S2C titleFade
TitleS2CPacket S2C title
UnloadChunkS2CPacket S2C unloadChunk
UpdateSelectedSlotS2CPacket S2C updateSelectedSlot
UpdateTickRateS2CPacket S2C updateTickRate
VehicleMoveS2CPacket S2C vehicleMove
WorldBorderCenterChangedS2CPacket S2C worldBorderCenterChanged
WorldBorderInitializeS2CPacket S2C worldBorderInitialize
WorldBorderInterpolateSizeS2CPacket S2C worldBorderInterpolateSize
WorldBorderSizeChangedS2CPacket S2C worldBorderSizeChanged
WorldBorderWarningBlocksChangedS2CPacket S2C worldBorderWarningBlocksChanged
WorldBorderWarningTimeChangedS2CPacket S2C worldBorderWarningTimeChanged
WorldEventS2CPacket S2C worldEvent
WorldTimeUpdateS2CPacket S2C worldTimeUpdate

\

Command: uncancel_packet

Removes a packet from the cancel queue if it exists in the queue, so that the next packet will no longer be canceled.

Usage Example
teleport **~N **~N **~N teleport ~ ~10 ~
velocity **~N **~N **~N velocity ^ ^ ^3

~N is a very special kind of decimal argument that allows: 

  • ~ to represent relativity position-wise

  • ^ to represent relativity vector-wise

\

Our Example Scripts

Here are some of our working example scripts provided by the community:

\

def module silk-touch

def desc "Makes any tool silk touch - I_Got_You_Dead"

on module_enable {

   say "I just made my tool silk touch, this is not possible and I will now crash my game."

   module disable silk-touch

   exit -1

}




def module potion-switch

def desc "Right click your sword to throw a potion"

on right_click if playing if holding #sword {

   switch #splash_potion

   wait 0.05 !if holding #sword {

      switch #sword

   }

}




def module command-macros

def desc "All kinds of command macros, add more in the script file!"

on key_press j if playing say /spawn

on key_press k if playing say /home home

on key_press l if playing say /dupe




def module right-click-aim

def desc "Real not hax"

on right_click if playing {

   if holding #sword {

  	turn_to nearest_entity :player then {

         if attack_progress >=0.9 input attack

      }

   }

}