Advertisement
Jiren_0013

Anime Dimensions - Jiren sell cards

Jul 4th, 2021
1,245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. -- Put rarity you don't want here
  2. local rarityfilter = {
  3.     "Common",
  4.     "Uncommon",
  5.     "Rare",
  6.     "Epic"
  7. }
  8. local myinv = game.Players.LocalPlayer.PlayerGui.MainGui.CenterUIFrame.Inventory
  9. local cards = myinv.CardInventoryFrame.CardInventoryScrollingFrame
  10. function SellCard(Name)
  11.     game:GetService("ReplicatedStorage").RemoteFunctions.MainRemoteFunction:InvokeServer("SellCard", Name)
  12. end
  13. for check,card in pairs(cards:GetChildren()) do
  14.     if card:IsA("ImageButton") then
  15.         for select,cardbutton in next, getconnections(card.CardClick.MouseButton1Down) do
  16.             cardbutton:Fire()
  17.             local getrarity = myinv.InvOverlayOuterFrame.CardInventoryOverlay.Rarity.Text
  18.             for get, rarity in next, rarityfilter do
  19.                 if getrarity == rarity then
  20.                     SellCard(card.Name)
  21.                 end
  22.             end
  23.         end
  24.     end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement