Advertisement
drocher4

sfs

Dec 23rd, 2022
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. saveRarity = {'umidk', 'Rgfdh'}
  2.  
  3. enchantsForSell = {
  4. 'hg',
  5. 'dfgdfg'
  6. }
  7.  
  8.  
  9.  
  10.  
  11. for key, value in pairs(saveRarity) do
  12. saveRarity[value] = key
  13. end
  14. for key, value in pairs(enchantsForSell) do
  15. enchantsForSell[value] = key
  16. end
  17. knit = game.ReplicatedStorage.Packages.Knit
  18. v1 = require(knit)
  19. u2 = v1.GetController("DataController")
  20. v4 = u2:GetData("PlayerData")
  21. asd = knit.Services.DatabaseService.RF.GetDatabases
  22. asd = asd:InvokeServer(game.Players.LocalPlayer).Weapons
  23.  
  24. _G.enabled = not _G.enabled
  25. print('_G.enabled =', _G.enabled)
  26.  
  27. function checkEnchants(ench)
  28. if #ench == 0 then
  29. return true
  30. end
  31. for _,enchant in pairs(ench) do
  32. enName = enchant.name..(enchant.tier and ' '..enchant.tier or '')
  33. if enchantsForSell[enName] then
  34. return false
  35. end
  36. end
  37. return true
  38. end
  39.  
  40. while wait() and _G.enabled do
  41. local forSale = {}
  42. local sell = false
  43. for i,v in pairs(v4.WeaponInv) do
  44. if not saveRarity[asd[v.name].rarity] and checkEnchants(v.enchants) then
  45. forSale[i] = true
  46. sell = true
  47. end
  48. end
  49. if sell then
  50. knit.Services.WeaponInvService.RF.MultiSell:InvokeServer(forSale)
  51. end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement