this skript is rlly just somthin i did cuz i was bored here it is:
also if you would like me to make it so anyone can break it and it will remove 1 from the player who placed its gen cap msg in da comment thinge
#the options are editable,
#but everything else please dont edit
#nm means the message that will send if the gen broken is not theres
#gencapMSG is the message that it will send if the player has max gen placed
#permMSG is the message that will send if the player does not have the permission to execute the command
#blockRAD is the radius of blocks away the gen has to be for it to function,
#NOTE: dont put blockRAD to a giant number there for it will not couse LOTS of lag
options:
nm: &7[&6&lGens&7] &7» &4this is not your gen to break
gencapMSG: &bYou have reached your Gen Cap!
permMSG: &cNope!
blockRAD: 8
on place of coal block:
set {genlocation::%location of event-block%} to uuid of player
set {gens::%location of event-block%} to uuid of player
if {gens::%player's uuid%} < 10:
add 1 to {gens::%player's uuid%}
else:
send "" to player
send "{@gencapMSG} &7%{gens::%player's uuid%}%&b/&710" to player
send "" to player
cancel event
command /gencap [<player>] [<text>] [<number>]:
permission: gencap.use
permission message: {@permMSG}
trigger:
if arg-1 is set:
if arg-2 is "reset":
set {gens::%arg-1's uuid%} to 0
send "&cYou have just reset %arg-1%&c's gen cap!" to player
command /gens:
trigger:
send "" to player
send "&bYou have used %{gens::%player's uuid%}%&7/&b10 gen space!" to player
send "" to player
command /sell:
trigger:
set {_amount} to amount of paper named "&e$1" in player's inventory
add {_amount} to {money::%player's uuid%}
remove {_amount} of paper named "&e$1" item from player's inventory
send "&7You have just sold &a%{_amount}% &7$1 notes!" to player
send "&7Total Balance&f: &a%{money::%player's uuid%}%"
command /balance:
trigger:
send "" to player
send "&bYou have &a%{money::%player's uuid%}% &bdollars!" to player
send ""
#the function
every 80 ticks:
loop all blocks in a radius of {radiusblock} of player:
if loop-block is coal block:
drop 1 paper named "&e$1" above loop-block
on right click:
if player is holding a paper named "&e$1":
set {_amount} to amount of paper named "&e$1" in player's inventory
add {_amount} to {money::%player's uuid%}
remove {_amount} of paper named "&e$1" item from player's inventory
on break:
if event-block is coal block:
if {genlocation::%location of event-block%} is player's uuid:
remove 1 from {gens::%player's uuid%}
else:
cancel event
send "{@nm}"