Advertisement
Sungmingamerpro13

MainScript (SungExetior13RBLX Style)

Jul 12th, 2024
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.32 KB | None | 0 0
  1. --- Variables ---
  2.  
  3. local SetImageDialogueEvent = game.ReplicatedStorage.DialogueGuiEvent.SetImageDialogueEvent
  4. local DialogueEvent = game.ReplicatedStorage.DialogueGuiEvent.CreateDialogueEvent
  5. local HideDialogueEvent = game.ReplicatedStorage.DialogueGuiEvent.HideDialogueEvent
  6.  
  7. --- NPC ---
  8.  
  9. local NPC_Image = "rbxassetid://17704412471"
  10. local NPC_Image2 = "rbxassetid://17704556027"
  11. local NPC_Angry2 = "rbxassetid://18153967463"
  12. local NPC_Sad2 = "rbxassetid://18153963908"
  13. local Monster_Image = "rbxassetid://17022795013"
  14.  
  15. --- randomPlayer ---
  16.  
  17. local randomPlayer
  18. local randomPlayerName
  19. local randomPlayerId
  20.  
  21. local function getPlayerImage(player_id)
  22.     local content, isReady = game:GetService("Players"):GetUserThumbnailAsync(player_id, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
  23.     return content
  24. end
  25.  
  26. local function getRandomPlayer()
  27.     local players = game.Players:getPlayers()
  28.     local number = math.random(1,#players)
  29.     randomPlayer = players[number]
  30.     randomPlayerName = randomPlayer.Name
  31.     randomPlayerId = randomPlayer.UserId
  32. end
  33.  
  34. function HideCastMessage()
  35.     HideDialogueEvent:FireAllClients()
  36. end
  37.  
  38. function BroadCastMessage(Message)
  39.     DialogueEvent:FireAllClients(Message)
  40. end
  41.  
  42. function SetMessageSpeaker(Name, Image)
  43.     SetImageDialogueEvent:FireAllClients(Name, Image)
  44. end
  45.  
  46. --- MainScript ---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement