Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on join:
- if {var::*} does not contain player:
- set {credits::%player's uuid%} to 0
- set {cps::%player's uuid%} to 0
- set {click::%player's uuid%} to 1
- set {multi::cps::%player's uuid%} to 1
- set {multi::click::%player's uuid%} to 1
- set {prestige::%player's uuid%} to 0
- set {prestigecost::%player's uuid%} to 1000000000
- on chat:
- set the chat format to "&8[&e%{prestige::%player's uuid%}%&8] &r%colored player's displayname% » &f%message%"
- on right click:
- if player's held item is command block named "&cAdvertise":
- add {click::%player's uuid%}*{multi::click::%player's uuid%} to {credits::%player's uuid%}
- command /advertise:
- trigger:
- give player command block named "&cAdvertise"
- command /prestige:
- aliases: /prest, /pres
- trigger:
- prestige(player)
- function prestige(p: player):
- set {_u} to {_p}'s uuid
- if {credits::%{_u}%} >= {prestigecost::%{_u}%}:
- add 1 to {prestige::%{_u}%}
- set {prestigecost::%{_u}%} to {prestigecost::%{_u}%}*1.5
- add 1.5 to {multi::cps::%{_u}%}
- broadcast "&4%{_p}% &ehas prestiged to &4%{prestige::%{_u}%}%"
- else:
- send "&cNot enough money to prestige. You need %{prestige::%{_u}%}% &cto prestige" to {_p}
- command /upgrade:
- aliases: /upgrad, /upgra, /upgr, /upg, /u, /upgrades
- trigger:
- upgradeGUI(player)
- function upgradeGUI(p: player):
- open virtual hopper to {_p}
- 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:
- upgradeAdvertiseGUI(player)
- 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:
- upgradeCPSGUI(player)
- function upgradeAdvertiseGUI(p: player):
- set {_u} to {_p}'s uuid
- open virtual hopper to {_p}
- format gui slot 2 of {_p} with paper named "&eAdverties Multi (%{multi::cps::%{_u}%}%)" with lore "&5Increase your advertisement multi" to run:
- if {credits::%{_u}%} >= {upgrades::price::multi::%{_u}%}:
- add 0.1 to {multi::click::%{_u}%}
- else:
- send "&cNot enough money" to {_p}
- function upgradeCPSGUI(p: player):
- open virtual chest with 6 rows named "&c&lUpgrades" to {_p}
- set {_s} to 0
- loop 56 times:
- format gui slot {_s} of {_p} with gray stained glass pane named " "
- add 1 to {_s}
- upgradeCPS({_p}, 12, stone, "Daily", 100, 1)
- upgradeCPS({_p}, 13, coal block, "Weekly", 500, 5)
- upgradeCPS({_p}, 14, iron block, "Biweekly", 1000, 10)
- upgradeCPS({_p}, 21, redstone block, "Monthly", 5000, 50)
- upgradeCPS({_p}, 22, lapis block, "Quarterly", 25000, 250)
- upgradeCPS({_p}, 23, diamond block, "Yearly", 100000, 1000)
- upgradeCPS({_p}, 30, emerald block, "Unlimited", 500000, 5000)
- upgradeCPS({_p}, 31, beacon, "Ultimate", 1000000, 10000)
- upgradeCPS({_p}, 32, command block, "GOD", 10000000, 100000)
- format gui slot 40 of {_p} with barrier named "&4&lClose" to close
- function upgradeCPS(p: player, s: integer, i: item, n: text, a: integer, f: integer):
- set {_u} to {_p}'s uuid
- format gui slot {_s} of {_p} with {_i} named "&a%{_n}%" with lore "&5Price: &e%{_a}%" to run:
- if {credits::%{_u}%} >= {_a}:
- add {_f} to {cps::%{_u}%}
- add 1 to {upgrades::cps::%{_n}%::%{_u}%}
- remove {_a} from {credits::%{_u}%}
- else:
- send "&cNon enough money" to {_p}
- function scoreboard(p: player):
- set {_u} to {_p}'s uuid
- wipe {_p}'s sidebar
- set name of sidebar of {_p} to "&4&lDevings"
- set score "&7Credits: &c%{credits::%{_u}%}%" in sidebar of {_p} to 3
- set score "&7CPS: &c%{cps::%{_u}%}% (%{multi::cps::%{_u}%}%x)" in sidebar of {_p} to 2
- 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