Carkzowk

Sex

Jan 28th, 2025
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. local camera = workspace.CurrentCamera
  2. local TweenService = game:GetService("TweenService")
  3. local touchPart = workspace:FindFirstChild("Touch") -- Replace with your part name
  4. local isPlaying = false -- Cooldown to prevent multiple triggers
  5.  
  6. -- Define camera parts and timings
  7. local cameraParts = {
  8. workspace.Camera1,
  9. workspace.Camera2,
  10. workspace.Camera3
  11. }
  12. local cameraTimes = {3, 4, 5} -- Seconds at each camera position
  13.  
  14. -- Function to transition smoothly between cameras
  15. local function playCutscene()
  16. isPlaying = true -- Start cooldown
  17. camera.CameraType = Enum.CameraType.Scriptable
  18.  
  19. for i = 1, #cameraParts do
  20. local targetCFrame = cameraParts[i].CFrame
  21.  
  22. -- Create a tween for smooth movement
  23. local tweenInfo = TweenInfo.new(cameraTimes[i], Enum.EasingStyle.Linear)
  24. local tween = TweenService:Create(camera, tweenInfo, {CFrame = targetCFrame})
  25.  
  26. tween:Play() -- Start the tween
  27. tween.Completed:Wait() -- Wait for the tween to finish
  28. end
  29.  
  30. -- Reset the camera
  31. camera.CameraType = Enum.CameraType.Custom
  32. task.wait(4) -- Cooldown duration
  33. isPlaying = false -- Allow retriggering
  34. end
  35.  
  36. -- Detect when the 'Touch' part is touched
  37. if touchPart then
  38. touchPart.Touched:Connect(function(hit)
  39. local character = hit.Parent
  40. if character and character:FindFirstChild("Humanoid") and not isPlaying then
  41. playCutscene()
  42. end
  43. end)
  44. end
Advertisement
Add Comment
Please, Sign In to add comment