Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /gamble <text> <item>:
- permission: gamble.use
- permission message: no
- trigger:
- Send "&7Giving item..." to player
- give 1 of arg-2 named "%arg-1%" with lore "&f✳&3 &bGambles Item &f✳" to player
- set {Gambles.Exist.%arg-1%} to true
- on right click:
- if {Gambles.Item.%location of block%} is true:
- cancel event
- wait 1 tick
- open virtual chest inventory with size 4 named "&a&lGambles &5%{Credits.Ammount.%player%}%" to player
- format gui slot 28 and 29 and 30 and 27 and 32 and 33 and 34 and 35 of player with gray stained glass pane named " " to do nothing
- format gui slot 31 of player with barrier named "&c&lClose" to close
- format gui slot 13 of player with book and quill named "&aGambles" with lore "&7Gambles is a gambling skript made by lukienz" to do nothing
- on break:
- if {Gambles.Item.%location of block%} is true:
- if player has permission "Gamble.*" or "Gamble.break":
- if player is sneaking:
- clear {Gambles.LST.%{Gambles.Name.L.%location of block%}%}
- delete {Gambles.LST.%{Gambles.Name.L.%location of block%}%}
- clear {Gambles.Item.T.%{Gambles.Name.L.%location of block%}%}
- delete {Gambles.Item.T.%{Gambles.Name.L.%location of block%}%}
- set {Gambles.Item.%location of block%} to false
- set block to air
- else:
- cancel event
- message "&8[&bCrates&8] &cError:&7 This is a gamble block Sneak to remove it."
- else:
- cancel event
- on place:
- if player has permission "Gamble.*" or "Gamble.Place":
- if lore of player's tool is "&f✳&3 &bGambles Item &f✳":
- if {Gambles.Exist.%name of player's tool%} is true:
- set {Gambles.Item.%{Gamble.Chest.T.%name of player's tool%}%} to false
- set block at {Gambles.Item.T.%name of player's tool%} to air
- clear {Gambles.Item.T.%name of player's tool%}
- delete {Gambles.item.T.%name of player's tool%}
- wait 1 tick
- set {Gambles.Name.L.%location of block%} to "%name of player's tool%"
- set {Gambles.Item.%location of block%} to true
- set {Gambles.Item.T.%name of player's tool%} to location of block
- message "&8[&bGambles&8] &7The Gambles Block was set."
- set {Gambles.LST.%name of player's tool%} to {Gambles.item.T.%name of player's tool%}
- add 1.2 to y-location of {Gambles.LST.%name of player's tool%}
- else:
- message "&8[&bGambles&8] &cError:&7 Gamble item is not real."
- else:
- message "&8[&bGambles&8] &cError:&7 Incorrect permissions."
- on join:
- send "&aYou have &5%{Credits.Ammount.%player%}% &aCredits!" to player
- on first join:
- set {Credits.Ammount.%player%} to 1000
- send "&aYou have &5%{Credits.Ammount.%player%}% &aCredits And also Welcome to our server!"
- command /credits:
- trigger:
- send "&aYou have &5%{Credits.Ammount.%player%}% &aCredits!" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement