- command /contract [<text>] [<player>] [<text>] [<text>]::
- trigger:
- if arg-1 is "help":
- send "&7/contract give <player> <type> <amount>"
- send "&7/contract accept <player>"
- send "&7/contract deny <player>"
- if arg-1 is "give":
- send "&7You have sent a &a%arg-3% &7contract to &a%arg-2%&7!"
- send "&7You have recieved a &a%arg-3% &7contract from &a%player% &7for &a%arg-4% &7tokens!" to arg-2
- send "&7/contract accept <player> <type> <amount>" to arg-2
- if arg-1 is "accept":
- send "&7You have accepted &a%arg-2%&7's contract for &a%arg-3%&7!"
- remove arg-4 from {tokens.%player%}
- send "&a%player% &7has accepted &ayour &7contract!" to arg-2
- add arg-4 to {tokens.%arg-2%}
- if arg-1 is "deny":
- send "&7You have &adenied this contract!"
- stop
- command /pay [<player>] <text>]:
- trigger:
- loop all players:
- if arg-1 is not set:
- if arg-2 is not set:
- send "&cIncorrect usage"
- wait 2 seconds
- send ""
- send "&7The correct usage is &c/pay <player> <amount>"
- if arg-1 is set:
- if arg-2 is set:
- if arg-2 is less than {tokens.%loop-player%}"
- send "&7You don't have enough &ctokens&7! &8(%{tokens.%loop-player%}%&8)"
- if arg-2 is more than {tokens.%loop-player%}
- remove arg-2 from {tokens.%loop-player%}
- add arg-2 to {tokens.%arg-1%}
- send "&7You have paid &c%arg-1% %arg-2% &7tokens!"
- send "&c%player% &7has paid you &c%arg-2% &7tokens!" to arg-1
- stop
- every second in "world":
- loop all players:
- wipe loop-player's sidebar
- set name of sidebar of loop-player to "&eTokens: &8| &e%{tokens.%loop-player%}%"
- set score "&c&m---------------" in sidebar of loop-player to 14
- set score "&7" in sidebar of loop-player to 13
- set score " &ePlayer: &8» &e%loop-player%" in sidebar of loop-player to 12
- set score " &eKills: &8» &e%{kills.%loop-player%}%" in sidebar of loop-player to 11
- set score " &eDeaths &8» &e%{deaths.%loop-player%}%" in sidebar of loop-player to 10
- set score " &ePlaytime &8» &e%{playtime.%loop-player%}%" in sidebar of loop-player to 9
- set score "&f" in sidebar of loop-player to 8
- set score "&7&oyeetblue.minehut.gg" in sidebar of loop-player to 7
- set score "&c&m---------------" in sidebar of loop-player to 6
- command /sell:
- trigger:
- open chest with 5 row named "&cTokenSell" to player
- set {Inventory.%player%.Open} to true
- format slot 1 of player with diamond named "&aSell: Diamond" with lore "&7Value: &a$500" to close then run [make player execute command "/selldiamond12"]
- format slot 2 of player with emerald named "&aSell: Emerald" with lore "&7Value: &a$250" to close then run [make player execute command "/sellemerald12"]
- format slot 3 of player with iron ingot named "&aSell: Iron Ingot" with lore "&7Value: &a$100" to close then run [make player execute command "/selliron12"]
- format slot 4 of player with gold ingot named "&aSell: Gold Ingot" with lore "&7Value: &a$50" to close then run [make player execute command "/sellgold12"]
- format slot 5 of player with coal named "&aSell: Coal" with lore "&7Value: &a$25" to close then run [make player execute command "/sellcoal12"]
- format slot 6 of player with stone named "&aSell: Stone" with lore "&7Value: &a$5" to close then run [make player execute command "/sellstone12"]
- format slot 12 of player with diamond block named "&aMade by: %player%" with lore "&7" to be unstealable
- command /sellstone12:
- trigger:
- set {_amount} to 0
- loop all items in player's inventory:
- if loop-item is stone:
- set {_n} to "%loop-item%"
- set {_t::*} to {_n} split at " "
- if {_t::2} is not set:
- add 1 to {_amount}
- else:
- set {_final} to {_t::1} parsed as an integer
- add {_final} to {_amount}
- if {_amount} is bigger than 15:
- remove 16 stone from player's inventory
- add 5 to {tokens.%player%}
- send player title "&7You sold &aStone &7for" with subtitle "&a$50 Dollars!" for 3 seconds
- else:
- message "&7You don't have enough &aIron Ingots &7to sell!"
- command /sellcoal12:
- trigger:
- set {_amount} to 0
- loop all items in player's inventory:
- if loop-item is coal:
- set {_n} to "%loop-item%"
- set {_t::*} to {_n} split at " "
- if {_t::2} is not set:
- add 1 to {_amount}
- else:
- set {_final} to {_t::1} parsed as an integer
- add {_final} to {_amount}
- if {_amount} is bigger than 15:
- remove 16 coal from player's inventory
- add 25 to {tokens.%player%}
- send player title "&7You sold &aCoal &7for" with subtitle "&a$50 Dollars!" for 3 seconds
- else:
- message "&7You don't have enough &aIron Ingots &7to sell!"
- command /selliron12:
- trigger:
- set {_amount} to 0
- loop all items in player's inventory:
- if loop-item is iron ingot:
- set {_n} to "%loop-item%"
- set {_t::*} to {_n} split at " "
- if {_t::2} is not set:
- add 1 to {_amount}
- else:
- set {_final} to {_t::1} parsed as an integer
- add {_final} to {_amount}
- if {_amount} is bigger than 15:
- remove 16 iron ingot from player's inventory
- add 100 to {tokens.%player%}
- send player title "&7You sold &aIron &7for" with subtitle "&a$50 Dollars!" for 3 seconds
- else:
- message "&7You don't have enough &aIron Ingots &7to sell!"
- command /sellgold12:
- trigger:
- set {_amount} to 0
- loop all items in player's inventory:
- if loop-item is gold ingot:
- set {_n} to "%loop-item%"
- set {_t::*} to {_n} split at " "
- if {_t::2} is not set:
- add 1 to {_amount}
- else:
- set {_final} to {_t::1} parsed as an integer
- add {_final} to {_amount}
- if {_amount} is bigger than 15:
- remove 16 gold ingot from player's inventory
- add 50 to {tokens.%player%}
- send player title "&7You sold &aGold &7for" with subtitle "&a$50 Dollars!" for 3 seconds
- else:
- message "&7You don't have enough &aGold Ingots &7to sell!"
- command /selldiamond12:
- trigger:
- set {_amount} to 0
- loop all items in player's inventory:
- if loop-item is diamond:
- set {_n} to "%loop-item%"
- set {_t::*} to {_n} split at " "
- if {_t::2} is not set:
- add 1 to {_amount}
- else:
- set {_final} to {_t::1} parsed as an integer
- add {_final} to {_amount}
- if {_amount} is bigger than 15:
- remove 16 diamond from player's inventory
- add 500 to {tokens.%player%}
- send player title "&7You sold &aDiamond &7for" with subtitle "&a$500 Dollars!" for 3 seconds
- else:
- message "&7You don't have enough &aDiamonds &7to sell!"
- command /sellemerald12:
- trigger:
- set {_amount} to 0
- loop all items in player's inventory:
- if loop-item is emerald:
- set {_n} to "%loop-item%"
- set {_t::*} to {_n} split at " "
- if {_t::2} is not set:
- add 1 to {_amount}
- else:
- set {_final} to {_t::1} parsed as an integer
- add {_final} to {_amount}
- if {_amount} is bigger than 15:
- remove 16 emerald from player's inventory
- add 250 to {tokens.%player%}
- send player title "&7You sold &aEmerald &7for" with subtitle "&a$500 Dollars!" for 3 seconds
- else:
- message "&7You don't have enough &aEmerald &7to sell!"