local function PromptDiscordInvite(invite, showPrompt) if not syn then return warn('Synapse X essential to run this script!') end local Inv, ServerInfo, ServerName = {'s', 'c', 'R', 'a', 'm', 'D', 'a', '4', '6', 'e'}, nil, '' if invite and type(invite) == 'string' and invite:match('%a') then Inv = invite data_url = 'https://discord.com/api/v6/invite/'..Inv else Inv = table.concat(Inv) data_url = 'https://discord.com/api/v6/invite/'..Inv end ServerInfo = syn.request({ Url = 'https://discord.com/api/v6/invite/'..Inv, Method = 'GET' }) if ServerInfo.Success then ServerInfo = game:GetService('HttpService'):JSONDecode(ServerInfo.Body) else warn(ServerInfo.StatusCode, ServerInfo.StatusMessage, '|', ServerInfo.Body) return end local getsynassetfromurl = function(url) local File, Raw = 'SynAsset [', syn.request({ Url = url, Method = 'GET' }).Body if url and type(url) == 'string' and tostring(Raw):find('PNG') then for i = 1, 5 do File = tostring(File..string.char(math.random(65, 122))) end File = File..'].png' writefile(File, Raw) coroutine.wrap(function() wait(10) if isfile(File) then delfile(File) end end)() return getsynasset(File) end end local function Request() syn.request( { Url = 'http://127.0.0.1:6463/rpc?v=1', Method = 'POST', Headers = { ['Content-Type'] = 'application/json', ['origin'] = 'https://ptb.discord.com', }, Body = game:GetService('HttpService'):JSONEncode({ ['args'] = { ['code'] = Inv, ['sex'] = '?species=Goblin&realm=Toril' }, ['cmd'] = 'INVITE_BROWSER', ['nonce'] = 'OwO' }) }) end -- trollage ... (Credits to whoever discovered this invite method) if type(showPrompt) == 'boolean' and showPrompt == true then local DiscordInvitePrompt = Instance.new('ScreenGui') local BG = Instance.new('Frame') local Title = Instance.new('TextLabel') local Description = Instance.new('TextLabel') local Open = Instance.new('TextButton') local Close = Instance.new('TextButton') local ServerTitle = Instance.new('TextLabel') local Banner = Instance.new('ImageLabel') local UICorner = Instance.new('UICorner') DiscordInvitePrompt.Name = 'DiscordInvitePrompt' DiscordInvitePrompt.Parent = game.Players.LocalPlayer:WaitForChild('PlayerGui') DiscordInvitePrompt.ZIndexBehavior = Enum.ZIndexBehavior.Sibling BG.Name = 'BG' BG.Parent = DiscordInvitePrompt BG.BackgroundColor3 = Color3.fromRGB(54, 57, 63) BG.BorderColor3 = Color3.fromRGB(0, 0, 0) BG.Position = UDim2.new(0.315323323, 0, 0.328859031, 0) BG.Size = UDim2.new(0.368316829, 0, 0.371364653, 0) Title.Name = 'Title' Title.Parent = BG Title.BackgroundColor3 = Color3.fromRGB(41, 43, 47) Title.BorderSizePixel = 0 Title.Size = UDim2.new(1, 0, 0.138157889, 0) Title.Font = Enum.Font.GothamBold if ServerInfo.inviter then Title.Text = 'Discord Invite from '..ServerInfo.inviter.username elseif ServerInfo.guild['vanity_url_code'] then Title.Text = 'Discord Vanity Invite' else Title.Text = 'Discord Invite' end Title.TextColor3 = Color3.fromRGB(185, 187, 190) Title.TextSize = 14.000 Description.Name = 'Description' Description.Parent = BG Description.BackgroundColor3 = Color3.fromRGB(60, 63, 70) Description.BackgroundTransparency = 1.000 Description.BorderSizePixel = 0 Description.Position = UDim2.new(0.0403225794, 0, 0.138157889, 0) Description.Size = UDim2.new(0.919354856, 0, 0.118421055, 0) Description.Font = Enum.Font.Gotham Description.Text = 'You were invited to join:' Description.TextColor3 = Color3.fromRGB(255, 255, 255) Description.TextSize = 12.000 Description.TextWrapped = true Open.Name = 'Open' Open.Parent = BG Open.BackgroundColor3 = Color3.fromRGB(60, 63, 70) Open.BorderColor3 = Color3.fromRGB(0, 0, 0) Open.Position = UDim2.new(0.137096778, 0, 0.852407157, 0) Open.Size = UDim2.new(0.282258064, 0, 0.0959892049, 0) Open.Font = Enum.Font.SourceSans Open.Text = 'Open' Open.TextColor3 = Color3.fromRGB(74, 214, 117) Open.TextSize = 14.000 Close.Name = 'Close' Close.Parent = BG Close.BackgroundColor3 = Color3.fromRGB(60, 63, 70) Close.BorderColor3 = Color3.fromRGB(0, 0, 0) Close.Position = UDim2.new(0.580645144, 0, 0.852407157, 0) Close.Size = UDim2.new(0.282258064, 0, 0.0959892049, 0) Close.Font = Enum.Font.SourceSans Close.Text = 'Close' Close.TextColor3 = Color3.fromRGB(214, 0, 3) Close.TextSize = 14.000 ServerTitle.Name = 'ServerTitle' ServerTitle.Parent = BG ServerTitle.BackgroundColor3 = Color3.fromRGB(60, 63, 70) ServerTitle.BackgroundTransparency = 1.000 ServerTitle.BorderSizePixel = 0 ServerTitle.Position = UDim2.new(0.0403225794, 0, 0.256578892, 0) ServerTitle.Size = UDim2.new(0.919354856, 0, 0.149175614, 0) ServerTitle.Font = Enum.Font.GothamBold ServerTitle.Text = ''..ServerInfo.guild.name..'' ServerTitle.TextColor3 = Color3.fromRGB(255, 255, 255) ServerTitle.TextScaled = true ServerTitle.TextSize = 15.000 ServerTitle.TextWrapped = true ServerTitle.RichText = true Banner.Name = 'Banner' Banner.Parent = BG Banner.BackgroundColor3 = Color3.fromRGB(255, 255, 255) Banner.BackgroundTransparency = 1.000 Banner.BorderSizePixel = 0 Banner.Position = UDim2.new(0.411290318, 0, 0.405754447, 0) Banner.Size = UDim2.new(0.17473121, 0, 0.404484302, 0) UICorner.CornerRadius = UDim.new(1, 1) UICorner.Parent = Banner if ServerInfo.guild.icon and ServerInfo.guild.icon ~= 'null' then Banner.Image = getsynassetfromurl('https://cdn.discordapp.com/icons/'..ServerInfo.guild.id..'/'..ServerInfo.guild.icon..'.png') else Banner:Destroy() end Open.MouseButton1Click:Connect(function() Request() DiscordInvitePrompt:Destroy() end) Close.MouseButton1Click:Connect(function() DiscordInvitePrompt:Destroy() end) else Request() end end PromptDiscordInvite('', true) -- First argument: Your invite, Second argument: Whether or not the prompt will show.