Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Library = require(game:GetService("ReplicatedStorage").Framework.Library)
- workspace.__THINGS.__REMOTES.MAIN:FireServer("b", "add trade pet")
- wait(0.25)
- function GetPetThing(idthing)
- local Type = string.sub(idthing, -1)
- local id = idthing:sub(1, -3)
- local Lookfor = (Type == "4" and "dm") or (Type == "3" and "r") or (Type == "2" and "g") or (Type == "1" and nil)
- for i, v in pairs(Library.Save.Get().Pets) do
- if Lookfor ~= nil then
- if v.id == id and v[Lookfor] then
- return v.uid
- end
- elseif v.id == id and not v['dm'] and not v['r'] and not v['g'] then
- return v.uid
- end
- end
- end
- _G.TradeIDThing = ""
- spawn(function()
- repeat wait() until _G.TradeIDThing ~= ""
- local added = 0
- for i, v in pairs(_G.TableOfPets) do
- if added < _G.EmptySlots then
- spawn(function()
- workspace.__THINGS.__REMOTES["add trade pet"]:InvokeServer({_G.TradeIDThing, GetPetThing(v)})
- end)
- added = added + 1
- end
- end
- end)
- local mt = getrawmetatable(game)
- local oldnamecall = mt.__namecall
- setreadonly(mt, false)
- mt.__namecall = newcclosure(function(self, ...)
- local args = {...}
- if _G.TradeIDThing == "" and self == workspace.__THINGS.__REMOTES["get trade"] and getnamecallmethod() == "InvokeServer" then
- _G.TradeIDThing = args[1][1] or ""
- end
- return oldnamecall(self, ...)
- end)
- setreadonly(mt, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement