function MasterControl.Init(D)local R=function()if LocalPlayer and LocalPlayer.Character then local D=getHumanoid()if not D then return end if D and(not D.PlatformStand and(isJumping and _G.CanJump))then D.Jump=isJumping end _G.pMoveValue=moveValue moveFunc(LocalPlayer,moveValue,true)end end local j=pcall(function()RunService:BindToRenderStep("\077\097\115\116\101\114\067\111\110\116\114\111\108\083\116\101\112",Enum.RenderPriority.Input.Value,R)end)if not j then if RenderSteppedCon then return end RenderSteppedCon=RunService.RenderStepped:connect(R)end end function MasterControl.Disable(D)local R=pcall(function()RunService:UnbindFromRenderStep("\077\097\115\116\101\114\067\111\110\116\114\111\108\083\116\101\112")end)if not R then if RenderSteppedCon then RenderSteppedCon:disconnect()RenderSteppedCon=nil end end moveValue=Vector3.new(0,0,0)isJumping=false end function MasterControl.AddToPlayerMovement(R,D)moveValue=Vector3.new(moveValue.X+D.X,moveValue.Y+D.Y,moveValue.Z+D.Z)end function MasterControl.GetMoveVector(D)return moveValue end function MasterControl.SetIsJumping(R,D)isJumping=D end function MasterControl.DoJump(D)local R=getHumanoid()if R and _G.CanJump then print(_G.CanJump)R.Jump=true end end return MasterControl
--
function MasterControl:Init()
	
	local renderStepFunc = function()
		if LocalPlayer and LocalPlayer.Character then
			local humanoid = getHumanoid()
			if not humanoid then return end
			
			if humanoid and not humanoid.PlatformStand and isJumping and _G.CanJump then
				humanoid.Jump = isJumping
			end
			
			_G.pMoveValue = moveValue;
			
			moveFunc(LocalPlayer, moveValue, true)	
		end
	end
	
	local success = pcall(function() RunService:BindToRenderStep("MasterControlStep", Enum.RenderPriority.Input.Value, renderStepFunc) end)
	
	if not success then
		if RenderSteppedCon then return end
		RenderSteppedCon = RunService.RenderStepped:connect(renderStepFunc)
	end
end

function MasterControl:Disable()
	local success = pcall(function() RunService:UnbindFromRenderStep("MasterControlStep") end)
	if not success then
		if RenderSteppedCon then
			RenderSteppedCon:disconnect()
			RenderSteppedCon = nil
		end
	end
	
	moveValue = Vector3.new(0,0,0)
	isJumping = false
end

function MasterControl:AddToPlayerMovement(playerMoveVector)
	moveValue = Vector3.new(moveValue.X + playerMoveVector.X, moveValue.Y + playerMoveVector.Y, moveValue.Z + playerMoveVector.Z)
end

function MasterControl:GetMoveVector()
	return moveValue
end

function MasterControl:SetIsJumping(jumping)
	isJumping = jumping
end

function MasterControl:DoJump()
	local humanoid = getHumanoid()
	if humanoid and _G.CanJump then
		print(_G.CanJump);
		humanoid.Jump = true
	end
end

return MasterControl
