Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local PreviewButton = Instance.new("TextButton")
- local PreviewPart = Instance.new("Part")
- local player = game.Players.LocalPlayer
- local character = player.Character
- local cam = workspace.CurrentCamera
- local Song = Instance.new("Sound")
- local Id = "15514405804"
- local Right = 0
- local Up = 0
- local Forward = 0
- local RR = 0
- local RU = 0
- local RF = 0
- PreviewPart.Parent = workspace
- ScreenGui.Parent = game.CoreGui
- cam.CameraType = Enum.CameraType.Attach
- cam.CameraSubject = PreviewPart
- Song.Parent = game.Workspace
- Song.SoundId = "rbxassetid://"..Id
- Song.Playing = true
- Song.Looped = false
- Song.Volume = 1
- Song:Stop()
- PreviewPart.Anchored = true
- PreviewPart.Size = Vector3.new(4, 1, 2)
- PreviewPart.CanCollide = false
- PreviewPart.Rotation = Vector3.new(0, 180, 0)
- PreviewPart.Position = Vector3.new(54.371, 909.478, 269)
- PreviewPart.Transparency = 1
- PreviewPart.Rotation = Vector3.new(0, 90, 0)
- PreviewButton.Name = "PreviewButton"
- PreviewButton.Parent = ScreenGui
- PreviewButton.BackgroundTransparency = 1
- PreviewButton.Position = UDim2.new(0.45, 0, 0.8, 0)
- PreviewButton.Size = UDim2.new(0, 125, 0, 50)
- PreviewButton.Font = Enum.Font.IndieFlower
- PreviewButton.Text = "Preview"
- PreviewButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- PreviewButton.TextSize = 100
- PreviewButton.MouseButton1Down:connect(function()
- Song:Play()
- PreviewButton.Visible = false
- for i = 1,900 do
- wait()
- Right = Right - 0.1
- --Forward = Forward + 0.5
- --Up = Up + 0.5
- PreviewPart.CFrame = PreviewPart.CFrame + Vector3.new(Right, Up, Forward)
- Right = 0
- Forward = 0
- Up = 0
- end
- --[[for i = 1,100 do
- wait()
- RU = RU - 0.5
- PreviewPart.Rotation = PreviewPart.Rotation + Vector3.new(RR, RU, RF)
- RR = 0
- RU = 0
- RF = 0
- end
- for i = 1,100 do
- wait()
- RU = RU + 0.5
- PreviewPart.Rotation = PreviewPart.Rotation + Vector3.new(RR, RU, RF)
- RR = 0
- RU = 0
- RF = 0
- end]]--
- cam.CameraSubject = character
- cam.CameraType = Enum.CameraType.Track
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement