Dr_Kousek

Untitled

Jan 24th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. var scriptName = "Test speed";
  2. var scriptVersion = 0.1;
  3. var scriptAuthor = "Dr_Kousek";
  4. var wait;
  5. var testSpeed = new TestSpeed();
  6. var client;
  7. Math.radians = function(degrees) {
  8. return degrees * Math.PI / 180;
  9. };
  10. function setMoveSpeed(movespeed) {
  11. if (mc.thePlayer.movementInput.moveStrafe == 0 && mc.thePlayer.movementInput.moveForward != 0) {
  12. mc.thePlayer.motionX = parseFloat(mc.thePlayer.movementInput.moveForward * movespeed * Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)) )
  13. mc.thePlayer.motionZ = parseFloat(mc.thePlayer.movementInput.moveForward * movespeed * Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)) )
  14. } else if (mc.thePlayer.movementInput.moveStrafe != 0 && mc.thePlayer.movementInput.moveForward != 0){
  15. 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)))
  16. 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)))
  17. } else if (mc.thePlayer.movementInput.moveStrafe != 0 && mc.thePlayer.movementInput.moveForward == 0){
  18. 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)))
  19. 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)))
  20. }
  21. }
  22.  
  23. function TestSpeed() {
  24. this.getName = function() {
  25. return "TestSpeed";
  26. };
  27.  
  28. this.getDescription = function() {
  29. return "Enable for find bypassing speed";
  30. };
  31.  
  32. this.getCategory = function() {
  33. return "Fun";
  34. };
  35.  
  36. this.onUpdate = function() {
  37. //mc.thePlayer.moveStrafing += 9999999999999;
  38. if(mc.thePlayer.onGround && mc.gameSettings.keyBindForward.pressed){
  39. //var onGround = (mc.thePlayer.onGround && (mc.thePlayer.moveForward == 0 && mc.thePlayer.moveStrafing == 0));
  40. //if(mc.gameSettings.keyBindJump.isKeyDown()){
  41. //mc.thePlayer.jump(true);
  42. //mc.thePlayer.motionX = 0.4;
  43. //mc.thePlayer.motionY = 0.432;
  44. //mc.thePlayer.motionZ = 0.4;
  45. //mc.thePlayer.jump();
  46. //mc.thePlayer.jump();
  47. //mc.thePlayer.motionY = -0.42;
  48. //mc.timer.timerSpeed = 1;
  49. //mc.thePlayer.speedOnGround = 99999999;
  50. //mc.thePlayer.landMovementFactor = 999999999;
  51. //mc.thePlayer.speedInAir = 0.02;
  52. mc.thePlayer.jump();
  53. setMoveSpeed(0.4);
  54. switch(ticks) {
  55. case 3:
  56. mc.thePlayer.jump();
  57. setMoveSpeed(0.6);
  58. case 5:
  59. ticks = 0;
  60. break;
  61. default:
  62. ticks += 1;
  63. }
  64. }
  65. }
  66. }
  67.  
  68. function onLoad() {
  69. };
  70.  
  71. function onEnable() {
  72. ticks = 0
  73. client = moduleManager.registerModule(testSpeed);
  74. };
  75.  
  76. function onDisable() {
  77. moduleManager.unregisterModule(client);
  78. };
Advertisement
Add Comment
Please, Sign In to add comment