local q=require(script.Parent:WaitForChild("\066\097\115\101\067\104\097\114\097\099\116\101\114\067\111\110\116\114\111\108\108\101\114"))local f=setmetatable({},q)f.__index=f function f.new(P)local C=setmetatable(q.new(),f)C.CONTROL_ACTION_PRIORITY=P C.textFocusReleasedConn=nil C.textFocusGainedConn=nil C.windowFocusReleasedConn=nil C.forwardValue=0 C.backwardValue=0 C.leftValue=0 C.rightValue=0 C.jumpEnabled=true return C end local P=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local C=Vector3.new(0,0,0)function f.Enable(q,f)if not P.KeyboardEnabled then return false end if f==q.enabled then return true end q.forwardValue=0 q.backwardValue=0 q.leftValue=0 q.rightValue=0 q.moveVector=C q.jumpRequested=false q:UpdateJump()if f then q:BindContextActions()q:ConnectFocusEventListeners()else q:UnbindContextActions()q:DisconnectFocusEventListeners()end q.enabled=f return true end function f.UpdateMovement(q,f)if f==Enum.UserInputState.Cancel then q.moveVector=C return end q.moveVector=Vector3.new(q.leftValue+q.rightValue,0,q.forwardValue+q.backwardValue)end function f.UpdateJump(q)q.isJumping=q.jumpRequested end local m=game:GetService("\067\111\110\116\101\120\116\065\099\116\105\111\110\083\101\114\118\105\099\101")function f.BindContextActions(q)m:BindActionAtPriority("\109\111\118\101\070\111\114\119\097\114\100\065\099\116\105\111\110",function(f,P,C)if P==Enum.UserInputState.Begin then local q=-1 else v4=0 end q.forwardValue=v4 q:UpdateMovement(P)return Enum.ContextActionResult.Pass end,false,q.CONTROL_ACTION_PRIORITY,Enum.PlayerActions.CharacterForward)m:BindActionAtPriority("\109\111\118\101\066\097\099\107\119\097\114\100\065\099\116\105\111\110",function(f,P,C)if P==Enum.UserInputState.Begin then local q=1 else v5=0 end q.backwardValue=v5 q:UpdateMovement(P)return Enum.ContextActionResult.Pass end,false,q.CONTROL_ACTION_PRIORITY,Enum.PlayerActions.CharacterBackward)m:BindActionAtPriority("\109\111\118\101\076\101\102\116\065\099\116\105\111\110",function(f,P,C)if P==Enum.UserInputState.Begin then local q=-1 else v6=0 end q.leftValue=v6 q:UpdateMovement(P)return Enum.ContextActionResult.Pass end,false,q.CONTROL_ACTION_PRIORITY,Enum.PlayerActions.CharacterLeft)m:BindActionAtPriority("\109\111\118\101\082\105\103\104\116\065\099\116\105\111\110",function(f,P,C)if P==Enum.UserInputState.Begin then local q=1 else v7=0 end q.rightValue=v7 q:UpdateMovement(P)return Enum.ContextActionResult.Pass end,false,q.CONTROL_ACTION_PRIORITY,Enum.PlayerActions.CharacterRight)m:BindActionAtPriority("\106\117\109\112\065\099\116\105\111\110",function(f,P,C)local m=q.jumpEnabled and P==Enum.UserInputState.Begin q.jumpRequested=m q:UpdateJump()return Enum.ContextActionResult.Pass end,false,q.CONTROL_ACTION_PRIORITY,Enum.PlayerActions.CharacterJump)end function f.UnbindContextActions(q)m:UnbindAction("\109\111\118\101\070\111\114\119\097\114\100\065\099\116\105\111\110")m:UnbindAction("\109\111\118\101\066\097\099\107\119\097\114\100\065\099\116\105\111\110")m:UnbindAction("\109\111\118\101\076\101\102\116\065\099\116\105\111\110")m:UnbindAction("\109\111\118\101\082\105\103\104\116\065\099\116\105\111\110")m:UnbindAction("\106\117\109\112\065\099\116\105\111\110")end function f.ConnectFocusEventListeners(q)local function f()q.moveVector=C q.forwardValue=0 q.backwardValue=0 q.leftValue=0 q.rightValue=0 q.jumpRequested=false q:UpdateJump()end q.textFocusReleasedConn=P.TextBoxFocusReleased:Connect(f)q.textFocusGainedConn=P.TextBoxFocused:Connect(function(f)q.jumpRequested=false q:UpdateJump()end)q.windowFocusReleasedConn=P.WindowFocused:Connect(f)end function f.DisconnectFocusEventListeners(q)if q.textFocusReleasedConn then q.textFocusReleasedConn:Disconnect()q.textFocusReleasedConn=nil end if q.textFocusGainedConn then q.textFocusGainedConn:Disconnect()q.textFocusGainedConn=nil end if q.windowFocusReleasedConn then q.windowFocusReleasedConn:Disconnect()q.windowFocusReleasedConn=nil end end return f
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(script.Parent:WaitForChild("BaseCharacterController"))
local v2 = setmetatable({}, v1)
v2.__index = v2
function v2.new(p1)
	local v3 = setmetatable(v1.new(), v2)
	v3.CONTROL_ACTION_PRIORITY = p1
	v3.textFocusReleasedConn = nil
	v3.textFocusGainedConn = nil
	v3.windowFocusReleasedConn = nil
	v3.forwardValue = 0
	v3.backwardValue = 0
	v3.leftValue = 0
	v3.rightValue = 0
	v3.jumpEnabled = true
	return v3
end
local l__UserInputService__1 = game:GetService("UserInputService")
local u2 = Vector3.new(0, 0, 0)
function v2.Enable(p2, p3)
	if not l__UserInputService__1.KeyboardEnabled then
		return false
	end
	if p3 == p2.enabled then
		return true
	end
	p2.forwardValue = 0
	p2.backwardValue = 0
	p2.leftValue = 0
	p2.rightValue = 0
	p2.moveVector = u2
	p2.jumpRequested = false
	p2:UpdateJump()
	if p3 then
		p2:BindContextActions()
		p2:ConnectFocusEventListeners()
	else
		p2:UnbindContextActions()
		p2:DisconnectFocusEventListeners()
	end
	p2.enabled = p3
	return true
end
function v2.UpdateMovement(p4, p5)
	if p5 == Enum.UserInputState.Cancel then
		p4.moveVector = u2
		return
	end
	p4.moveVector = Vector3.new(p4.leftValue + p4.rightValue, 0, p4.forwardValue + p4.backwardValue)
end
function v2.UpdateJump(p6)
	p6.isJumping = p6.jumpRequested
end
local l__ContextActionService__3 = game:GetService("ContextActionService")
function v2.BindContextActions(p7)
	l__ContextActionService__3:BindActionAtPriority("moveForwardAction", function(p8, p9, p10)
		if p9 == Enum.UserInputState.Begin then
			local v4 = -1
		else
			v4 = 0
		end
		p7.forwardValue = v4
		p7:UpdateMovement(p9)
		return Enum.ContextActionResult.Pass
	end, false, p7.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterForward)
	l__ContextActionService__3:BindActionAtPriority("moveBackwardAction", function(p11, p12, p13)
		if p12 == Enum.UserInputState.Begin then
			local v5 = 1
		else
			v5 = 0
		end
		p7.backwardValue = v5
		p7:UpdateMovement(p12)
		return Enum.ContextActionResult.Pass
	end, false, p7.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterBackward)
	l__ContextActionService__3:BindActionAtPriority("moveLeftAction", function(p14, p15, p16)
		if p15 == Enum.UserInputState.Begin then
			local v6 = -1
		else
			v6 = 0
		end
		p7.leftValue = v6
		p7:UpdateMovement(p15)
		return Enum.ContextActionResult.Pass
	end, false, p7.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterLeft)
	l__ContextActionService__3:BindActionAtPriority("moveRightAction", function(p17, p18, p19)
		if p18 == Enum.UserInputState.Begin then
			local v7 = 1
		else
			v7 = 0
		end
		p7.rightValue = v7
		p7:UpdateMovement(p18)
		return Enum.ContextActionResult.Pass
	end, false, p7.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterRight)
	l__ContextActionService__3:BindActionAtPriority("jumpAction", function(p20, p21, p22)
		local v8 = p7.jumpEnabled and p21 == Enum.UserInputState.Begin
		p7.jumpRequested = v8
		p7:UpdateJump()
		return Enum.ContextActionResult.Pass
	end, false, p7.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterJump)
end
function v2.UnbindContextActions(p23)
	l__ContextActionService__3:UnbindAction("moveForwardAction")
	l__ContextActionService__3:UnbindAction("moveBackwardAction")
	l__ContextActionService__3:UnbindAction("moveLeftAction")
	l__ContextActionService__3:UnbindAction("moveRightAction")
	l__ContextActionService__3:UnbindAction("jumpAction")
end
function v2.ConnectFocusEventListeners(p24)
	local function v9()
		p24.moveVector = u2
		p24.forwardValue = 0
		p24.backwardValue = 0
		p24.leftValue = 0
		p24.rightValue = 0
		p24.jumpRequested = false
		p24:UpdateJump()
	end
	p24.textFocusReleasedConn = l__UserInputService__1.TextBoxFocusReleased:Connect(v9)
	p24.textFocusGainedConn = l__UserInputService__1.TextBoxFocused:Connect(function(p25)
		p24.jumpRequested = false
		p24:UpdateJump()
	end)
	p24.windowFocusReleasedConn = l__UserInputService__1.WindowFocused:Connect(v9)
end
function v2.DisconnectFocusEventListeners(p26)
	if p26.textFocusReleasedConn then
		p26.textFocusReleasedConn:Disconnect()
		p26.textFocusReleasedConn = nil
	end
	if p26.textFocusGainedConn then
		p26.textFocusGainedConn:Disconnect()
		p26.textFocusGainedConn = nil
	end
	if p26.windowFocusReleasedConn then
		p26.windowFocusReleasedConn:Disconnect()
		p26.windowFocusReleasedConn = nil
	end
end
return v2
