Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --PUT THIS SCRIPT UNDER ReplicatedFirst
- local TweenService = game:GetService("TweenService")
- local Camera = game.Workspace.CurrentCamera
- local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local IntroGui = PlayerGui:WaitForChild("IntroGui")
- local IntroFrame = IntroGui:WaitForChild("IntroFrame")
- local TitleLabel = IntroFrame:WaitForChild("TitleLabel")
- local PlayButton = IntroFrame:WaitForChild("PlayButton")
- local CameraAnimationTime = 60 --REPLACE 60 WITH THE DESIRED CAMERA ANIMATION TIME IN SECONDS
- local CameraTween
- function setupCamera()
- Camera:GetPropertyChangedSignal("CFrame"):Wait()
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = game.Workspace.CamPart1.CFrame
- CameraTween = TweenService:Create(Camera, TweenInfo.new(CameraAnimationTime), {["CFrame"] = game.Workspace.CamPart2.CFrame})
- CameraTween:Play()
- end
- setupCamera()
- local Blur = Instance.new("BlurEffect", game.Lighting)
- Blur.Size = 12
- IntroFrame.Visible = true
- TitleLabel.Text = game.MarketplaceService:GetProductInfo(game.PlaceId).Name
- PlayButton.MouseButton1Click:Connect(function()
- local FrameOutTween = TweenService:Create(IntroFrame, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Position = UDim2.new(0.5, 0, -1, 0)})
- FrameOutTween:Play()
- FrameOutTween.Completed:Wait()
- IntroFrame.Visible = false
- Blur:Destroy()
- CameraTween:Cancel()
- Camera.CameraType = Enum.CameraType.Custom
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement