Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Bags
- on load:
- register new shapeless recipe for chest named "&2Plecak" using leather, leather, leather, leather, chest, leather, leather, leather, leather
- command /plecak [<text>]:
- trigger:
- if player has permission "bags.use":
- if arg 1 is "wez":
- if {plecak.%player%} is not true:
- if player can hold 1 chest named "&2Plecak":
- set {_x} to random integer between -10000 and 10000
- set {_y} to 260
- set {_r} to location at {_x}, {_y}, {_z}
- if block at {_r} is chest:
- execute player command "/plecak wez"
- else:
- set block at {_r} to chest
- set {plecakm.%player%} to location of {_r}
- set {plecak.%player%} to true
- give player 1 chest named "&2Plecak"
- send "&2Dostales plecak!!"
- else:
- send "&cNie masz miejsca na plecak!"
- else:
- send "&2Masz juz plecak!"
- else:
- send "&cPoprawne uzycie: &2/plecak wez"
- else:
- send "&cNie masz uprawnien aby to zrobic!"
- on rightclick:
- if tool of player is chest named "&2Plecak":
- cancel event
- open the inventory of the block at {plecakm.%player%} to the player
- command /plecak:
- trigger:
- if player has permission "bags.usecommand.vip":
- open the inventory of the block at {plecakm.%player%} to the player
- on death:
- remove 1 chest named "&2Plecak" from player
- on respawn:
- wait 1 tick
- give player 1 chest named "&2Plecak"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement