Jump to content

Script: Difference between revisions

From Leaf Essentials
No edit summary
m Reverted edits by WikiAudit2026 (talk) to last revision by Ashy
Tag: Rollback
 
(2 intermediate revisions by one other user not shown)
(No difference)

Latest revision as of 04:46, 19 June 2026

This article is a stub. You can help by expanding it! :3

Hooks

Basic Hook Example

let ticks = 0;
let seconds = 0;
let tickHook = hook("tick", ()=>{
    ticks++;
    if(ticks % 20 == 0) {
        seconds++;
        mc.world.sendMessage("Hello, world!")
        if(seconds >= 5) {
            unhook(tickHook)
        }
    }
})