Tanjiro-Kamado

Dungeon Quest | Autosell example source

Feb 5th, 2020
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.63 KB | None | 0 0
  1. --[[
  2. Credits to; JasonJJK
  3. Official thread; https://v3rmillion.net/showthread.php?tid=942848
  4. -------------------------------------------------------------------------------
  5. Script was provided from the official Demon Slayers Community Server; https://discord.gg/ADEVZ5R
  6. Official thread; https://v3rmillion.net/showthread.php?tid=936292 |<-- More info
  7. ]]--
  8.  
  9. RARITYTOSELL = "common" -- common, uncommon, rare, epic, legendary
  10.  
  11. local weapons = {}
  12. local abilities = {}
  13. local chests = {}
  14. local helmets = {}
  15. for i,v in pairs (game:GetService("Players").LocalPlayer.PlayerGui.inventory.mainBackground.innerBackground.rightSideFrame.ScrollingFrame:GetChildren()) do
  16. if v:IsA("ImageLabel") then
  17. local itemtype = tostring(v.itemType.Value)
  18. local id = v.itemType.uniqueItemNum.Value
  19.  
  20. if RARITYTOSELL == "common" then
  21. if v.ImageColor3 == Color3.fromRGB(152,152,152) then
  22. if itemtype == "weapon" then
  23. table.insert(weapons, id)
  24. end
  25. if itemtype == "ability" then
  26. table.insert(abilities, id)
  27. end
  28. if itemtype == "chest" then
  29. table.insert(chests, id)
  30. end
  31. if itemtype == "helmet" then
  32. table.insert(helmets, id)
  33. end
  34. end
  35. end
  36. if RARITYTOSELL == "uncommon" then
  37. if v.ImageColor3 == Color3.fromRGB(91,194,80) then
  38. if itemtype == "weapon" then
  39. table.insert(weapons, id)
  40. end
  41. if itemtype == "ability" then
  42. table.insert(abilities, id)
  43. end
  44. if itemtype == "chest" then
  45. table.insert(chests, id)
  46. end
  47. if itemtype == "helmet" then
  48. table.insert(helmets, id)
  49. end
  50. end
  51. end
  52. if RARITYTOSELL == "rare" then
  53. if v.ImageColor3 == Color3.fromRGB(75,77,195) then
  54. if itemtype == "weapon" then
  55. table.insert(weapons, id)
  56. end
  57. if itemtype == "ability" then
  58. table.insert(abilities, id)
  59. end
  60. if itemtype == "chest" then
  61. table.insert(chests, id)
  62. end
  63. if itemtype == "helmet" then
  64. table.insert(helmets, id)
  65. end
  66. end
  67. end
  68. if RARITYTOSELL == "epic" then
  69. if v.ImageColor3 == Color3.fromRGB(146,70,159) then
  70. if itemtype == "weapon" then
  71. table.insert(weapons, id)
  72. end
  73. if itemtype == "ability" then
  74. table.insert(abilities, id)
  75. end
  76. if itemtype == "chest" then
  77. table.insert(chests, id)
  78. end
  79. if itemtype == "helmet" then
  80. table.insert(helmets, id)
  81. end
  82. end
  83. end
  84. if RARITYTOSELL == "legendary" then
  85. if v.ImageColor3 == Color3.fromRGB(244,154,9) then
  86. if itemtype == "weapon" then
  87. table.insert(weapons, id)
  88. end
  89. if itemtype == "ability" then
  90. table.insert(abilities, id)
  91. end
  92. if itemtype == "chest" then
  93. table.insert(chests, id)
  94. end
  95. if itemtype == "helmet" then
  96. table.insert(helmets, id)
  97. end
  98. end
  99. end
  100. end
  101. end
  102. local stuff = {
  103. ability = abilities,
  104. helmet = helmets,
  105. chest = chests,
  106. weapon = weapons,
  107. }
  108. game.ReplicatedStorage.remotes.sellItemEvent:FireServer(stuff)
Advertisement
Add Comment
Please, Sign In to add comment