Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- saveRarity = {'umidk', 'Rgfdh'}
- enchantsForSell = {
- 'hg',
- 'dfgdfg'
- }
- for key, value in pairs(saveRarity) do
- saveRarity[value] = key
- end
- for key, value in pairs(enchantsForSell) do
- enchantsForSell[value] = key
- end
- knit = game.ReplicatedStorage.Packages.Knit
- v1 = require(knit)
- u2 = v1.GetController("DataController")
- v4 = u2:GetData("PlayerData")
- asd = knit.Services.DatabaseService.RF.GetDatabases
- asd = asd:InvokeServer(game.Players.LocalPlayer).Weapons
- _G.enabled = not _G.enabled
- print('_G.enabled =', _G.enabled)
- function checkEnchants(ench)
- if #ench == 0 then
- return true
- end
- for _,enchant in pairs(ench) do
- enName = enchant.name..(enchant.tier and ' '..enchant.tier or '')
- if enchantsForSell[enName] then
- return false
- end
- end
- return true
- end
- while wait() and _G.enabled do
- local forSale = {}
- local sell = false
- for i,v in pairs(v4.WeaponInv) do
- if not saveRarity[asd[v.name].rarity] and checkEnchants(v.enchants) then
- forSale[i] = true
- sell = true
- end
- end
- if sell then
- knit.Services.WeaponInvService.RF.MultiSell:InvokeServer(forSale)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement