Carkzowk

Porn hub

Jan 28th, 2025
1,571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 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 a 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. -- Create a tween for smooth movement
  87. local tweenInfo = TweenInfo.new(cameraTimes[i], Enum.EasingStyle.Linear)
  88. local tween = TweenService:Create(camera, tweenInfo, {CFrame = targetCFrame})
  89.  
  90. tween:Play() -- Start the tween
  91. tween.Completed:Wait() -- Wait for the tween to finish
  92.  
  93. -- If at Camera3, display dialogue, lock camera, and wait 16 seconds
  94. if i == 3 then
  95. camera.CFrame = cameraParts[3].CFrame
  96. camera.CameraType = Enum.CameraType.Scriptable -- Ensure the camera is fully locked
  97. showDialogue()
  98. task.wait(16)
  99. end
  100. end
  101.  
  102. -- Reset the camera
  103. camera.CameraType = Enum.CameraType.Custom
  104. task.wait(4) -- Cooldown duration
  105. isPlaying = false -- Allow retriggering
  106. end
  107.  
  108. -- Detect when the 'Touch' part is touched
  109. if touchPart then
  110. touchPart.Touched:Connect(function(hit)
  111. local character = hit.Parent
  112. if character and character:FindFirstChild("Humanoid") and not isPlaying then
  113. playCutscene()
  114. end
  115. end)
  116. end
Advertisement
Add Comment
Please, Sign In to add comment