ArtzifyHD

Skript Login

Jul 13th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.56 KB | None | 0 0
  1. on join:
  2. if {%player%.logged} is not set:
  3. set {%player%.move} to false
  4. set walk speed of player to 0
  5. send "&7&l---------------------------------------------" to player
  6. send "&f&l TNTSPLEEF " to player
  7. send "&f&l Make your enemies turn into powder! " to player
  8. send "&7&l---------------------------------------------" to player
  9. send " " to player
  10. send "&6&l Please login using &f&l/login <password> " to player
  11. send "&6&l Don't have an account? " to player
  12. send "&f Register using &l/register <password>&f!" to player
  13. send "&7&l---------------------------------------------" to player
  14.  
  15.  
  16. command /register [<text>] [<text>]:
  17. trigger:
  18. if arg 1 is not set:
  19. send "&cMake sure you have entered your desired &lpassword&6!" to player
  20. if arg 1 is set:
  21. if arg 2 is not set:
  22. if {%player%.password} is not set:
  23. send "&2You have successfuly created a new &aaccount&2! Your password is: &a%arg 1%" to player
  24. send "&2You can also set a recovery code! Type &a/rcode <code> &2to set the recovery code!" to player
  25. send "&2Using this code you will be able to reset your password in case you forgot it!" to player
  26. set {%player%.password} to "%arg 1%"
  27. set walk speed of player to 0.3
  28. set {%player%.logged} to true
  29. else:
  30. send "&cHey! Don't you remember? You have already registered an account!" to player
  31. else:
  32. send "&cDon't type it twice! it's to annyoing to type it twice!" to player
  33.  
  34. command /login [<text>] [<text>]:
  35. trigger:
  36. if arg 1 is not set:
  37. send "&cMake sure you have entered your password!" to player
  38. send "&cForgot your password? Don't worry! Use your recovery code using &l/rauth <yourCode>&c!" to player
  39. if arg 1 is set:
  40. arg 2 is not set:
  41. if {%player%.password} is set:
  42. if {%player%.password} is arg 1:
  43. if {%player%.logged} is not set:
  44. send "&2Ahhh, there you are! Nice to see you back!" to player
  45. set walk speed of player to 0.3
  46. set {%player%.logged} to true
  47. else:
  48. send "&2Well... And i thought you are logged already..." to player
  49. else:
  50. send "&cHey! I'm sorry, but this is not your password!" to player
  51. send "&cTry to enter correct password again!" to player
  52. else:
  53. send "&6Ho ho ho... Not so fast! Register an account first!" to player
  54. send "&6Use command &l/register <password>&6 to register an account!" to player
  55. else:
  56. send "&cJust don't type it twice! It's silly!" to player
  57. else:
  58. send "&cYou should enter your password i guess... It's just an advice... I won't let you play until you do that! I promise!" to player
  59.  
  60. command /rcode [<text>] [<text>]:
  61. trigger:
  62. if arg 1 is not set:
  63. send "&cTry entering a new recovery code! It won't hurt you!" to player
  64. else:
  65. if arg 2 is not set:
  66. {%player%.rcode} is not set:
  67. {%player%.logged} is true:
  68. send "&2You're awesome! Now you can reset your password anytime you want!" to player
  69. set {%player%.rcode} to arg 1
  70. else:
  71. send "&cNope! Log in first!" to player
  72. else:
  73. send "&cRecovery password can't be changed, so i hope you remeber it!" to player
  74. else:
  75. send "&cYou're crazy! Don't, don't, don't... Just don't type it twice!" to player
  76.  
  77. command /rauth [<text>] [<text>]:
  78. trigger:
  79. if arg 1 is not set:
  80. send "&cWell... It would be good if you entered your recovery code." to player
  81. else:
  82. if arg 1 is not set:
  83. {%player%.rcode} is set:
  84. set {_number} to random number between 1000 and 9999
  85. send "&2Your new password is &a%{_number}%&2!" to player
  86. set {%player%.password} to {_number}
  87. else:
  88. send "&cYou haven't set your code already!" to player
  89. else:
  90. send "&cRight... I was telling you all the time, but it seems to be useless... Don't type it twice!" to player
  91.  
  92.  
  93. on chat:
  94. if {%player%.logged} is false:
  95. cancel event
  96. if {%player%.logged} is not set:
  97. cancel event
  98.  
  99. on disconnect:
  100. delete {%player%.logged}
  101.  
  102. on damage:
  103. victim is a player:
  104. {%victim%.logged} is not set:
  105. cancel event
  106. {%victim%.logged} is not set:
  107. cancel event
  108.  
  109. on drop:
  110. if {%player%.logged} is false:
  111. cancel event
  112. if {%player%.logged} is not set:
  113. cancel event
  114.  
  115. on any movement:
  116. {%player%.logged} is false:
  117. cancel event
  118. {%player%.logged} is not set:
  119. cancel event
  120.  
  121. on command:
  122. command is "login" or "register":
  123. add 1 to {_nothing}
  124. else:
  125. {%player%.logged} is false:
  126. cancel event
  127. {%player%.logged} is not set:
  128. cancel event
Advertisement
Add Comment
Please, Sign In to add comment