Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on right click:
- if lore of player's tool contains "[Trade]":
- open "FURNACE" named "&aRandom Trade" to player
- format slot 1 of player with a green stained glass pane named "&aXác nhận" with lore "&a- sau khi bấm xác nhận||&a- Số lượng item hiện phía trên||&a- Sẽ bị lấy khỏi rương đồ của bạn" to be unstealable
- format slot 2 of player with a red stained glass pane named "&cItem sẽ xuất hiện ở đây" to be unstealable
- on inventory click:
- if inventory type of player's current inventory is "Furnace":
- if name of player's current inventory is "&aRandom Trade":
- cancel event
- if inventory type of player's current inventory is "Furnace":
- if name of clicked item is "&aXác nhận":
- set {_i} to slot 0 of player's current inventory
- set {_a} to amount of slot 0 of player's current inventory
- set {_n} to name of slot 0 of player's current inventory
- set {_l} to lore of slot 0 of player's current inventory
- if {_i} is diamond:
- set {_int} to 5
- chance of 80+{_a}%:
- set {_int} to 6
- chance of 70+{_a}%:
- set {_int} to 7
- chance of 50+{_a}%:
- set {_int} to 8
- chance of 30+{_a}%:
- set {_int} to 9
- chance of 10+{_a}%:
- set {_int} to 10
- message "%{_int}%"
- set {_int} to {_int} parsed as number
- set {_a} to {_a} parsed as integer
- remove {_a} {_i} with lore "%{_l}%" from the player
- set slot 2 of player's current inventory to a Diamond Chestplate of Protection {_int} with lore "[Thành Phẩm]"
- set slot 0 of player's current inventory to air
- if lore of clicked item contains "[Thành Phẩm]":
- give a diamond chestplate of protection {_int} to the player
- close player's inventory
- if lore of clicked item contains "&a[Nguyên Liệu]":
- if inventory type of player's current inventory is "Furnace":
- if name of player's current inventory is "&aRandom Trade":
- cancel event
- set {_i} to clicked item
- set {_a} to amount of clicked item
- set {_n} to name of clicked item
- set {_l} to lore of clicked item
- format slot 0 of player with {_a} of {_i} named "%{_n}%" with lore "%{_l}%" to be unstealable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement