Killaura

Note, the targets are grabbed from the Rise KillAura module

var module = rise.registerModule("ScriptKillaura", "A test KillAura :)")

module.registerSetting("number"/*Setting Type*/, "Range"/*Setting Name*/, 3 /*Default Value*/, 3/*Min Value*/,6/*Max Value*/,0.1/*Increment*/)
module.registerSetting("boolean"/*Setting Type*/, "RayCast"/*Setting Name*/, true/*Default Value*/)
module.registerSetting("boolean"/*Setting Type*/, "Movement Correction"/*Setting Name*/, false/*Default Value*/)


script.handle("onUnload", function () {
    module.unregister()
})

module.handle("onPreMotion", function(e) {
    var entity = world.getTargetEntity(4/*Range*/);
    if (!entity) return
    
    var rotations = player.calculateRotations(entity);
    rotations.setX(rotations.getX() + (Math.random() - 0.5) * 2)
    rotations.setY(rotations.getY() + (Math.random() - 0.5) * 2)

    player.setRotation(rotations, 10, module.getSetting("Movement Correction"))

    if (Math.random() > 0.1) {
         player.swingItem()
         if (!module.getSetting("RayCast") || player.mouseOverEntity(entity, module.getSetting("Range"))) {
         player.attackEntity(entity)
       }
    }

    return e
})

Last updated