Last active
March 7, 2024 03:16
-
-
Save sebseb7/6477190dd531d05991741ccb031c0684 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * from Minecraft; | |
ACTIVE_CONFIG = Config.fromMap({ | |
"type": "boolean", | |
"name": "circleWalk", | |
"description": "circleWalk", | |
"default_value": false | |
}); | |
configHandler = new ConfigHandler("circleWalk", false); | |
configHandler.addConfigs([ACTIVE_CONFIG]); | |
configHandler.read(); | |
configKeybind = new KeyBind("toggle"); | |
configKeybind.setKey("o"); | |
configKeybind.setCallback(fun() { | |
if (ACTIVE_CONFIG.getValue()) { | |
ACTIVE_CONFIG.setValue(false); | |
print("[CW] off"); | |
} else { | |
ACTIVE_CONFIG.setValue(true); | |
print("[CW] on"); | |
} | |
}); | |
looking = 1; | |
minx = -26.5; | |
maxx = -17.5; | |
minz = 16.5; | |
maxz = 85.5; | |
while (true) { | |
player = Player.get(); | |
if (ACTIVE_CONFIG.getValue()) { | |
if(player.getX() > maxx) { | |
if(player.getZ() < minz) { | |
if(looking != 90){ | |
player.look(90, 0); | |
looking = 90; | |
} | |
} else { | |
if(looking != 180){ | |
player.look(180, 0); | |
looking = 180; | |
} | |
} | |
} else if(player.getX() < minx) { | |
if(player.getZ() > maxz) { | |
if(looking != 270){ | |
player.look(270, 0); | |
looking = 270; | |
} | |
} else { | |
if(looking != 0){ | |
player.look(0, 0); | |
looking = 0; | |
} | |
} | |
} else if(player.getZ() < minz) { | |
if(looking != 90){ | |
player.look(90, 0); | |
looking = 90; | |
} | |
} else if(player.getZ() > maxz) { | |
if(looking != 270){ | |
player.look(270, 0); | |
looking = 270; | |
} | |
} | |
} | |
if (ACTIVE_CONFIG.getValue()) { | |
Player.get().setWalking(true); | |
sleep(100); | |
Player.get().setWalking(false); | |
} | |
sleep(300); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment