local J="\067\108\105\099\107\084\111\077\111\118\101\067\111\110\116\114\111\108\108\101\114"local p=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local A=game:GetService("\080\097\116\104\102\105\110\100\105\110\103\083\101\114\118\105\099\101")local G=game:GetService("\080\108\097\121\101\114\115")local W=game:GetService("\082\117\110\083\101\114\118\105\099\101")local Q=game:GetService("\068\101\098\114\105\115")local H=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local E=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local Y=G.LocalPlayer local g=Y.PlayerScripts local Z=script:FindFirstAncestor("\067\097\109\101\114\097\083\099\114\105\112\116")local P=nil if Z then P=require(Z:WaitForChild("\073\110\118\105\115\105\099\097\109"))end local t=script.Parent local q=require(t)local h=nil if q then local J=t:FindFirstChild("\084\111\117\099\104\074\117\109\112")if J then h=require(J)end end local I=true local N=workspace.FindPartOnRayWithIgnoreList local y=math.min local k=math.max local b=math.pi local u=math.atan2 local M=Vector3.new local K=Vector2.new local f=CFrame.new local a=nil local r=nil local C=M(1,0,1)local R=M(0,0,0)local z=K(0,0)local O=nil local m=nil if p.TouchEnabled then m=q:GetClickToMoveFailStateChanged()end


local DEBUG_NAME = "ClickToMoveController"

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 Player = PlayerService.LocalPlayer
local PlayerScripts = Player.PlayerScripts

local CameraScript = script:FindFirstAncestor("CameraScript")
local InvisicamModule = nil
if CameraScript then
	InvisicamModule = require(CameraScript:WaitForChild("Invisicam"))
end

local MasterControlModule = script.Parent
local MasterControl = require(MasterControlModule)
local TouchJump = nil
if MasterControl then
	local TouchJumpModule = MasterControlModule:FindFirstChild("TouchJump")
	if TouchJumpModule then
		TouchJump = require(TouchJumpModule)
	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 = MasterControl:GetClickToMoveFailStateChanged()
end
