Zeldaboy111

Skript #150

Apr 22nd, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. on enable:
  2. set {_mb::prefix} to "&3[&dMobile&3] &f>> &8"
  3.  
  4.  
  5.  
  6. command /mobile [<text>] [<text>] [<text>] [<text>]:
  7. aliases: /mb
  8. trigger:
  9. if arg 1 is "get":
  10. give player a book named "&8Mobile" with lore "&7Mobieltje"
  11. stop
  12.  
  13. if arg 1 is "word":
  14. if arg 2 is "write":
  15. if arg 3 is "1" OR "2" OR "3":
  16. writeWord(player, "%arg 3%", "%arg 4%")
  17. stop
  18.  
  19. if arg 2 is "delete":
  20. if arg 3 is "1" OR "2" OR "3":
  21. deleteWord(player, "%arg 3%", "%arg 4%")
  22.  
  23.  
  24. on rightclick:
  25. player is holding a book named "&8Mobile" with lore "&7Mobieltje":
  26. open chest with 1 rows named "&8Mobile" to player
  27. make gui slot 0 of player with a paper named "&fWord" to run function word(player, "menu")
  28. make gui slot 1 of player with a green dye named "&2Whatsappp" to run function whatsapp(player, "menu")
  29. make gui slot 2 of player with a gold block named "&6Bank" to run function bank(player, "menu")
  30.  
  31.  
  32. function writeWord(p: Player, doc: String, text: String):
  33.  
  34.  
  35. function deleteWord(p: Player, doc: String, text: String):
  36.  
  37. function word(p: Player, page: String):
  38. #Kies GUI met 3 bestanden
  39.  
  40. set {_book} to a new book
  41.  
  42. if {_page} is "menu":
  43. if {_mobile::word::page1} is not set:
  44. set {_mobile::word::page1} to "&7Naamloos"
  45.  
  46. if {_mobile::word::page2} is not set:
  47. set {_mobile::word::page2} to "&7Naamloos"
  48.  
  49. if {_mobile::word::page3} is not set:
  50. set {_mobile::word::page3} to "&7Naamloos"
  51.  
  52. open chest with 1 rows named "&fWord" to {_p}
  53.  
  54. make gui slot 0 of {_p} with a paper named "%{_mobile::word::page1}%" to run function word({_p}, "1")
  55. make gui slot 1 of {_p} with a paper named "%{_mobile::word::page2}%" to run function word({_p}, "2")
  56. make gui slot 2 of {_p} with a paper named "%{_mobile::word::page3}%" to run function word({_p}, "3")
  57.  
  58. if {_page} is "1":
  59. set {_write::component} to a new text component with "&2&o[Schrijven]"
  60. add click event with action RUN_COMMAND with execute "/mobile word write 1" to text component {_write::component}
  61. add hover event with action SHOW_TEXT with text "&aKlik hier om te schrijven" to text component {_write::component}
  62.  
  63. add text component {_write::component} to book {_book}
  64. open book {_book} to {_p}
  65.  
  66. if {_page} is "2":
  67.  
  68.  
  69. open book {_book} to {_p}
  70.  
  71. if {_page} is "3":
  72.  
  73. open book {_book} to {_p}
  74.  
  75.  
  76. #Open boek
  77.  
  78.  
  79. function whatsapp(p: Player, s: String):
  80. #Jezelf in contacten
  81.  
  82. #Anvil om bericht te sturen
  83.  
  84.  
  85. function bank(p: Player, s: String):
  86. #Accounts (persoonlijk - gold block)
  87.  
  88. #Geld (waardes; iron = 10, gold = 50 & diamond = 100)
Advertisement
Add Comment
Please, Sign In to add comment