local CreateDialogueEvent = game.ReplicatedStorage.CreateDialogueEvent
local HideDialogueEvent = game.ReplicatedStorage.CreateDialogueEvent.HideDialogueEvent
local TopTextValue = game.ReplicatedStorage.TopText
local ObjectiveValue = game.ReplicatedStorage.TopText.Objective
local ItemsFound = game.ReplicatedStorage.ItemsFound
-- Other Useful Functions
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 BroadCastMessage(name, Id, Message)
CreateDialogueEvent:FireAllClients(name, Id, Message)
end
function HideCastMessage()
HideDialogueEvent:FireAllClients()
end
function TopText(Text, Time)
for i = Time, 0, -1 do
TopTextValue.Value = Text.."("..i..")"
wait(1)
end
TopTextValue.Value = "None"
end
function SetObjectives(Objective)
ObjectiveValue.Value = Objective
end
function ClearObjectives()
ObjectiveValue.Value = "None"
end
function SetItemsFound(Text)
ItemsFound.Value = Text
end
function ClearItemsFound()
ItemsFound.Value = "None"
end
--- NPCImages ---
local NPC_Image = "rbxassetid://16918435393"
local NPC_Angry = "rbxassetid://17421682251"
local NPC_Sad = "rbxassetid://17047446364"
local NPC_Image2 = "rbxassetid://17047444939"
local Monster_Image = "rbxassetid://17022795013"
---- MainScript of Story ----