Advertisement
Ehiltz

Sneak Tapping

Aug 17th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. Double Tap Mechanic
  2.  
  3. This will require 4 objectives:
  4.  
  5. sneakDetect - stat.sneakTime
  6. sneakTimer - dummy
  7. sneakUseTimer - dummy
  8. sneakCount - dummy
  9. ---------------------
  10.  
  11. /scoreboard players set @a[score_sneakDetect=0] sneakTimer 0
  12. /scoreboard players add @a[score_sneakDetect_min=1] sneakTimer 1
  13. /scoreboard players remove @a[score_sneakDetect_min=1,score_sneakDetect=1] sneakDetect 1
  14. /scoreboard players set @a[score_sneakTimer_min=1,score_sneakTimer=1] sneakUseTimer 8
  15. /scoreboard players remove @a[score_sneakUseTimer_min=1] sneakUseTimer 1
  16. /scoreboard players add @a[score_sneakTimer_min=1,score_sneakTimer=1] sneakCount 1
  17.  
  18. Here, put any commands you want to be activated by the sneaking. In the target selector, put
  19. @p[score_sneakCount_min=2] plus any other arguments you want. Then:
  20.  
  21. /scoreboard players set @a[score_sneakCount_min=2] sneakUseTimer 0
  22. /scoreboard players set @a[score_sneakCount_min=2] sneakCount 0
  23. /scoreboard players remove @a[score_sneakDetect_min=2] sneakDetect 1
  24. /scoreboard players set @a[score_sneakUseTimer=0] sneakCount 0
  25.  
  26. To change the amount of time the player has to activate the sneaking, change the 8 in the first command to any
  27. other number. The higher the number, the more time they have.
  28.  
  29. To change the amount of times the player needs to sneak in a row, change the 2 in the 7th, 8th, and 9th
  30. commands to whatever number you want. Also, make sure to change it in whatever commands you want
  31. executed as well.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement