Guest User

Banknote skript

a guest
Mar 15th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. # BANK NOTE Skript
  2. # Made by MeKink
  3. # don't copy
  4. # Options here:
  5.  
  6.  
  7.  
  8. options:
  9. #Text that is in front of any message that's sent from the skript.
  10. prefix: &cBanknotes &8&l> &e
  11. # Prefix of the banknote itself
  12. banknote_prefix: &fBanknote: &c
  13.  
  14.  
  15.  
  16.  
  17. # ------- CODE ----------
  18.  
  19. command /withdraw [<integer>]:
  20. aliases: banknote
  21. trigger:
  22. if arg-1 is not set:
  23. message "{@prefix} Please specify the amount of money you would like to withdraw."
  24. if arg 1 is not an integer:
  25. message "{@prefix} Please give us a number, not an letter."
  26. if player's money is less than arg-1:
  27. message "{@prefix} You don't have that amount of money."
  28. if player's money is greater than arg-1:
  29. remove arg 1 from player's balance
  30. give player paper named "{@banknote_prefix} $%arg 1%" with lore "{@prefix} Click to get the money!"
  31.  
  32. on rightclick holding paper:
  33. if the name of player's held item contains "Banknote":
  34. set {_amount::*} to name of player's held item split at "$"
  35. execute console command "eco give %player% %{_amount::2}%"
  36. message "{@prefix} You got %{_amount::2}%!"
  37. remove 1 of held item from player
Add Comment
Please, Sign In to add comment