Advertisement
Tarna256

Untitled

Jul 8th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. on join:
  2. if {var::*} does not contain player:
  3. set {credits::%player's uuid%} to 0
  4. set {cps::%player's uuid%} to 0
  5. set {click::%player's uuid%} to 1
  6. set {multi::cps::%player's uuid%} to 1
  7. set {multi::click::%player's uuid%} to 1
  8. set {prestige::%player's uuid%} to 0
  9. set {prestigecost::%player's uuid%} to 1000000000
  10.  
  11. on chat:
  12. set the chat format to "&8[&e%{prestige::%player's uuid%}%&8] &r%colored player's displayname% » &f%message%"
  13.  
  14. on right click:
  15. if player's held item is command block named "&cAdvertise":
  16. add {click::%player's uuid%}*{multi::click::%player's uuid%} to {credits::%player's uuid%}
  17.  
  18. command /advertise:
  19. trigger:
  20. give player command block named "&cAdvertise"
  21.  
  22. command /prestige:
  23. aliases: /prest, /pres
  24. trigger:
  25. prestige(player)
  26.  
  27. function prestige(p: player):
  28. set {_u} to {_p}'s uuid
  29. if {credits::%{_u}%} >= {prestigecost::%{_u}%}:
  30. add 1 to {prestige::%{_u}%}
  31. set {prestigecost::%{_u}%} to {prestigecost::%{_u}%}*1.5
  32. add 1.5 to {multi::cps::%{_u}%}
  33. broadcast "&4%{_p}% &ehas prestiged to &4%{prestige::%{_u}%}%"
  34. else:
  35. send "&cNot enough money to prestige. You need %{prestige::%{_u}%}% &cto prestige" to {_p}
  36.  
  37. command /upgrade:
  38. aliases: /upgrad, /upgra, /upgr, /upg, /u, /upgrades
  39. trigger:
  40. upgradeGUI(player)
  41.  
  42. function upgradeGUI(p: player):
  43. open virtual hopper to {_p}
  44. format gui slot 1 of {_p} with command block named "&eAdvertise Upgrades" with lore "&5Upgrade the amount of credits you get while advertising" to run:
  45. upgradeAdvertiseGUI(player)
  46. format gui slot 3 of {_p} with diamond ore named "&eCPS Upgrades" with lore "&5Upgrade your CPS to get more credits per second" to run:
  47. upgradeCPSGUI(player)
  48.  
  49. function upgradeAdvertiseGUI(p: player):
  50. set {_u} to {_p}'s uuid
  51. open virtual hopper to {_p}
  52. format gui slot 2 of {_p} with paper named "&eAdverties Multi (%{multi::cps::%{_u}%}%)" with lore "&5Increase your advertisement multi" to run:
  53. if {credits::%{_u}%} >= {upgrades::price::multi::%{_u}%}:
  54. add 0.1 to {multi::click::%{_u}%}
  55. else:
  56. send "&cNot enough money" to {_p}
  57.  
  58. function upgradeCPSGUI(p: player):
  59. open virtual chest with 6 rows named "&c&lUpgrades" to {_p}
  60. set {_s} to 0
  61. loop 56 times:
  62. format gui slot {_s} of {_p} with gray stained glass pane named " "
  63. add 1 to {_s}
  64. upgradeCPS({_p}, 12, stone, "Daily", 100, 1)
  65. upgradeCPS({_p}, 13, coal block, "Weekly", 500, 5)
  66. upgradeCPS({_p}, 14, iron block, "Biweekly", 1000, 10)
  67. upgradeCPS({_p}, 21, redstone block, "Monthly", 5000, 50)
  68. upgradeCPS({_p}, 22, lapis block, "Quarterly", 25000, 250)
  69. upgradeCPS({_p}, 23, diamond block, "Yearly", 100000, 1000)
  70. upgradeCPS({_p}, 30, emerald block, "Unlimited", 500000, 5000)
  71. upgradeCPS({_p}, 31, beacon, "Ultimate", 1000000, 10000)
  72. upgradeCPS({_p}, 32, command block, "GOD", 10000000, 100000)
  73. format gui slot 40 of {_p} with barrier named "&4&lClose" to close
  74.  
  75. function upgradeCPS(p: player, s: integer, i: item, n: text, a: integer, f: integer):
  76. set {_u} to {_p}'s uuid
  77. format gui slot {_s} of {_p} with {_i} named "&a%{_n}%" with lore "&5Price: &e%{_a}%" to run:
  78. if {credits::%{_u}%} >= {_a}:
  79. add {_f} to {cps::%{_u}%}
  80. add 1 to {upgrades::cps::%{_n}%::%{_u}%}
  81. remove {_a} from {credits::%{_u}%}
  82. else:
  83. send "&cNon enough money" to {_p}
  84.  
  85. function scoreboard(p: player):
  86. set {_u} to {_p}'s uuid
  87. wipe {_p}'s sidebar
  88. set name of sidebar of {_p} to "&4&lDevings"
  89. set score "&7Credits: &c%{credits::%{_u}%}%" in sidebar of {_p} to 3
  90. set score "&7CPS: &c%{cps::%{_u}%}% (%{multi::cps::%{_u}%}%x)" in sidebar of {_p} to 2
  91. set score "&7Click Gain: &c%{click::%{_u}%}% (%{multi::click::%{_u}%}%x)" in sidebar of {_p} to 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement