Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Double Tap Mechanic
- This will require 4 objectives:
- sneakDetect - stat.sneakTime
- sneakTimer - dummy
- sneakUseTimer - dummy
- sneakCount - dummy
- ---------------------
- /scoreboard players set @a[score_sneakDetect=0] sneakTimer 0
- /scoreboard players add @a[score_sneakDetect_min=1] sneakTimer 1
- /scoreboard players remove @a[score_sneakDetect_min=1,score_sneakDetect=1] sneakDetect 1
- /scoreboard players set @a[score_sneakTimer_min=1,score_sneakTimer=1] sneakUseTimer 8
- /scoreboard players remove @a[score_sneakUseTimer_min=1] sneakUseTimer 1
- /scoreboard players add @a[score_sneakTimer_min=1,score_sneakTimer=1] sneakCount 1
- Here, put any commands you want to be activated by the sneaking. In the target selector, put
- @p[score_sneakCount_min=2] plus any other arguments you want. Then:
- /scoreboard players set @a[score_sneakCount_min=2] sneakUseTimer 0
- /scoreboard players set @a[score_sneakCount_min=2] sneakCount 0
- /scoreboard players remove @a[score_sneakDetect_min=2] sneakDetect 1
- /scoreboard players set @a[score_sneakUseTimer=0] sneakCount 0
- To change the amount of time the player has to activate the sneaking, change the 8 in the first command to any
- other number. The higher the number, the more time they have.
- To change the amount of times the player needs to sneak in a row, change the 2 in the 7th, 8th, and 9th
- commands to whatever number you want. Also, make sure to change it in whatever commands you want
- executed as well.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement