hum.Seated:connect(function(l,y)if l and y then local l=y.Parent.Parent local S=0 camparts={}for l,y in pairs(l.Keys:GetChildren())do if y and(y:IsA("\080\097\114\116")and string.match(y.Name,"\067\097\109\101\114\097"))then if string.match(y.Name,"\037\100")then if string.match(y.Name,"\050")then table.insert(camparts,2,y)elseif string.match(y.Name,"\051")then table.insert(camparts,3,y)elseif string.match(y.Name,"\052")then table.insert(camparts,4,y)elseif string.match(y.Name,"\053")then table.insert(camparts,5,y)end else table.insert(camparts,1,y)end S=S+1 end end if S>1 then cam.CameraType=Enum.CameraType.Scriptable for l=1,S,1 do gui.Frame["\067\097\109"..l].Visible=true end gui.Frame.Cam1.BackgroundColor3=selected end elseif not l then for l,y in pairs(gui.Frame:GetChildren())do y.Visible=false y.BackgroundColor3=idle cam.CameraType=Enum.CameraType.Custom end end wait(.1)end)plr.CharacterAdded:Connect(function(l)if l.Name==plr.Name then repeat hum=l:WaitForChild("\072\117\109\097\110\111\105\100")wait()until hum hum.Seated:connect(function(l,y)if l and y then local l=y.Parent.Parent local S=0 camparts={}for l,y in pairs(l.Keys:GetChildren())do if y and(y:IsA("\080\097\114\116")and string.match(y.Name,"\067\097\109\101\114\097"))then if string.match(y.Name,"\037\100")then if string.match(y.Name,"\050")then table.insert(camparts,2,y)elseif string.match(y.Name,"\051")then table.insert(camparts,3,y)elseif string.match(y.Name,"\052")then table.insert(camparts,4,y)elseif string.match(y.Name,"\053")then table.insert(camparts,5,y)end else table.insert(camparts,1,y)end S=S+1 end end if S>1 then cam.CameraType=Enum.CameraType.Scriptable for l=1,S,1 do gui.Frame["\067\097\109"..l].Visible=true end gui.Frame.Cam1.BackgroundColor3=selected end elseif not l then for l,y in pairs(gui.Frame:GetChildren())do y.Visible=false y.BackgroundColor3=idle cam.CameraType=Enum.CameraType.Custom end end wait(.1)end)wait()end end)for l,y in pairs(gui.Frame:GetChildren())do if y then y.MouseButton1Click:connect(function()if y.Visible then for l,y in pairs(gui.Frame:GetChildren())do y.BackgroundColor3=idle end local l for S,T in pairs(guicams)do if T==y then l=camparts[S]end end cam:Interpolate(l.CFrame*CFrame.new(0,0,1),l.CFrame,.5)y.BackgroundColor3=selected end end)end end
--[[
local obj = --object or gui or wahtever goes here
local Properties = {}
Properties.Size = UDim2.new()
Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
--Obj,Property,Time,wait,Easingstyle,EasingDirection,RepeatAmt,Reverse
]]

hum.Seated:connect(function(IsSeated, seat)
	if IsSeated and seat then
		local piano = seat.Parent.Parent
		local amt = 0
		camparts = {}
		for i, v in pairs(piano.Keys:GetChildren()) do
			if v and v:IsA("Part") and string.match(v.Name, "Camera") then
				if string.match(v.Name, "%d") then
					if string.match(v.Name, "2") then
						table.insert(camparts, 2, v)
					elseif string.match(v.Name, "3") then
						table.insert(camparts, 3, v)
					elseif string.match(v.Name, "4") then
						table.insert(camparts, 4, v)
					elseif string.match(v.Name, "5") then
						table.insert(camparts, 5, v)
					end
				else
					table.insert(camparts, 1, v)
				end
				amt = amt + 1
			end
		end
		if amt > 1 then
			cam.CameraType = Enum.CameraType.Scriptable
			for i = 1, amt do
				gui.Frame["Cam" .. i].Visible = true
			end
			gui.Frame.Cam1.BackgroundColor3 = selected
		end
	elseif not IsSeated then
		for i, v in pairs(gui.Frame:GetChildren()) do
			v.Visible = false
			v.BackgroundColor3 = idle
			cam.CameraType = Enum.CameraType.Custom
		end
	end
	wait(0.1)
end)

plr.CharacterAdded:Connect(function(char)
	if char.Name == plr.Name then
		repeat
			hum = char:WaitForChild("Humanoid")
			wait()
		until hum
		hum.Seated:connect(function(IsSeated, seat)
			if IsSeated and seat then
				local piano = seat.Parent.Parent
				local amt = 0
				camparts = {}
				for i, v in pairs(piano.Keys:GetChildren()) do
					if v and v:IsA("Part") and string.match(v.Name, "Camera") then
						if string.match(v.Name, "%d") then
							if string.match(v.Name, "2") then
								table.insert(camparts, 2, v)
							elseif string.match(v.Name, "3") then
								table.insert(camparts, 3, v)
							elseif string.match(v.Name, "4") then
								table.insert(camparts, 4, v)
							elseif string.match(v.Name, "5") then
								table.insert(camparts, 5, v)
							end
						else
							table.insert(camparts, 1, v)
						end
						amt = amt + 1
					end
				end
				if amt > 1 then
					cam.CameraType = Enum.CameraType.Scriptable
					for i = 1, amt do
						gui.Frame["Cam" .. i].Visible = true
					end
					gui.Frame.Cam1.BackgroundColor3 = selected
				end
			elseif not IsSeated then
				for i, v in pairs(gui.Frame:GetChildren()) do
					v.Visible = false
					v.BackgroundColor3 = idle
					cam.CameraType = Enum.CameraType.Custom
				end
			end
			wait(0.1)
		end)
		wait()
	end
end)

for i, v in pairs(gui.Frame:GetChildren()) do
	if v then
		v.MouseButton1Click:connect(function()
			if v.Visible then
				for a, b in pairs(gui.Frame:GetChildren()) do
					b.BackgroundColor3 = idle
				end
				local RealCam
				for a, b in pairs(guicams) do
					if b == v then
						RealCam = camparts[a]
					end
				end
				cam:Interpolate(RealCam.CFrame * CFrame.new(0, 0, 1), RealCam.CFrame, 0.5)
				v.BackgroundColor3 = selected
			end
		end)
	end
end
