local n=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local I=game:GetService("\080\097\116\104\102\105\110\100\105\110\103\083\101\114\118\105\099\101")local X=game:GetService("\080\108\097\121\101\114\115")local r=game:GetService("\082\117\110\083\101\114\118\105\099\101")local t=game:GetService("\068\101\098\114\105\115")local u=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local B=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local m=script:FindFirstAncestor("\067\097\109\101\114\097\083\099\114\105\112\116")local W=require(m:WaitForChild("\073\110\118\105\115\105\099\097\109"))local H=require((m:WaitForChild("\082\111\111\116\067\097\109\101\114\097")):WaitForChild("\079\114\098\105\116\097\108\067\097\109\101\114\097"))local q=X.LocalPlayer local c=q.PlayerScripts local P=c:FindFirstChild("\067\111\110\116\114\111\108\083\099\114\105\112\116")local e,z if P then e=P:FindFirstChild("\077\097\115\116\101\114\067\111\110\116\114\111\108")if e then local n=e:FindFirstChild("\084\111\117\099\104\074\117\109\112")if n then z=require(n)end end end local U=true local S=workspace.FindPartOnRayWithIgnoreList local A=math.min local V=math.max local F=math.pi local w=math.atan2 local i=Vector3.new local s=Vector2.new local L=CFrame.new local o=nil local d=nil local a=i(1,0,1)local G=i(0,0,0)local T=s(0,0)local M=nil local x=nil if n.TouchEnabled then x=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")x.Name="\079\110\067\108\105\099\107\084\111\077\111\118\101\070\097\105\108\083\116\097\116\101\067\104\097\110\103\101"x.Parent=c end
-- Written By Kip Turner, Copyright Roblox 2014
-- Updated by Garnold to utilize the new PathfindingService API, 2017

local UIS = game:GetService("UserInputService")
local PathfindingService = game:GetService("PathfindingService")
local PlayerService = game:GetService("Players")
local RunService = game:GetService("RunService")
local DebrisService = game:GetService("Debris")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local tweenService = game:GetService("TweenService")

local CameraScript = script:FindFirstAncestor("CameraScript")
local InvisicamModule = require(CameraScript:WaitForChild("Invisicam"))
local OrbitalCamModule = require(CameraScript:WaitForChild("RootCamera"):WaitForChild("OrbitalCamera"))

local Player = PlayerService.LocalPlayer
local PlayerScripts = Player.PlayerScripts

local ControlScript = PlayerScripts:FindFirstChild("ControlScript")
local MasterControl, TouchJump
if ControlScript then
	MasterControl = ControlScript:FindFirstChild("MasterControl")
	if MasterControl then
		local TouchJumpModule = MasterControl:FindFirstChild("TouchJump")
		if TouchJumpModule then
			TouchJump = require(TouchJumpModule)
		end
	end
end

local SHOW_PATH = true

local RayCastIgnoreList = workspace.FindPartOnRayWithIgnoreList

local math_min = math.min
local math_max = math.max
local math_pi = math.pi
local math_atan2 = math.atan2

local Vector3_new = Vector3.new
local Vector2_new = Vector2.new
local CFrame_new = CFrame.new

local CurrentSeatPart = nil
local DrivingTo = nil

local XZ_VECTOR3 = Vector3_new(1, 0, 1)
local ZERO_VECTOR3 = Vector3_new(0, 0, 0)
local ZERO_VECTOR2 = Vector2_new(0, 0)

local lastFailedPosition = nil

local BindableEvent_OnFailStateChanged = nil
if UIS.TouchEnabled then
	BindableEvent_OnFailStateChanged = Instance.new("BindableEvent")
	BindableEvent_OnFailStateChanged.Name = "OnClickToMoveFailStateChange"
	BindableEvent_OnFailStateChanged.Parent = PlayerScripts
end
