Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Cutscene Editor
- --Made by Filipono120 Studios
- --Tested and 100% worked on studio!
- --Version 1.1:
- --| Fixed camera positioning...
- --| Thanks for 700 views!
- --If you have ideas, message me on roblox...
- wait(1 / 60)
- --Waypoint Settings
- local WAYPOINT_COUNT = 0 --Starts and adds an waypoint with a number (integer)
- local Y_OFFSET = 2
- local Z_OFFSET = 0
- local PlaceKeycode = "Q" --Change the hotkey if you want
- local ClearKeycode = "R" --Change the hotkey if you want
- local PlayKeycode = "E" --Change the hotkey if you want
- local WaitKeycode = "Z" --Change the hotkey if you want
- local DurationKeycode = "F" --Change the hotkey if you want
- local YOffsetKeycode = "X" --Change the hotkey if you want
- local ZOffsetKeycode = "C" --Change the hotkey if you want
- local RotationKeycode = "V" --Change the hotkey if you want
- local RandomWaypointColor = false --Changes the waypoint color randomly...
- local WaitInt = 10
- local Rotation = 180
- local TimeDuration = 1.5 --Change it later...
- --Player Settings
- local PLACING_METHOD = 1 --[[
- Methods:
- (0) - ~Player Placement~
- (1) - ~Mouse Placement~
- ]]
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local mouse = plr:GetMouse()
- local UIS = game:GetService("UserInputService")
- local RS = game:GetService("RunService")
- local TS = game:GetService("TweenService")
- --Wedge
- local wedge = Instance.new("WedgePart", workspace)
- wedge.Name = "WedgeSelectorPart"
- wedge.Size = Vector3.new(1.5, 1.5, 1.5)
- --Functions
- local function CreateWayPoint(Pos, Name, Anchorable, CanCollide)
- local WaypointModel = Instance.new("Model", workspace)
- WaypointModel.Name = "Waypoint_"..WAYPOINT_COUNT
- local WaypointPart = Instance.new("Part", WaypointModel)
- WaypointModel.PrimaryPart = WaypointPart
- WaypointPart.Size = Vector3.new(2.5, 2.5, 2.5)
- WaypointPart.Material = Enum.Material.Neon
- WaypointPart.Reflectance = 0.45
- WaypointPart.Transparency = 0.75
- WaypointPart.Position = Pos
- WaypointPart.Anchored = Anchorable
- WaypointPart.CanCollide = CanCollide
- WaypointPart.Name = Name
- local Humanoid = Instance.new("Humanoid", WaypointModel)
- Humanoid.Name = "WaypointHumanoidTag"
- Humanoid.NameDisplayDistance = 20
- Humanoid.NameOcclusion = Enum.NameOcclusion.OccludeAll
- if RandomWaypointColor then
- local RandomColor = BrickColor.Random()
- WaypointPart.BrickColor = RandomColor
- end
- if PLACING_METHOD == 1 then
- WaypointModel.PrimaryPart.Position = Vector3.new(mouse.Hit.X, math.floor(mouse.Hit.Y + Y_OFFSET), mouse.Hit.Z + Z_OFFSET)
- WaypointModel.PrimaryPart.Orientation = Vector3.new(0, wedge.Orientation.Y, 0)
- elseif PLACING_METHOD == 0 then
- WaypointModel.PrimaryPart.Position = Vector3.new(char["HumanoidRootPart"].Position.X, char["HumanoidRootPart"].Position.Y + Y_OFFSET, char["HumanoidRootPart"].Position.Z + Z_OFFSET)
- WaypointModel.PrimaryPart.Orientation = Vector3.new(0, Rotation, 0)
- end
- end
- local function PlayAnimation()
- local models = workspace
- local modelChild = models:GetChildren()
- table.sort(modelChild, function(a, b) return a:GetFullName() < b:GetFullName() end)
- for _, model in pairs(modelChild) do
- if string.match(model.Name, "Waypoint") and model.PrimaryPart then
- local PrimaryPart = model.PrimaryPart
- local Camera = workspace.CurrentCamera
- Camera.CameraType = Enum.CameraType.Scriptable
- local tween = TS:Create(
- Camera,
- TweenInfo.new(TimeDuration, Enum.EasingStyle.Exponential, Enum.EasingDirection.In),
- {
- CFrame = CFrame.new(PrimaryPart.CFrame.X, PrimaryPart.CFrame.Y + Y_OFFSET, PrimaryPart.CFrame.Z + Z_OFFSET) * CFrame.Angles(0, PrimaryPart.Orientation.Y / 0.3, 0);
- Focus = CFrame.new(0, 0, 100);
- }
- )
- tween:Play()
- tween.Completed:Wait()
- wait(WaitInt)
- Camera.CameraType = Enum.CameraType.Custom
- end
- end
- end
- --RBXScriptSignal Events
- UIS.InputBegan:Connect(function(input, GPE)
- if GPE then return end
- if input.KeyCode == Enum.KeyCode[PlaceKeycode] then
- WAYPOINT_COUNT = WAYPOINT_COUNT + 1
- CreateWayPoint(Vector3.new(-43.85, 1.25, -9.95), "Head", true, false)
- elseif input.KeyCode == Enum.KeyCode[DurationKeycode] then
- if TimeDuration >= 4.1 then
- TimeDuration = .1
- end
- TimeDuration = TimeDuration + .1
- game.StarterGui:SetCore("SendNotification", {
- Title = "[CUTSCENE EDITOR]";
- Text = "The tween duration has been changed to "..TimeDuration;
- Icon = "";
- Duration = 5;
- })
- elseif input.KeyCode == Enum.KeyCode[YOffsetKeycode] then
- if Y_OFFSET >= 10 then
- Y_OFFSET = 1
- end
- Y_OFFSET = Y_OFFSET + 1
- game.StarterGui:SetCore("SendNotification", {
- Title = "[CUTSCENE EDITOR]";
- Text = "The Y Offset has been changed to "..Y_OFFSET;
- Icon = "";
- Duration = 5;
- })
- elseif input.KeyCode == Enum.KeyCode[ZOffsetKeycode] then
- if Z_OFFSET >= 10 then
- Z_OFFSET = -1
- end
- Z_OFFSET = Z_OFFSET + 1
- game.StarterGui:SetCore("SendNotification", {
- Title = "[CUTSCENE EDITOR]";
- Text = "The Z Offset has been changed to "..Z_OFFSET;
- Icon = "";
- Duration = 5;
- })
- elseif input.KeyCode == Enum.KeyCode[WaitKeycode] then
- if WaitInt >= 10 then
- WaitInt = 0
- end
- WaitInt = WaitInt + 1
- game.StarterGui:SetCore("SendNotification", {
- Title = "[CUTSCENE EDITOR]";
- Text = "The wait integer has been changed to "..WaitInt;
- Icon = "";
- Duration = 5;
- })
- elseif input.KeyCode == Enum.KeyCode[RotationKeycode] then
- if Rotation >= 360 then
- Rotation = 0
- end
- Rotation = Rotation + 90
- game.StarterGui:SetCore("SendNotification", {
- Title = "[CUTSCENE EDITOR]";
- Text = "The rotation has been changed to "..Rotation;
- Icon = "";
- Duration = 5;
- })
- elseif input.KeyCode == Enum.KeyCode[PlayKeycode] then
- PlayAnimation()
- elseif input.KeyCode == Enum.KeyCode[ClearKeycode] then
- for _, mod in pairs(workspace:GetChildren()) do
- if mod:IsA("Model") and string.match(mod.Name, "Waypoint") then
- mod:Destroy()
- WAYPOINT_COUNT = 0
- end
- end
- end
- end)
- RS.RenderStepped:Connect(function()
- if PLACING_METHOD == 1 then
- wedge.Orientation = Vector3.new(0, Rotation, 0)
- wedge.Transparency = 0.5
- wedge.Material = Enum.Material.Neon
- wedge.Position = Vector3.new(mouse.Hit.X, math.floor(mouse.Hit.Y + Y_OFFSET), mouse.Hit.Z + Z_OFFSET)
- wedge.Anchored = true
- wedge.CanCollide = false
- elseif PLACING_METHOD == 0 then
- wedge.Orientation = Vector3.new(0, Rotation, 0)
- wedge.Transparency = 0.5
- wedge.Material = Enum.Material.Neon
- wedge.Position = Vector3.new(char["HumanoidRootPart"].Position.X, char["HumanoidRootPart"].Position.Y + Y_OFFSET, char["HumanoidRootPart"].Position.Z + Z_OFFSET)
- wedge.Anchored = true
- wedge.CanCollide = false
- end
- end)
- char["Humanoid"].Died:Connect(function()
- for _, mod in pairs(workspace:GetChildren()) do
- if mod:IsA("Model") and string.match(mod.Name, "Waypoint") then
- mod:Destroy()
- WAYPOINT_COUNT = 0
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment