Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //created by Alex
- //each command is limited to a certain value, i do not recommend going above this limit as the game can't always register it.
- //changing it is pretty self explanatory but i've made a comment to help
- command setSpeed(target,amount){
- permission = "setSpeed";
- execute(){
- if(arguments.count < 2){
- player.message("<color=red>Proper Usage: /setSpeed <player> <amount></color>");
- return;
- }
- if(amount > 10){ //max amt of speed, change this if you wish
- player.message(str.format("<color=red>The number {0} is greater than 10, please enter a number less than 10.</color>", amount));
- return;
- }
- if(amount < 0 ){ // min amt of speed, change this if you wish
- player.message(str.format("<color=red>The number {0} is less than 0, please enter a number greater than 0.</color>", amount));
- return;
- }
- if(target != null){
- targetP = toPlayer(target);
- if(targetP != null){
- targetP.speed = amount;
- player.message(targetP.name + "'s speed has been set to " + targetP.speed);
- targetP.message("Your speed has been set to " + targetP.speed);
- return;
- }
- else{
- player.message("<color=red>Couldn't find that player</color>");
- }
- }
- }
- }
- command setJump(target,amount){
- permission = "setJump";
- execute(){
- if(arguments.count < 2){
- player.message("<color=red>Proper Usage: /setJump <player> <amount></color>");
- return;
- }
- if(amount > 10){ //max jump height, change this if you wish
- player.message(str.format("<color=red>The number {0} is greater than 10, please enter a number less than 10.</color>", amount));
- return;
- }
- if(amount < 0 ){ //min jump height, change this if you wish, warning: i haven't tested what a minus jump height would do
- player.message(str.format("<color=red>The number {0} is less than 0, please enter a number greater than 0.</color>", amount));
- return;
- }
- if(target != null){
- targetP = toPlayer(target);
- if(targetP != null){
- targetP.jumpHeight = amount;
- player.message(targetP.name + "'s jump height has been set to " + targetP.jumpHeight);
- targetP.message("Your jump height has been set to " + targetP.jumpHeight);
- return;
- }
- else{
- player.message("<color=red>Couldn't find that player</color>");
- }
- }
- }
- }
- command setGrav(target,amount){
- permission = "setGrav";
- execute(){
- if(arguments.count < 2){
- player.message("<color=red>Proper Usage: /setGrav <player> <amount></color>");
- return;
- }
- if(amount > 10){
- player.message(str.format("<color=red>The number {0} is greater than 10, please enter a number less than 10.</color>", amount));
- return;
- }
- if(amount < -10 ){
- player.message(str.format("<color=red>The number {0} is less than -10, please enter a number greater than 0.</color>", amount));
- return;
- }
- if(target != null){
- targetP = toPlayer(target);
- if(targetP != null){
- targetP.gravity = amount;
- player.message(targetP.name + "'s gravity has been set to " + targetP.gravity);
- targetP.message("Your gravity has been set to " + targetP.gravity);
- return;
- }
- else{
- player.message("<color=red>Couldn't find that player</color>");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement