local HttpService = game:GetService("HttpService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local webhook_url = "REPLACE_THIS_WITH_YOUR_WEBHOOK_URL" local avatar_url = "EMPTY_OR_CUSTOM_IMAGE_URL" local function makeRequest(method, url, payload) local requestFunc = (syn and syn.request) or request if not requestFunc then print("ERROR: Your script executor does not support 'request' or 'syn.request'.") return nil end local success, response = pcall(function() return requestFunc({ Url = url, Method = method, Headers = { ["Content-Type"] = "application/json" }, Body = HttpService:JSONEncode(payload), }) end) if not success then print("Webhook pcall failed! Error: " .. tostring(response)) return nil end if response then print("--> Webhook Response Status: " .. tostring(response.StatusCode)) print("--> Webhook Response Success: " .. tostring(response.Success)) print("--> Webhook Response Body: " .. tostring(response.Body)) end return nil end local function sendShutdownMessage() local embed = { title = "Script Status Alert", description = "Script Stopped Working. Check Your Game.", color = 16711680, -- Red footer = { text = "Shutdown detected at " .. os.date("%c") .. "For User: " .. Players.LocalPlayer.Name }, } local payload = { username = "Blox Fruits Informator", avatar_url = avatar_url, content = "@here", embeds = { embed }, } makeRequest("POST", webhook_url, payload) end Players.PlayerRemoving:Connect(function(player) if player == Players.LocalPlayer then sendShutdownMessage() end end) local function createItemEmbed(items, title, color) local fields = {} if #items == 0 then table.insert(fields, { name = "Empty", value = "You have no items of this type.", inline = false }) else for i, item in ipairs(items) do if #fields >= 24 then table.insert(fields, { name = "Note", value = "List is too long to display fully.", inline = false }) break end table.insert(fields, { name = item.Name, value = "Count: " .. tostring(item.Count), inline = true }) end end return { title = title, color = color, fields = fields } end while true do print("Loop started. Fetching player data...") local player = Players.LocalPlayer local playerData = player:WaitForChild("Data", 5) local invSuccess, inventory = pcall(function() return ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("CommF_"):InvokeServer("getInventory") end) if not invSuccess then print("Failed to retrieve inventory. Retrying in 60s. Error: " .. tostring(inventory)) wait(60) continue end print("Successfully retrieved inventory. Processing items...") local beli, fragments, level, race = 0, 0, "N/A", "N/A" if playerData then beli = playerData:FindFirstChild("Beli") and playerData.Beli.Value or 0 fragments = playerData:FindFirstChild("Fragments") and playerData.Fragments.Value or 0 level = playerData:FindFirstChild("Level") and playerData.Level.Value or "N/A" race = playerData:FindFirstChild("Race") and playerData.Race.Value or "N/A" end local materials, fruits = {}, {} if type(inventory) == "table" then for _, itemData in pairs(inventory) do if type(itemData) == "table" and itemData.Name and itemData.Count then if itemData.Type == "Blox Fruit" then table.insert(fruits, itemData) elseif itemData.Type == "Material" then table.insert(materials, itemData) end end end end -- Embed 1: Player Stats local statsEmbed = { title = player.Name .. "'s Stats", description = string.format( "**Level:** %s\n**Race:** %s\n**Beli:** %s\n**Fragments:** %s", tostring(level), tostring(race), tostring(beli), tostring(fragments) ), color = 3447003, footer = { text = "Inventory Bot | " .. os.date("%c") }, } -- Embed 2: Fruits local fruitsEmbed = createItemEmbed(fruits, "Fruits", 15158332) -- Embed 3: Materials local materialsEmbed = createItemEmbed(materials, "Materials", 10038562) local payload = { username = "Blox Fruits Bot", avatar_url = avatar_url, embeds = { statsEmbed, fruitsEmbed, materialsEmbed }, } print("Attempting to send webhook...") makeRequest("POST", webhook_url, payload) print("Webhook function called. Waiting 60 seconds...") wait(60) end