@somehax ```
/// api_version=2
var safewalkModule = moduleManager.getModule("Safewalk");
var timerModule = moduleManager.getModule("Timer");
var script = registerScript({
name: "FlyNew",
version: "1.0.0",
authors: ["GLOBALBOSS&JustNanix&Caxap"]
});
script.registerModule({
name: "FlyNew",
category: "Fun",
description: "Moded GLOBALBOSS",
settings: {
damagePos: Setting.float({
name: "DamagePosition",
min: 0,
max: 400,
default: 200
}),
flySpeed: Setting.float({
name: "FlySpeed",
min: 0.20,
max: 0.30,
default: 0.22
}),
glide: Setting.float({
name: "Glide",
min: 0.00,
max: 0.05,
default: 0.010
})
}
}, function(module) {
var delay = 0;
var enable = true;
var flyspeed = module.settings.flySpeed.get();
module.on("update", function() {
if (mc.thePlayer.onGround) {
safewalkModule.setState(true)
}
if (!mc.thePlayer.onGround) {
if (enable) {
timerModule.setState(true)
mc.thePlayer.setPosition(mc.thePlayer.posX, module.settings.damagePos.get() - module.settings.damagePos.get() * 2, mc.thePlayer.posZ);
enable = false;
}
if (mc.thePlayer.getHealth() <= 19) {
mc.thePlayer.onGround = false;
mc.thePlayer.capabilities.setFlySpeed(module.settings.flySpeed.get() / 2);
mc.thePlayer.motionY = module.settings.glide.get() - module.settings.glide.get() * 2;
mc.thePlayer.capabilities.isFlying = true;
} else {
mc.thePlayer.setPosition(mc.thePlayer.posX, module.settings.damagePos.get() - module.settings.damagePos.get() * 2, mc.thePlayer.posZ);
}
}
});
module.on("enable", function() {
enable = true;
});
module.on("disable", function() {
mc.thePlayer.capabilities.isFlying = false;
safewalkModule.setState(false)
timerModule.setState(false)
});
});