Sungmingamerpro13

MainScript 2

Mar 13th, 2024
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.56 KB | None | 0 0
  1. local CreateDialogueEvent = game.ReplicatedStorage.CreateDialogueEvent
  2.  
  3. -- Other Useful Functions
  4.  
  5. local randomPlayerName
  6. local randomPlayerId
  7.  
  8. local function getPlayerImage(player_id)
  9.     local content, isReady = game:GetService("Players"):GetUserThumbnailAsync(player_id, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
  10.     return content
  11. end
  12.  
  13. local function getRandomPlayer()
  14.     local players = game.Players:getPlayers()
  15.     local number = math.random(1,#players)
  16.     local randomPlayer = players[number]
  17.     randomPlayerName = randomPlayer.Name
  18.     randomPlayerId = randomPlayer.UserId
  19. end
  20.  
  21. ----------------------------------------
  22.  
  23. -- put your challenge functions here
  24.  
  25. local function challeng_example() -- THIS IS JUST AN EXAMPLE! IT WON'T RUN
  26.     local teacher_Image = "rbxassetid://4841171880"
  27.     CreateDialogueEvent:FireAllClients(teacher_Image,"Hello Students!")
  28.     wait(5)
  29.     getRandomPlayer()
  30.     CreateDialogueEvent:FireAllClients(getPlayerImage(randomPlayerId),"I think this is the School!")
  31. end
  32.  
  33. local function challenge_intro()
  34.    
  35. end
  36.  
  37. local function challenge_1()
  38.    
  39. end
  40.  
  41. local function challenge_2()
  42.    
  43. end
  44.  
  45. local function challenge_3()
  46.    
  47. end
  48.  
  49. local function challenge_4()
  50.    
  51. end
  52.  
  53. local function challenge_ending()
  54.    
  55. end
  56.  
  57. --------------------------------------------------
  58.  
  59. local function startGame() -- This is your main function where we order the challenges
  60.     challenge_intro()
  61.     challenge_1()
  62.     challenge_2()
  63.     challenge_3()
  64.     challenge_4()
  65.     challenge_ending()
  66. end
  67.  
  68. wait(10) -- waits 10 seconds
  69. startGame() -- runs the startGame function
Add Comment
Please, Sign In to add comment