Skip to content

Example Plugins

Death68093 edited this page Apr 23, 2026 · 2 revisions

Here are some examples plugins to get you started!

Spammer+

// Make the DeathClient object easier to use
const dc = window.DeathClient;
// Create a speed setting using a numerical slider from 0-100 with a default value of 0
let speed = dc.createSetting("Slider", "Delay", 0, 0, 100);

// Create a mode setting (because text settings aren't added yet, sorry.
let text1 = dc.createSetting("Mode", "Message", "Hello!", ["Hello!", "Hi!!!!", "Another Text!!", "WOW!!!"]); // You can add more texts here

// Create Variables for the mod
let sent = false;
let last = 0;
let now = 0;


// Create the mod
dc.createMod({
    // Name the mod (what will appear in the menu)
    name: "Spammer+",

    // Add the settings
    settings: [speed, text1],
    onEnable: function() {}, // Does nothing and can be removed, but here just to show where it would go
    onDisable: function() {}, // Does nothing and can be removed, but here just to show where it would go
    onUpdate: function(settings) { // Runs every game tick
        now += 1;
        if (!sent) {
            // Check if the time since last sent message is greater than or equal to the "Delay" setting
            if ((now - last) >= settings["Delay"].value) {
                // Set more variables
                last = now;
                now = 0;
                // Send the message to the server using the setting "Message"
                dc.sendChat(settings["Message"].value);
            }
        }
    }
});

EasyHome

// Make the deathclient object easier to access
const dc = window.DeathClient;

// Create a mod
dc.createMod({
    name: "EasyHome", // The name that will appear in the mod menu.
    description: "Instantly type /home (you might set a keybind 😉)",
    // When the mod is enabled
    onEnable: function() {
        dc.sendCommand("home"); // Send the server command "/home"
        dc.disableMod("EasyHome"); // Disable the mod so it can easily be used again
    }
});

Clone this wiki locally