Dupe, Undupe

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Zybrodz

Member
Oct 25, 2022
1
0
1
23
I am not a skript dev, and i do not know how to skript so i downloaded this skript

options:
blacklist:
prefix: &9[AQURISMARINE]

command /dupe [<number>]:
trigger:
if {@blacklist} contains type of tool:
send "{@prefix}"
stop
else:
if arg-1 is not set:
add player's tool to player's inventory
stop
else:
if arg-1 is less than 2:
add player's tool to player's inventory
stop
else:
if arg-1 is more than 5:
loop 6 times:
add player's tool to player's inventory
stop
else:
loop arg-1 times:
add player's tool to player's inventory

this is a simple dupe skript.
what can i add to it so if an item has "&fUndupable" in its lore it cannot be duped?
 
if lore of player's held item contains "&fUndupable":
send "&cError: Item is Undupable" to player
stop
 
upload_2022-11-2_1-30-33.png
 
Here is my skript, i can't help with the undupe but i can help with the blacklist and make it so people can do for ex: /dupe 3 or /dupe 1000 (integers)


Code:
command /dupe <int=1>::
  trigger:
    set {_tool} to player's tool
    if {_tool} is air:
      send "&8&lL1f3&c&lSee1 &8» &aYou cannot dupe air!" to player
      stop
    else:
      if "%{_tool}%" contains "shulker box":
        set {_tag} to tag "tag;BlockEntityTag;Items" of nbt compound of {_tool}
        if "%{_tag}%" contains "elytra" or "trident":
          send "&8&lL1f3&c&lSee1 &8» &aThis item is blacklisted." to player
          stop
      else:
      if {_tool} is a trident or elytra:
        send "&8&lL1f3&c&lSee1 &8» &aThis item is blacklisted." to player
        stop
    give (arg-int * item amount of player's tool) of player's tool to player

the /dupe <int=1> Means you can do ex: /dupe 3 or /dupe 1000
Addons used: I don't know if you need them these are just ones i use SKquery, SKbee, Skrayfall,
Again no idea which ones you need but i use those. Tell me if any issues
 
Here is my skript, i can't help with the undupe but i can help with the blacklist and make it so people can do for ex: /dupe 3 or /dupe 1000 (integers)


Code:
command /dupe <int=1>::
  trigger:
    set {_tool} to player's tool
    if {_tool} is air:
      send "&8&lL1f3&c&lSee1 &8» &aYou cannot dupe air!" to player
      stop
    else:
      if "%{_tool}%" contains "shulker box":
        set {_tag} to tag "tag;BlockEntityTag;Items" of nbt compound of {_tool}
        if "%{_tag}%" contains "elytra" or "trident":
          send "&8&lL1f3&c&lSee1 &8» &aThis item is blacklisted." to player
          stop
      else:
      if {_tool} is a trident or elytra:
        send "&8&lL1f3&c&lSee1 &8» &aThis item is blacklisted." to player
        stop
    give (arg-int * item amount of player's tool) of player's tool to player

the /dupe <int=1> Means you can do ex: /dupe 3 or /dupe 1000
Addons used: I don't know if you need them these are just ones i use SKquery, SKbee, Skrayfall,
Again no idea which ones you need but i use those. Tell me if any issues

I suggest removing skquery and skrayfall

Code:
command /dupe [<int=1>]:
  trigger:
    if tool is air:
      send "&8&lL1f3&c&lSee1 &8» &aYou cannot dupe air!" to player
    else if tool is any shulker box:
      set {_items::*} to tag "BlockEntityTag;Items" of nbt of tool
      if (items from nbt {_items::*}) contains elytra or trident:
        send "&8&lL1f3&c&lSee1 &8» &aThis shulker contains blacklisted items." to player
      else:
        give (arg * item amount of tool) of tool to player
    else if tool is a trident or elytra:
      send "&8&lL1f3&c&lSee1 &8» &aThis item is blacklisted." to player
    else:
      give (arg * item amount of tool) of tool to player

if you get any errors in the line where _items::* is set then update skbee to latest
 
Status
Not open for further replies.