local INVITE_CODE = "4QSYwCB6n" local INVITE_URL = "https://discord.gg/" .. INVITE_CODE local Players = game:GetService("Players") local GuiService = game:GetService("GuiService") local HttpService = game:GetService("HttpService") local TweenService = game:GetService("TweenService") local LocalPlayer = Players.LocalPlayer local function toast(title, body, good) local ok = pcall(function() local parent = (gethui and gethui()) or (cloneref and cloneref(game:GetService("CoreGui"))) or game:GetService("CoreGui") local gui = Instance.new("ScreenGui") gui.Name = "RelayDiscord_" .. HttpService:GenerateGUID(false):sub(1, 6) gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.DisplayOrder = 100000 gui.Parent = parent local card = Instance.new("CanvasGroup") card.Size = UDim2.fromOffset(310, 74) card.Position = UDim2.new(0.5, 0, 0, -90) card.AnchorPoint = Vector2.new(0.5, 0) card.BackgroundColor3 = Color3.fromRGB(0, 0, 0) card.BorderSizePixel = 0 card.GroupTransparency = 1 card.Parent = gui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 14) corner.Parent = card local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(255, 255, 255) stroke.Transparency = 0.86 stroke.Parent = card local dot = Instance.new("Frame") dot.Size = UDim2.fromOffset(8, 8) dot.Position = UDim2.fromOffset(16, 17) dot.BackgroundColor3 = good and Color3.fromRGB(88, 220, 140) or Color3.fromRGB(230, 180, 90) dot.BorderSizePixel = 0 dot.Parent = card local dc = Instance.new("UICorner") dc.CornerRadius = UDim.new(1, 0) dc.Parent = dot local head = Instance.new("TextLabel") head.Position = UDim2.fromOffset(32, 11) head.Size = UDim2.new(1, -46, 0, 18) head.BackgroundTransparency = 1 head.Font = Enum.Font.GothamBold head.Text = title head.TextSize = 13 head.TextColor3 = Color3.fromRGB(255, 255, 255) head.TextXAlignment = Enum.TextXAlignment.Left head.Parent = card local sub = Instance.new("TextLabel") sub.Position = UDim2.fromOffset(32, 31) sub.Size = UDim2.new(1, -46, 0, 32) sub.BackgroundTransparency = 1 sub.Font = Enum.Font.GothamMedium sub.Text = body sub.TextSize = 12 sub.TextColor3 = Color3.fromRGB(186, 186, 194) sub.TextWrapped = true sub.TextXAlignment = Enum.TextXAlignment.Left sub.TextYAlignment = Enum.TextYAlignment.Top sub.Parent = card local IN = TweenInfo.new(0.34, Enum.EasingStyle.Quint, Enum.EasingDirection.Out) TweenService:Create(card, IN, { GroupTransparency = 0, Position = UDim2.new(0.5, 0, 0, 24), }):Play() task.delay(5, function() local OUT = TweenInfo.new(0.28, Enum.EasingStyle.Quad, Enum.EasingDirection.In) TweenService:Create(card, OUT, { GroupTransparency = 1, Position = UDim2.new(0.5, 0, 0, -90), }):Play() task.delay(0.35, function() gui:Destroy() end) end) end) return ok end local function requestFn() local fn = (syn and syn.request) or (http and http.request) or http_request or request if not fn and fluxus then fn = fluxus.request end return fn end local function openInApp() local fn = requestFn() if not fn then return false, "no HTTP in this executor" end for port = 6463, 6472 do local ok, res = pcall(fn, { Url = ("http://127.0.0.1:%d/rpc?v=1"):format(port), Method = "POST", Headers = { ["Content-Type"] = "application/json", ["Origin"] = "https://discord.com", }, Body = HttpService:JSONEncode({ cmd = "INVITE_BROWSER", nonce = HttpService:GenerateGUID(false), args = { code = INVITE_CODE }, }), }) if ok and type(res) == "table" then local code = tonumber(res.StatusCode or res.Status) or 0 if code >= 200 and code < 300 then return true, ("Discord app (port %d)"):format(port) end end end return false, "Discord app not reachable" end local function openInBrowser() local ok = pcall(function() GuiService:OpenBrowserWindow(INVITE_URL) end) return ok, ok and "browser" or "browser call blocked" end local function copyLink() local ok = pcall(function() setclipboard(INVITE_URL) end) return ok, ok and "copied to clipboard" or "clipboard unavailable" end task.spawn(function() local okApp, whyApp = openInApp() if okApp then copyLink() toast("Relay", "Opening the Discord app: " .. whyApp, true) return end local okWeb, whyWeb = openInBrowser() if okWeb then copyLink() toast("Relay", "Opened the invite in your browser.", true) return end local okClip = copyLink() if okClip then toast("Relay", "Link copied, paste it in your browser:\n" .. INVITE_URL, true) else toast("Relay", "Join us at " .. INVITE_URL, false) end warn(("[Relay] app: %s | web: %s | %s"):format(whyApp, whyWeb, INVITE_URL)) end) return INVITE_URL