Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Thanks for using this script
- This script was made by Joriangames/BloxianCode
- Want to know how to use this and script explanation?
- Check the video here: https://youtu.be/iegUPV-wMng
- ]]
- --CUTSCENE HANDELER by BloxianCoder
- local player = game.Players.LocalPlayer
- local char = player.Character or player.CharacterAdded:Wait()
- local hum = char:WaitForChild("Humanoid")
- local TransitionScreen = script.Parent.TransitionScreen
- local CutsceneFolder = workspace.CutsceneSetup
- local TweenService = game:GetService("TweenService")
- local cam = workspace.CurrentCamera
- local function startCutscene()
- cam.CameraType = Enum.CameraType.Scriptable
- script.Parent.Sounds.BackgroundSound:Play()
- script.Parent.TextFrame.Visible = true
- hum.WalkSpeed = 0
- hum:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
- end
- local function posCamera(Position)
- cam.CFrame = Position
- end
- local function posAvatar(character, position)
- character.Parent = workspace
- character.HumanoidRootPart.CFrame = position
- end
- local function TweenCam(newPosition, delayTime)
- local CamTweening = TweenService:Create(cam, TweenInfo.new(delayTime), {CFrame = newPosition})
- CamTweening:Play()
- end
- local function ChangeName(nametext, color)
- local NameLabel = script.Parent.TextFrame.CharName
- NameLabel.Text = nametext
- if color then
- NameLabel.TextColor3 = color
- end
- end
- local function ChangeText(msg, color)
- local Talkinglabel = script.Parent.TextFrame.BehindTalking.Talking
- if color then
- Talkinglabel.TextColor3 = color
- end
- for i=1, #msg do
- Talkinglabel.Text = string.sub(msg, 1, i)
- wait(0.1 / #msg)
- end
- end
- --[CUTSCENE SCRIPT STARTS HERE]
- startCutscene()
- posCamera(CutsceneFolder.CamPos.CFrame)
- posAvatar(char, CutsceneFolder.PlayerPos.CFrame)
- ChangeName(player.Name, Color3.new(255, 255, 255))
- ChangeText("So you wanted to know how to do this right? Well listen..", Color3.new(0.356863, 0.368627, 0.615686))
- wait(5)
- TweenCam(CutsceneFolder.CamPos2.CFrame, 0.5)
- ChangeName("Owner", Color3.new(0.0745098, 0.211765, 1))
- ChangeText("You just have to subscribe to stay up-to-date with the latest videos", Color3.new(255, 255, 255))
- wait(5)
- TweenCam(CutsceneFolder.CamPos3.CFrame, 0.5)
- ChangeName("Enjoy", Color3.new(0.0745098, 0.211765, 1))
- ChangeText("Enjoy the game, don't forget to like it!", Color3.new(255, 255, 255))
- wait(2)
- --END OF CUTSCENE. Sets camera and player to normal settings
- script.Parent.TextFrame.Visible = false
- for i = 1,0,-.1 do
- TransitionScreen.BackgroundTransparency = i
- wait(.1)
- end
- script.Parent.Sounds.BackgroundSound:Stop()
- char.HumanoidRootPart.CFrame = workspace.CutsceneSetup.StartLocation.CFrame
- cam.CameraType = Enum.CameraType.Custom
- cam.CameraSubject = hum
- cam.FieldOfView = 70
- hum.WalkSpeed = 16
- hum:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
- for i = 0,1,.1 do
- TransitionScreen.BackgroundTransparency = i
- wait(.1)
- end
- script.Parent.Enabled = false
- script.Disabled = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement