Advertisement
nick_exe_

Lunar AI // Lobby

Oct 8th, 2022 (edited)
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. local testing = false
  2. local lobby = 4
  3.  
  4. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
  5.  
  6. local testingLobby = 1
  7.  
  8. local function notifyUser(title, text)
  9. OrionLib:MakeNotification({
  10. Name = title,
  11. Content = text,
  12. Image = "rbxassetid://4483345998",
  13. Time = 5
  14. })
  15. end
  16.  
  17. if game.PlaceId ~= 6516141723 then
  18. notifyUser("Unavailable!", "Please run in the DOORS lobby!")
  19. end
  20.  
  21. notifyUser("Welcome!", "Welcome to DOORS! Use /lobby [playerAmount] to join a lobby.")
  22.  
  23. local function chat(msg)
  24. game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(msg, "All")
  25. end
  26.  
  27. local elevators = game.Workspace.Lobby.LobbyElevators
  28.  
  29. local function getElevator()
  30. for i, elevator in pairs(elevators:GetChildren()) do
  31. if elevator.Name == "GameElevator" then
  32. if elevator.DoorHitbox.BillboardGui.Title.Text == "0 / " .. lobby then
  33. return elevator
  34. else
  35. print("title text is " .. elevator.DoorHitbox.BillboardGui.Title.Text)
  36. end
  37. end
  38. end
  39.  
  40. return nil
  41. end
  42.  
  43. local player = game.Players.LocalPlayer
  44.  
  45. player.Chatted:Connect(function(msg)
  46. local args = string.split(msg, " ")
  47.  
  48. if args[1] == "/lobby" then
  49. if args[2] then
  50. lobby = tonumber(args[2])
  51.  
  52. wait()
  53.  
  54. local elev = getElevator()
  55.  
  56. if elev then
  57. player.Character:MoveTo(elev.DoorHitbox.Position)
  58.  
  59. notifyUser("Success!", "Joined a 0/" .. lobby .. " lobby!")
  60. chat("Welcome to DOORS! Lunar AI has joined a 0/" .. lobby .. "!")
  61. else
  62. notifyUser("Failed!", "Could not find an empty elevator!")
  63. end
  64. else
  65. notifyUser("Error", "/join requires 1 arguement! (LobbyNumber <numbervalue>) Example: /join 4")
  66. end
  67. end
  68. end)
  69.  
  70. OrionLib:Init()
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement