Advertisement
Sungmingamerpro13

Cutscene Style Break In (MainScript)

Jul 3rd, 2025
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.71 KB | None | 0 0
  1. -- Variables
  2. DefaultMessageDelayTime = 4
  3. LetterInvertal = 0.05
  4. MessageWaitSigns = {',', '?', '.'}
  5. MessageWaitSignDelay = 1
  6.  
  7. MessageCutsceneValue = game.ReplicatedStorage.CutsceneEvent.MessageCutscene
  8. SkipButtonValue = game.ReplicatedStorage.CutsceneEvent.SkipButtonValue
  9. EndCutsceneValue = game.ReplicatedStorage.CutsceneEvent.EndCutsceneValue
  10. TVWindowValue = game.ReplicatedStorage.CutsceneEvent.TVWindowValue
  11.  
  12. function SetMessages(Text, MessageDelayTime)
  13.     -- This makes the message appear like a typewriter
  14.     for i = 1,#Text,1 do
  15.         MessageCutsceneValue.Value = string.sub(Text,1,i)
  16.         for _, L in pairs(MessageWaitSigns) do
  17.             if string.sub(Text,i,i) == L then
  18.                 wait(MessageWaitSignDelay)
  19.             end
  20.         end
  21.         wait(LetterInvertal)
  22.     end
  23.     if tonumber(MessageDelayTime) ~= nil then
  24.         wait(MessageDelayTime)
  25.     else
  26.         wait(DefaultMessageDelayTime)
  27.     end
  28.     MessageCutsceneValue.Value = 'None'
  29.     return true
  30. end
  31.  
  32. function TVIcon(ID)
  33.     game.Workspace.TV.TVWindow.SurfaceGui.Icon.Image = "rbxassetid://"..ID
  34. end
  35.  
  36. SkipButtonValue.Value = true
  37.  
  38. for i = 15,0,-1 do
  39.     TVWindowValue.Value = "Live In ("..i..")"
  40.     wait(1)
  41.     if EndCutsceneValue.Value == true then
  42.         break
  43.     elseif i == 0 and EndCutsceneValue.Value == false then
  44.         print("Start")
  45.     end
  46. end
  47. TVWindowValue.Value = "None"
  48.  
  49. repeat wait(0.1) until EndCutsceneValue.Value == true or EndCutsceneValue.Value == false
  50.  
  51. if EndCutsceneValue.Value == true then
  52.     print("Skip")
  53.    
  54.     wait(5)
  55.  
  56.     SetMessages("Let's Go")
  57. else
  58.     print("Not Skip")
  59.    
  60.     wait(5)
  61.  
  62.     TVIcon("138447008950302")
  63.  
  64.     SetMessages("Breaking News: Monsters are attacking Roblox")
  65.  
  66.     wait(5)
  67.  
  68.     SetMessages("Breaking News: All windows and doors are closed.")
  69.    
  70.     wait(5)
  71.  
  72.     SetMessages("Let's Go")
  73. end
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement