-- 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
endauto send email btw
open source
No comments yet. Be the first to comment!
1-- claude is best (by me, fix and updata is by claude)
2
3local Players = game:GetService("Players")
4local Player = Players.LocalPlayer
5
6-- If clicks do nothing, try "Click" or "Both"
7local CLICK_MODE = "Activated" -- "Activated" | "Click" | "Both"
8
9local function Get(path)
10 local obj = Player:FindFirstChild("PlayerGui")
11 for _, name in ipairs(path) do
12 obj = obj and obj:FindFirstChild(name)
13 end
14 return obj
15end
16
17-- Real visibility: every parent GuiObject visible + ScreenGui enabled
18local function IsShown(obj)
19 if not obj then return false end
20 local cur = obj
21 while cur and cur:IsA("GuiObject") do
22 if not cur.Visible then return false end
23 cur = cur.Parent
24 end
25 if cur and cur:IsA("LayerCollector") and not cur.Enabled then
26 return false
27 end
28 return true
29end
30
31local function Click(btn)
32 pcall(function()
33 if CLICK_MODE == "Activated" or CLICK_MODE == "Both" then
34 firesignal(btn.Activated)
35 end
36 if CLICK_MODE == "Click" or CLICK_MODE == "Both" then
37 firesignal(btn.MouseButton1Click)
38 end
39 end)
40end
41
42local function Resolve()
43 local Root = Get({ "MeetingUI", "Root" })
44 if not Root then return nil end
45
46 local Body = Root:FindFirstChild("LaptopView")
47 and Root.LaptopView:FindFirstChild("InboxWindow")
48 and Root.LaptopView.InboxWindow:FindFirstChild("Body")
49 if not Body then return nil end
50
51 local NewBody = Root:FindFirstChild("NewMessage") and Root.NewMessage:FindFirstChild("Body")
52 local CallBody = Root.LaptopView:FindFirstChild("CallWindow")
53 and Root.LaptopView.CallWindow:FindFirstChild("Body")
54
55 return {
56 Body = Body,
57 Email = Body:FindFirstChild("EmailField")
58 and Body.EmailField:FindFirstChild("EmailScroll")
59 and Body.EmailField.EmailScroll:FindFirstChild("Email"),
60 WriteEmail = Body:FindFirstChild("WriteEmail"),
61 TapToType = NewBody and NewBody:FindFirstChild("TypeBox")
62 and NewBody.TypeBox:FindFirstChild("TapToType"),
63 Send = NewBody and NewBody:FindFirstChild("Toolbar")
64 and NewBody.Toolbar:FindFirstChild("Send"),
65 Decline = CallBody and CallBody:FindFirstChild("Decline"),
66 }
67end
68
69local function GetAction(ui)
70 local text = ((ui.Email.ContentText ~= "" and ui.Email.ContentText) or ui.Email.Text or ""):lower()
71 if text == "" then return nil, text end
72
73 local name
74 if text:find("this message looks suspicious", 1, true) then
75 name = "DELETE"
76 elseif text:find("approve", 1, true) then
77 name = "APPROVE"
78 elseif text:find("forward", 1, true) then
79 name = "FORWARD"
80 end
81 return name and ui.Body:FindFirstChild(name), text
82end
83
84-- Per-button state so each one is clicked once per appearance (with slow retry)
85local lastClick = {}
86local wasShown = {}
87local RETRY = 0.05 -- retry only if still visible after this long
88local SETTLE = 0.10 -- wait for UI/tween/text to settle
89
90local shownSince = {}
91
92local function ClickWhenShown(key, btn)
93 local shown = IsShown(btn)
94 if not shown then
95 shownSince[key] = nil
96 return
97 end
98 local now = os.clock()
99 shownSince[key] = shownSince[key] or now
100 if now - shownSince[key] < SETTLE then return end
101 if now - (lastClick[key] or 0) < RETRY then return end
102 lastClick[key] = now
103 Click(btn)
104end
105
106local lastEmailText, emailChangedAt = nil, 0
107
108while task.wait(0.05) do
109 local ok, err = pcall(function()
110 local ui = Resolve()
111 if not ui then return end
112
113 -- Email actions: act on settled text, once per email, retry slowly
114 if ui.Email and IsShown(ui.Email) then
115 local btn, text = GetAction(ui)
116 if text ~= lastEmailText then
117 lastEmailText = text
118 emailChangedAt = os.clock()
119 end
120 if btn and btn:IsA("GuiButton") and os.clock() - emailChangedAt >= SETTLE then
121 ClickWhenShown("emailAction", btn)
122 end
123 else
124 lastEmailText = nil
125 end
126
127 if ui.WriteEmail then ClickWhenShown("WriteEmail", ui.WriteEmail) end
128 if ui.TapToType then ClickWhenShown("TapToType", ui.TapToType) end
129 if ui.Send then ClickWhenShown("Send", ui.Send) end
130 if ui.Decline then ClickWhenShown("Decline", ui.Decline) end
131 end)
132 if not ok then warn(err) end
133end