Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Change to permission you want to give below.
- var perm = "essentials.warp.ResourceWorld"
- // Change to the amount of time they should receive permission for. format: DDdHHhMMmSSs
- var permTime = "25h"
- // Change to world to give perm for
- var worldName = "world"
- // Remove // from the line below to use vault
- //addPerm(worldName, "%target%", perm)
- // Remove // from 3 lines below to use gm command or change command to use your own permission manager
- command("manselect " + worldName)
- command("manuaddp %target% " + perm)
- command("mansave")
- clearScripts("%target%")
- metaData.put("perm", perm)
- metaData.put("worldName", worldName)
- runLaterTarget("rmperm.txt", permTime, target)
- // Add the items ids to pick from to this list
- var itemIds = [362,265,320,241,264,30188,3,287,35,280]
- // Add the names of the items to this list, make sure they match up with the id above in the same order! Also, they must use quotes.
- // Don't make them plural as the rest of the code will do that if the amount is greater than 1.
- var itemNames = ["Watermelon Seed","Iron Ingot","Cooked Pork","Rubber Tree","Diamond","UU Matter","Dirt Block","String","Wool Block","Stick"]
- // Minimum amount
- var minAmt = 1
- // Maximum amount
- var maxAmt = 3
- // Feel free to change the words of this message but make sure to include the %target%, %amount% and %item%
- // %target% = voter, %amount% = item amount, %item% = item name
- var itemMessage = "Thanks for voting, %target%! Here's %amount% %item%."
- // And now the code. Don't change this
- var amt = Math.floor((Math.random()*(maxAmt-minAmt+1))+minAmt)
- var item = Math.floor(Math.random()*itemIds.length)
- var itemName = itemNames[item]
- if (amt != 1) {
- itemName += "s"
- }
- command("give %target% " + itemIds[item] + " " + amt)
- itemMessage = itemMessage.replace("%amount%", amt)
- itemMessage = itemMessage.replace("%item%", itemName)
- broadcast(itemMessage)
- command("acb %target% 125")
- //broadcast("You also have access to the Resource World, and 125 claim blocks!")
Advertisement
Add Comment
Please, Sign In to add comment