banknote.sk

Created by LeonK

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

#               BANK NOTE Skript
# Made by MeKink
# don't copy
# Options here:



options:
  #Text that is in front of any message that's sent from the skript.
  prefix: &cBanknotes &8&l> &e
  # Prefix of the banknote itself 
  banknote_prefix: &fBanknote: &c




# ------- CODE ----------

command /withdraw [<integer>]:
  aliases: banknote
  trigger:
    if arg-1 is not set:
      message "{@prefix} Please specify the amount of money you would like to withdraw."
    if arg 1 is not an integer:
      message "{@prefix} Please give us a number, not an letter."
    if player's money is less than arg-1:
      message "{@prefix} You don't have that amount of money."
    if player's money is greater than arg-1:
      remove arg 1 from player's balance
      give player paper named "{@banknote_prefix} $%arg 1%" with lore "{@prefix} Click to get the money!"

on rightclick holding paper:
  if the name of player's held item contains "Banknote":
    set {_amount::*} to name of player's held item split at "$"
    execute console command "eco give %player% %{_amount::2}%"
    message "{@prefix} You got %{_amount::2}%!"
    remove 1 of held item from player