Sir_Spaceboi

Untitled

Dec 22nd, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.33 KB | None | 0 0
  1. game.ReplicatedStorage.HostSession.OnServerEvent:Connect(function(Player)
  2.     game.ReplicatedStorage.SessionIsHosted.Value = true
  3.    
  4.     local data =
  5.         {
  6.             ["content"] = "",
  7.             ["embeds"] = {{
  8.                 ["title"] = "**Shift | A session is in progress!**",
  9.                 ["description"] = "A shift is being hosted now by, " .. Player.Name .. "! Why don't you head on down and grab something to eat?",
  10.                 ["type"] = "rich",
  11.                 ["color"] = tonumber(0xffffff),
  12.                 ["fields"] = {
  13.                     {
  14.                         ["name"] = "HOST",
  15.                         ["value"] = Player.Name,
  16.                         ["inline"] = true
  17.                     },
  18.                     {
  19.                         ["name"] = "STATUS",
  20.                         ["value"] = "✅ Commenced",
  21.                         ["inline"] = true
  22.                     }
  23.                 },
  24.                 ["thumbnail"] = {
  25.                     ["url"] = "https://cdn.discordapp.com/attachments/732224705179680790/790720442313736202/HolidayIcecream.png"
  26.                 },
  27.             }}
  28.         }
  29.    
  30.     local Message = {
  31.         ["content"] = '<@&752185614560133170>'
  32.     }
  33.  
  34.     local ND = HttpsService:JSONEncode(Message)
  35.  
  36.     --HttpsService:PostAsync(URL, ND)
  37.  
  38.     local newdata = HttpsService:JSONEncode(data)
  39.    
  40.     HttpsService:PostAsync(URL, newdata)
  41.    
  42.     game.Workspace.SlidingBoard.SurfaceGui.SessionFrame.Frame.HostName.Text = Player.Name
  43.    
  44.     for i, plr in pairs(game.Players:GetPlayers()) do
  45.         plr.PlayerGui.SessionConfirmation.Main.HostName.Text = Player.Name
  46.         Player.PlayerGui.SessionConfirmation:Destroy()
  47.     end
  48. end)
Advertisement
Add Comment
Please, Sign In to add comment