Advertisement
DoctorX13

XFlyMode

Jan 31st, 2020 (edited)
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. //Script Created By Senior S
  2. //You are able to edit it as you pleasure
  3.  
  4. event onPlayerJoined(player){
  5. player.setData("FlyMode", 0);
  6. }
  7.  
  8. command fly(){
  9. permission = "flymode.use";
  10. execute(){
  11. if(player.getData("FlyMode") == 0){
  12. player.setData("FlyMode", 1);
  13. player.message("Now you are in flymode, to use this use POINT to up, SALUTE to down, WAVE to stop, SURRENDER to up the speed and FACEPALM to down the speed!");
  14. player.god = true;
  15. }
  16. else {
  17. player.speed = 1;
  18. player.setData("FlyMode", 0);
  19. player.message("You desactivate the flymode!");
  20. player.gravity = 1;
  21. player.god = false;
  22. }
  23. }
  24. }
  25.  
  26. event onPlayerGestured(player, gesture){
  27. if(player.getData("FlyMode") == 1){
  28. if(gesture == "Salute"){
  29. player.gravity = 1;
  30. return;
  31. }
  32. else if(gesture == "Point"){
  33. player.gravity = -0.5;
  34. }
  35. else if(gesture == "Wave"){
  36. player.gravity = 0;
  37. }
  38. else if(gesture == "SurrenderStart"){
  39. player.speed = player.speed + 1;
  40. player.message("Actual Speed: " + player.speed);
  41. }
  42. else if(gesture == "Facepalm"){
  43. if(player.speed == 1){
  44. player.message("You actual speed is 1 you cant down the speed!");
  45. return;
  46. }
  47. player.speed = player.speed - 1;
  48. player.message("Actual Speed: " + player.speed);
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement