Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local IconTable = {}
- local Webhook = "https://discordapp.com/api/webhooks/1206623566708219904/AoEZ27VBtsrSMSlgJYFUa-7OwTk7pvidICdfr-EP91J3nTWvBYNKP4Fc3yVUZRRCAF6Z"
- local Data = {}
- local HttpService = game:GetService("HttpService")
- local Text = ""
- local Rarity = {}
- for i,v in pairs(game:GetService("ReplicatedStorage").FrameworkDependencies:GetChildren()) do
- if v:FindFirstChild("RarityGradients") then
- for i1,v1 in pairs(v["RarityGradients"]:GetChildren()) do
- table.insert(Rarity,v1.Name)
- end
- end
- end
- local IconTable = {}
- for i,v in pairs(game["ReplicatedStorage"]["FrameworkDependencies"]:GetChildren()) do
- if v:FindFirstChild("TroopDatas") then
- for i1,v1 in pairs(v["TroopDatas"]:GetChildren()) do
- for v2,v2 in pairs(v1:GetChildren()) do
- local table1 = require(v2)
- if type(table1) == "table" and table1.Icon ~= nil then
- IconTable[tostring(table1.Icon)] = {v2.Name,table1.Rarity}
- else
- local table2 = getconstants(table1)
- local Asset
- local Rarity1
- for i,v in pairs(table2) do
- if tostring(v):match("rbx") then
- Asset = v
- end
- if table.find(Rarity,v) then
- Rarity1 = v
- end
- end
- IconTable[Asset] = {v2.Name,Rarity1}
- end
- end
- end
- end
- end
- for i,v in pairs(getgc()) do
- if type(v) == "function" and getfenv(v).script == game:GetService("Players").LocalPlayer.PlayerGui.Lobby.UnitFrame.UnitInvHandler and getinfo(v).name == "UpdateInventory" then
- v()
- end
- end
- local rarityData = {}
- local color = {
- Mythic = "🔴";
- Godly = "🔵";
- Exclusive = "🟣"
- }
- for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.Lobby.UnitFrame.UnitList:GetChildren()) do
- if v:IsA("Frame") and v:FindFirstChild("TroopsFrame") then
- local index = IconTable[tostring(v["TroopsFrame"].TroopIcon.Image)]
- if index then
- print(index[2])
- end
- if index and index[1] and (index[2] == "Mythic" or index[2] == "Exclusive" or index[2] == "Godly") then
- rarityData[index[1]] = index[2]
- Data[index[1]] = not Data[index[1]] and 1 or Data[index[1]] + 1
- end
- end
- end
- for index,value in Data do
- local rarityText = color[rarityData[index] or ""]
- Text = Text .. `{index} {rarityText or ""} จำนวน {value} ตัว \n`
- end
- local json = {
- ["embeds"] = {{
- ['username'] = "",
- ["title"] = "ระบบเช็ค STOCK ของ",
- ["description"] = Text,
- ["type"] = "rich",
- ["color"] = tonumber(0x4287f5),
- ["footer"] = {
- ["text"] = "บริษัท PaPaiShop TH จำกัด";
- ["icon_url"] = "https://cdn.discordapp.com/attachments/1032149598690615318/1207178981342842880/42_20240129201657.PNG?ex=65deb409&is=65cc3f09&hm=1a9f6c01257d18e537ecd955d4884e29926f040c1cf1e8a68aee4cb1125dff70&";
- };
- }}
- }
- local req = http_request
- if req then
- req({
- Url = Webhook;
- Method = 'POST';
- Headers = {
- ['Content-Type'] = 'application/json';
- };
- Body = game:GetService('HttpService'):JSONEncode(json);
- })
- end
- -- for i,v in pairs(getgc()) do
- -- if type(v) == "function" and getfenv(v).script == game:GetService("Players").LocalPlayer.PlayerGui.MainFrames.TroopsSelector.SelectorHandler then
- -- local a
- -- a = hookfunction(v,function(...)
- -- print(...,getinfo(v).name,i)
- -- return a(...)
- -- end)
- -- end
- -- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement