Advertisement
LukieNZ

adadadada

Oct 1st, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. command /gamble <text> <item>:
  2. permission: gamble.use
  3. permission message: no
  4. trigger:
  5. Send "&7Giving item..." to player
  6. give 1 of arg-2 named "%arg-1%" with lore "&f✳&3 &bGambles Item &f✳" to player
  7. set {Gambles.Exist.%arg-1%} to true
  8.  
  9. on right click:
  10. if {Gambles.Item.%location of block%} is true:
  11. cancel event
  12. wait 1 tick
  13. open virtual chest inventory with size 4 named "&a&lGambles &5%{Credits.Ammount.%player%}%" to player
  14. 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
  15. format gui slot 31 of player with barrier named "&c&lClose" to close
  16. 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
  17.  
  18.  
  19. on break:
  20. if {Gambles.Item.%location of block%} is true:
  21. if player has permission "Gamble.*" or "Gamble.break":
  22. if player is sneaking:
  23. clear {Gambles.LST.%{Gambles.Name.L.%location of block%}%}
  24. delete {Gambles.LST.%{Gambles.Name.L.%location of block%}%}
  25. clear {Gambles.Item.T.%{Gambles.Name.L.%location of block%}%}
  26. delete {Gambles.Item.T.%{Gambles.Name.L.%location of block%}%}
  27. set {Gambles.Item.%location of block%} to false
  28. set block to air
  29. else:
  30. cancel event
  31. message "&8[&bCrates&8] &cError:&7 This is a gamble block Sneak to remove it."
  32. else:
  33. cancel event
  34.  
  35. on place:
  36. if player has permission "Gamble.*" or "Gamble.Place":
  37. if lore of player's tool is "&f✳&3 &bGambles Item &f✳":
  38. if {Gambles.Exist.%name of player's tool%} is true:
  39. set {Gambles.Item.%{Gamble.Chest.T.%name of player's tool%}%} to false
  40. set block at {Gambles.Item.T.%name of player's tool%} to air
  41. clear {Gambles.Item.T.%name of player's tool%}
  42. delete {Gambles.item.T.%name of player's tool%}
  43. wait 1 tick
  44. set {Gambles.Name.L.%location of block%} to "%name of player's tool%"
  45. set {Gambles.Item.%location of block%} to true
  46. set {Gambles.Item.T.%name of player's tool%} to location of block
  47. message "&8[&bGambles&8] &7The Gambles Block was set."
  48.  
  49. set {Gambles.LST.%name of player's tool%} to {Gambles.item.T.%name of player's tool%}
  50. add 1.2 to y-location of {Gambles.LST.%name of player's tool%}
  51. else:
  52. message "&8[&bGambles&8] &cError:&7 Gamble item is not real."
  53. else:
  54. message "&8[&bGambles&8] &cError:&7 Incorrect permissions."
  55.  
  56. on join:
  57. send "&aYou have &5%{Credits.Ammount.%player%}% &aCredits!" to player
  58.  
  59. on first join:
  60. set {Credits.Ammount.%player%} to 1000
  61. send "&aYou have &5%{Credits.Ammount.%player%}% &aCredits And also Welcome to our server!"
  62.  
  63. command /credits:
  64. trigger:
  65. send "&aYou have &5%{Credits.Ammount.%player%}% &aCredits!" to player
  66.  
  67.  
  68.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement