Gerard_games

asdasdasdasdasd

Nov 14th, 2021 (edited)
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. local Library = require(game:GetService("ReplicatedStorage").Framework.Library)
  2. workspace.__THINGS.__REMOTES.MAIN:FireServer("b", "add trade pet")
  3. wait(0.25)
  4. function GetPetThing(idthing)
  5. local Type = string.sub(idthing, -1)
  6. local id = idthing:sub(1, -3)
  7. local Lookfor = (Type == "4" and "dm") or (Type == "3" and "r") or (Type == "2" and "g") or (Type == "1" and nil)
  8. for i, v in pairs(Library.Save.Get().Pets) do
  9. if Lookfor ~= nil then
  10. if v.id == id and v[Lookfor] then
  11. return v.uid
  12. end
  13. elseif v.id == id and not v['dm'] and not v['r'] and not v['g'] then
  14. return v.uid
  15. end
  16. end
  17. end
  18.  
  19. _G.TradeIDThing = ""
  20. spawn(function()
  21. repeat wait() until _G.TradeIDThing ~= ""
  22. local added = 0
  23. for a = 1, _G.EmptySlots do
  24. workspace.__THINGS.__REMOTES["add trade pet"]:InvokeServer({_G.TradeIDThing, GetPetThing(G.TableOfPets[a])})
  25. end
  26. end)
  27.  
  28. local mt = getrawmetatable(game)
  29. local oldnamecall = mt.__namecall
  30. setreadonly(mt, false)
  31.  
  32. mt.__namecall = newcclosure(function(self, ...)
  33. local args = {...}
  34. if _G.TradeIDThing == "" and self == workspace.__THINGS.__REMOTES["get trade"] and getnamecallmethod() == "InvokeServer" then
  35. _G.TradeIDThing = args[1][1] or ""
  36. end
  37. return oldnamecall(self, ...)
  38. end)
  39.  
  40. setreadonly(mt, true)
Add Comment
Please, Sign In to add comment