Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Put rarity you don't want here
- local rarityfilter = {
- "Common",
- "Uncommon",
- "Rare",
- "Epic"
- }
- local myinv = game.Players.LocalPlayer.PlayerGui.MainGui.CenterUIFrame.Inventory
- local cards = myinv.CardInventoryFrame.CardInventoryScrollingFrame
- function SellCard(Name)
- game:GetService("ReplicatedStorage").RemoteFunctions.MainRemoteFunction:InvokeServer("SellCard", Name)
- end
- for check,card in pairs(cards:GetChildren()) do
- if card:IsA("ImageButton") then
- for select,cardbutton in next, getconnections(card.CardClick.MouseButton1Down) do
- cardbutton:Fire()
- local getrarity = myinv.InvOverlayOuterFrame.CardInventoryOverlay.Rarity.Text
- for get, rarity in next, rarityfilter do
- if getrarity == rarity then
- SellCard(card.Name)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement