Hasli4

RBLX. FinalDialog

Jan 4th, 2026
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.18 KB | None | 0 0
  1. local crystal = game.Workspace:WaitForChild("Crystal")
  2. crystal.Parent = game.ServerStorage
  3. local princess = game.Workspace:WaitForChild("Princess")
  4. princess.Parent = game.ServerStorage
  5.  
  6.  
  7. print("Скрипт запустился")
  8. -- path to quest character dialogue
  9. local npc = game.Workspace.npc
  10. local head = npc:WaitForChild("Head")
  11. local quest_npc_dialog = npc.Head.Dialog
  12.  
  13. -- function to check the player's answers
  14. function StartDialogue(player, choice)
  15.     if (choice == quest_npc_dialog.DialogChoice1) then
  16.         print("Диалог 1 работает")
  17.     elseif (choice == quest_npc_dialog.DialogChoice2) then
  18.         print("Диалог 2 работает")
  19.     elseif (choice == quest_npc_dialog.DialogChoice2.DialogChoice3) then
  20.         game.ServerStorage.Crystal.Parent = game.Workspace
  21.         print("Возьми кристалл!")
  22.     elseif (choice == quest_npc_dialog.DialogChoice2.DialogChoice3.DialogChoice4) then
  23.         game.ServerStorage.Princess.Parent = game.Workspace
  24.         local msg = Instance.new("Message")
  25.         msg.Parent = workspace
  26.         msg.Text = "Принцесса в замке на крыше"
  27.         wait(2)
  28.         msg:Destroy()
  29.     end
  30.  
  31. end
  32. quest_npc_dialog.DialogChoiceSelected:Connect(StartDialogue)
Advertisement
Add Comment
Please, Sign In to add comment