local X=script.Parent:WaitForChild("\072\117\109\097\110\111\105\100")local G=nil X.Seated:Connect(function(X,F)G=F end)local F=false local c=false local T=false local a=false;(game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")).InputBegan:Connect(function(X,G)if G then return end if X.KeyCode==Enum.KeyCode.W then F=true end if X.KeyCode==Enum.KeyCode.S then c=true end if X.KeyCode==Enum.KeyCode.A then T=true end if X.KeyCode==Enum.KeyCode.D then a=true end end);(game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")).InputEnded:Connect(function(X)if X.KeyCode==Enum.KeyCode.W then F=false end if X.KeyCode==Enum.KeyCode.S then c=false end if X.KeyCode==Enum.KeyCode.A then T=false end if X.KeyCode==Enum.KeyCode.D then a=false end end)local I=workspace.CurrentCamera local K=game.Players.LocalPlayer:GetMouse()local n=0;(game:GetService("\082\117\110\083\101\114\118\105\099\101")).RenderStepped:Connect(function()if G then print(T)print(a)I.CameraType=Enum.CameraType.Scriptable I.CFrame=G.Parent.Camera.CFrame*CFrame.Angles(math.rad(((K.Y-K.ViewSizeY/2)/K.ViewSizeY)*-20),math.rad(((K.X-K.ViewSizeX/2)/K.ViewSizeX)*-20),0)G.BodyGyro.CFrame=CFrame.new(G.Position,Vector3.new(K.Hit.X,K.Hit.Y,K.Hit.Z))*CFrame.Angles(0,0,math.rad(n))if F then G.BodyVelocity.Velocity=G.CFrame.LookVector*100 elseif c then G.BodyVelocity.Velocity=G.CFrame.LookVector*-100 else G.BodyVelocity.Velocity=Vector3.new(0,0,0)end if T then n+=3 elseif a then n+=-3 else G.BodyAngularVelocity.AngularVelocity=Vector3.new(0,0,0)end else I.CameraType=Enum.CameraType.Custom end end)
-- // Copyright 2023, vracto, All rights reserved.

local hum = script.Parent:WaitForChild("Humanoid")
local seat = nil

hum.Seated:Connect(function(active, seatPart)
	seat = seatPart
end)

local w = false
local s = false
local a = false
local d = false

game:GetService("UserInputService").InputBegan:Connect(function(inp, processed)
	if processed then
		return
	end
	if inp.KeyCode == Enum.KeyCode.W then
		w = true
	end
	if inp.KeyCode == Enum.KeyCode.S then
		s = true
	end
	if inp.KeyCode == Enum.KeyCode.A then
		a = true
	end
	if inp.KeyCode == Enum.KeyCode.D then
		d = true
	end
end)

game:GetService("UserInputService").InputEnded:Connect(function(inp)
	if inp.KeyCode == Enum.KeyCode.W then
		w = false
	end
	if inp.KeyCode == Enum.KeyCode.S then
		s = false
	end
	if inp.KeyCode == Enum.KeyCode.A then
		a = false
	end
	if inp.KeyCode == Enum.KeyCode.D then
		d = false
	end
end)

local camera = workspace.CurrentCamera
local mouse = game.Players.LocalPlayer:GetMouse()
local aa = 0

game:GetService("RunService").RenderStepped:Connect(function()
	if seat then
		print(a)
		print(d)
		camera.CameraType = Enum.CameraType.Scriptable
		camera.CFrame = seat.Parent.Camera.CFrame
			* CFrame.Angles(
				math.rad(((mouse.Y - mouse.ViewSizeY / 2) / mouse.ViewSizeY) * -20),
				math.rad(((mouse.X - mouse.ViewSizeX / 2) / mouse.ViewSizeX) * -20),
				0
			)
		--seat.BodyGyro.CFrame = CFrame.new(seat.Parent.Body.Position, mouse.Hit.LookVector * 666)
		seat.BodyGyro.CFrame = CFrame.new(seat.Position, Vector3.new(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z))
			* CFrame.Angles(0, 0, math.rad(aa))
		if w then
			seat.BodyVelocity.Velocity = seat.CFrame.LookVector * 100
		elseif s then
			seat.BodyVelocity.Velocity = seat.CFrame.LookVector * -100
		else
			seat.BodyVelocity.Velocity = Vector3.new(0, 0, 0)
		end
		if a then
			aa += 3
		elseif d then
			aa += -3
		else
			seat.BodyAngularVelocity.AngularVelocity = Vector3.new(0, 0, 0)
		end
	else
		camera.CameraType = Enum.CameraType.Custom
	end
end)
