Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command steal(target){
- permission = "steal";
- execute(){
- if(isSet(target)){
- target = toPlayer(target)
- if(isSet(target)){
- if(target.balance >= 10000){
- amount = random.int(0, 10000);
- }
- else{
- amount = random.int(0, target.balance);
- }
- target.decreaseBalance(amount);
- target.message(player.name + " has stolen " + amount + " balance from you!");
- player.increaseBalance(amount);
- player.message("You stole " + amount + " from " + target.name);
- }
- else{
- player.message("Could not find player with that name);
- }
- }
- else{
- player.message("Usage: /steal <player name>");
- }
- target = toPlayer(target)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement