-- claude is best (by me, fix and updata is by claude)

local Players = game:GetService("Players")
local Player = Players.LocalPlayer

-- If clicks do nothing, try "Click" or "Both"
local CLICK_MODE = "Activated" -- "Activated" | "Click" | "Both"

local function Get(path)
    local obj = Player:FindFirstChild("PlayerGui")
    for _, name in ipairs(path) do
        obj = obj and obj:FindFirstChild(name)
    end
    return obj
end

-- Real visibility: every parent GuiObject visible + ScreenGui enabled
local function IsShown(obj)
    if not obj then return false end
    local cur = obj
    while cur and cur:IsA("GuiObject") do
        if not cur.Visible then return false end
        cur = cur.Parent
    end
    if cur and cur:IsA("LayerCollector") and not cur.Enabled then
        return false
    end
    return true
end

local function Click(btn)
    pcall(function()
        if CLICK_MODE == "Activated" or CLICK_MODE == "Both" then
            firesignal(btn.Activated)
        end
        if CLICK_MODE == "Click" or CLICK_MODE == "Both" then
            firesignal(btn.MouseButton1Click)
        end
    end)
end

local function Resolve()
    local Root = Get({ "MeetingUI", "Root" })
    if not Root then return nil end

    local Body = Root:FindFirstChild("LaptopView")
        and Root.LaptopView:FindFirstChild("InboxWindow")
        and Root.LaptopView.InboxWindow:FindFirstChild("Body")
    if not Body then return nil end

    local NewBody = Root:FindFirstChild("NewMessage") and Root.NewMessage:FindFirstChild("Body")
    local CallBody = Root.LaptopView:FindFirstChild("CallWindow")
        and Root.LaptopView.CallWindow:FindFirstChild("Body")

    return {
        Body = Body,
        Email = Body:FindFirstChild("EmailField")
            and Body.EmailField:FindFirstChild("EmailScroll")
            and Body.EmailField.EmailScroll:FindFirstChild("Email"),
        WriteEmail = Body:FindFirstChild("WriteEmail"),
        TapToType = NewBody and NewBody:FindFirstChild("TypeBox")
            and NewBody.TypeBox:FindFirstChild("TapToType"),
        Send = NewBody and NewBody:FindFirstChild("Toolbar")
            and NewBody.Toolbar:FindFirstChild("Send"),
        Decline = CallBody and CallBody:FindFirstChild("Decline"),
    }
end

local function GetAction(ui)
    local text = ((ui.Email.ContentText ~= "" and ui.Email.ContentText) or ui.Email.Text or ""):lower()
    if text == "" then return nil, text end

    local name
    if text:find("this message looks suspicious", 1, true) then
        name = "DELETE"
    elseif text:find("approve", 1, true) then
        name = "APPROVE"
    elseif text:find("forward", 1, true) then
        name = "FORWARD"
    end
    return name and ui.Body:FindFirstChild(name), text
end

-- Per-button state so each one is clicked once per appearance (with slow retry)
local lastClick = {}
local wasShown = {}
local RETRY = 0.05   -- retry only if still visible after this long
local SETTLE = 0.10 -- wait for UI/tween/text to settle

local shownSince = {}

local function ClickWhenShown(key, btn)
    local shown = IsShown(btn)
    if not shown then
        shownSince[key] = nil
        return
    end
    local now = os.clock()
    shownSince[key] = shownSince[key] or now
    if now - shownSince[key] < SETTLE then return end
    if now - (lastClick[key] or 0) < RETRY then return end
    lastClick[key] = now
    Click(btn)
end

local lastEmailText, emailChangedAt = nil, 0

while task.wait(0.05) do
    local ok, err = pcall(function()
        local ui = Resolve()
        if not ui then return end

        -- Email actions: act on settled text, once per email, retry slowly
        if ui.Email and IsShown(ui.Email) then
            local btn, text = GetAction(ui)
            if text ~= lastEmailText then
                lastEmailText = text
                emailChangedAt = os.clock()
            end
            if btn and btn:IsA("GuiButton") and os.clock() - emailChangedAt >= SETTLE then
                ClickWhenShown("emailAction", btn)
            end
        else
            lastEmailText = nil
        end

        if ui.WriteEmail then ClickWhenShown("WriteEmail", ui.WriteEmail) end
        if ui.TapToType  then ClickWhenShown("TapToType", ui.TapToType) end
        if ui.Send       then ClickWhenShown("Send", ui.Send) end
        if ui.Decline    then ClickWhenShown("Decline", ui.Decline) end
    end)
    if not ok then warn(err) end
end
Don’t Get Fired At Work! 🧳 [LIMITED SKIN EVENT! ] auto send email V1
Mobile Friendly
1,296 views
1 months ago

auto send email V1

WORKING
Free

Description

auto send email btw

open source

Related Scripts