Carkzowk

Ahh 🥵💋🍑🖕🏻

Jan 28th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. local camera = workspace.CurrentCamera
  2. local TweenService = game:GetService("TweenService")
  3. local Players = game:GetService("Players")
  4. local touchPart = workspace:FindFirstChild("Touch") -- Replace with your part name
  5. local isPlaying = false -- Cooldown to prevent multiple triggers
  6.  
  7. -- Define camera parts and timings
  8. local cameraParts = {
  9. workspace.Camera1,
  10. workspace.Camera2,
  11. workspace.Camera3
  12. }
  13. local cameraTimes = {3, 4, 0} -- Seconds for tweening to each camera position (Camera3 has manual delay)
  14.  
  15. -- Function to create a black fade-in effect
  16. local function createFadeScreen(duration)
  17. local player = Players.LocalPlayer
  18. local playerGui = player:WaitForChild("PlayerGui")
  19.  
  20. local fadeScreen = Instance.new("ScreenGui", playerGui)
  21. fadeScreen.IgnoreGuiInset = true
  22.  
  23. local blackFrame = Instance.new("Frame", fadeScreen)
  24. blackFrame.Size = UDim2.new(1, 0, 1, 0)
  25. blackFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  26. blackFrame.BorderSizePixel = 0
  27.  
  28. local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear)
  29. local fadeTween = TweenService:Create(blackFrame, tweenInfo, {BackgroundTransparency = 1})
  30.  
  31. fadeTween:Play()
  32. fadeTween.Completed:Wait()
  33. fadeScreen:Destroy()
  34. end
  35.  
  36. -- Function to show dialogue
  37. local function showDialogue()
  38. local player = Players.LocalPlayer
  39. local playerGui = player:WaitForChild("PlayerGui")
  40.  
  41. -- Create a GUI for dialogue
  42. local dialogueGui = Instance.new("ScreenGui", playerGui)
  43. dialogueGui.IgnoreGuiInset = true
  44.  
  45. local dialogueLabel = Instance.new("TextLabel", dialogueGui)
  46. dialogueLabel.Size = UDim2.new(0.6, 0, 0.1, 0)
  47. dialogueLabel.Position = UDim2.new(0.2, 0, 0.8, 0)
  48. dialogueLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  49. dialogueLabel.BackgroundTransparency = 0.5
  50. dialogueLabel.TextColor3 = Color3.new(1, 1, 1)
  51. dialogueLabel.Font = Enum.Font.SourceSansBold
  52. dialogueLabel.TextScaled = true
  53. dialogueLabel.Text = ""
  54. dialogueLabel.Visible = true
  55.  
  56. -- Dialogue lines
  57. local playerName = player.Name -- Player's name
  58. local dialogue = {
  59. playerName .. ": Hi and who are you?",
  60. "Rip_ahmed: I am the one who completed this game before!",
  61. "Rip_ahmed: I can say that you can't complete this game easily!",
  62. "Rip_ahmed: If you really can, so try it by yourself.",
  63. playerName .. ": Ok..."
  64. }
  65.  
  66. -- Show each line
  67. for _, line in ipairs(dialogue) do
  68. dialogueLabel.Text = line
  69. task.wait(3) -- Wait time for each dialogue line
  70. end
  71.  
  72. dialogueGui:Destroy() -- Remove the GUI after the dialogue ends
  73. end
  74.  
  75. -- Function to play the cutscene
  76. local function playCutscene()
  77. isPlaying = true -- Start cooldown
  78. camera.CameraType = Enum.CameraType.Scriptable
  79.  
  80. -- Black fade-in before cutscene starts
  81. createFadeScreen(2)
  82.  
  83. for i = 1, #cameraParts do
  84. local targetCFrame = cameraParts[i].CFrame
  85.  
  86. -- Lock the camera position
  87. camera.CFrame = targetCFrame
  88.  
  89. -- Create a tween for smooth movement
  90. local tweenInfo = TweenInfo.new(cameraTimes[i], Enum.EasingStyle.Linear)
  91. local tween = TweenService:Create(camera, tweenInfo, {CFrame = targetCFrame})
  92.  
  93. tween:Play() -- Start the tween
  94. tween.Completed:Wait() -- Wait for the tween to finish
  95.  
  96. -- If at Camera3, display dialogue and wait 30 seconds
  97. if i == 3 then
  98. showDialogue()
  99. task.wait(30)
  100. end
  101. end
  102.  
  103. -- Reset the camera
  104. camera.CameraType = Enum.CameraType.Custom
  105. task.wait(4) -- Cooldown duration
  106. isPlaying = false -- Allow retriggering
  107. end
  108.  
  109. -- Detect when the 'Touch' part is touched
  110. if touchPart then
  111. touchPart.Touched:Connect(function(hit)
  112. local character = hit.Parent
  113. if character and character:FindFirstChild("Humanoid") and not isPlaying then
  114. playCutscene()
  115. end
  116. end)
  117. end
Advertisement
Add Comment
Please, Sign In to add comment