Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- Variables ---
- local SetImageDialogueEvent = game.ReplicatedStorage.DialogueGuiEvent.SetImageDialogueEvent
- local DialogueEvent = game.ReplicatedStorage.DialogueGuiEvent.CreateDialogueEvent
- local HideDialogueEvent = game.ReplicatedStorage.DialogueGuiEvent.HideDialogueEvent
- --- NPC ---
- local NPC_Image = "rbxassetid://17704412471"
- local NPC_Image2 = "rbxassetid://17704556027"
- local NPC_Angry2 = "rbxassetid://18153967463"
- local NPC_Sad2 = "rbxassetid://18153963908"
- local Monster_Image = "rbxassetid://17022795013"
- --- randomPlayer ---
- local randomPlayer
- local randomPlayerName
- local randomPlayerId
- local function getPlayerImage(player_id)
- local content, isReady = game:GetService("Players"):GetUserThumbnailAsync(player_id, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
- return content
- end
- local function getRandomPlayer()
- local players = game.Players:getPlayers()
- local number = math.random(1,#players)
- randomPlayer = players[number]
- randomPlayerName = randomPlayer.Name
- randomPlayerId = randomPlayer.UserId
- end
- function HideCastMessage()
- HideDialogueEvent:FireAllClients()
- end
- function BroadCastMessage(Message)
- DialogueEvent:FireAllClients(Message)
- end
- function SetMessageSpeaker(Name, Image)
- SetImageDialogueEvent:FireAllClients(Name, Image)
- end
- --- MainScript ---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement