Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var scriptName = "Test speed";
- var scriptVersion = 0.1;
- var scriptAuthor = "Dr_Kousek";
- var wait;
- var testSpeed = new TestSpeed();
- var client;
- Math.radians = function(degrees) {
- return degrees * Math.PI / 180;
- };
- function setMoveSpeed(movespeed) {
- if (mc.thePlayer.movementInput.moveStrafe == 0 && mc.thePlayer.movementInput.moveForward != 0) {
- mc.thePlayer.motionX = parseFloat(mc.thePlayer.movementInput.moveForward * movespeed * Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)) )
- mc.thePlayer.motionZ = parseFloat(mc.thePlayer.movementInput.moveForward * movespeed * Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)) )
- } else if (mc.thePlayer.movementInput.moveStrafe != 0 && mc.thePlayer.movementInput.moveForward != 0){
- mc.thePlayer.motionX = parseFloat((mc.thePlayer.movementInput.moveForward / 1.4142135623730950488016887242097) * movespeed * Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)) + (mc.thePlayer.movementInput.moveStrafe / 1.4142135623730950488016887242097) * movespeed * Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)))
- mc.thePlayer.motionZ = parseFloat((mc.thePlayer.movementInput.moveForward / 1.4142135623730950488016887242097) * movespeed * Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)) - (mc.thePlayer.movementInput.moveStrafe / 1.4142135623730950488016887242097) * movespeed * Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)))
- } else if (mc.thePlayer.movementInput.moveStrafe != 0 && mc.thePlayer.movementInput.moveForward == 0){
- mc.thePlayer.motionX = parseFloat((mc.thePlayer.movementInput.moveForward / 1) * movespeed * Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)) + (mc.thePlayer.movementInput.moveStrafe / 1) * movespeed * Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)))
- mc.thePlayer.motionZ = parseFloat((mc.thePlayer.movementInput.moveForward / 1) * movespeed * Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)) -(mc.thePlayer.movementInput.moveStrafe / 1) * movespeed * Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)))
- }
- }
- function TestSpeed() {
- this.getName = function() {
- return "TestSpeed";
- };
- this.getDescription = function() {
- return "Enable for find bypassing speed";
- };
- this.getCategory = function() {
- return "Fun";
- };
- this.onUpdate = function() {
- //mc.thePlayer.moveStrafing += 9999999999999;
- if(mc.thePlayer.onGround && mc.gameSettings.keyBindForward.pressed){
- //var onGround = (mc.thePlayer.onGround && (mc.thePlayer.moveForward == 0 && mc.thePlayer.moveStrafing == 0));
- //if(mc.gameSettings.keyBindJump.isKeyDown()){
- //mc.thePlayer.jump(true);
- //mc.thePlayer.motionX = 0.4;
- //mc.thePlayer.motionY = 0.432;
- //mc.thePlayer.motionZ = 0.4;
- //mc.thePlayer.jump();
- //mc.thePlayer.jump();
- //mc.thePlayer.motionY = -0.42;
- //mc.timer.timerSpeed = 1;
- //mc.thePlayer.speedOnGround = 99999999;
- //mc.thePlayer.landMovementFactor = 999999999;
- //mc.thePlayer.speedInAir = 0.02;
- mc.thePlayer.jump();
- setMoveSpeed(0.4);
- switch(ticks) {
- case 3:
- mc.thePlayer.jump();
- setMoveSpeed(0.6);
- case 5:
- ticks = 0;
- break;
- default:
- ticks += 1;
- }
- }
- }
- }
- function onLoad() {
- };
- function onEnable() {
- ticks = 0
- client = moduleManager.registerModule(testSpeed);
- };
- function onDisable() {
- moduleManager.unregisterModule(client);
- };
Advertisement
Add Comment
Please, Sign In to add comment