function PlayerGame.onEnter(D,h,M,U,u)local R=h.player;(coroutine.wrap(function()local h=R.Character if not h or not h.PrimaryPart then R:LoadCharacter()h=R.Character or R.CharacterAdded:Wait()while not h.PrimaryPart do wait()end h:WaitForChild("\072\117\109\097\110\111\105\100")end if U~="\099\097\109\101\114\097"then onCharacterAdded(R,h)end local M=h:FindFirstChild("\072\117\109\097\110\111\105\100")M.WalkSpeed=16 local u=h.PrimaryPart connections.characterAdded=R.CharacterAdded:Connect(function(D)while not D.Parent or D:FindFirstChild("\072\117\109\097\110\111\105\100")do wait()end onCharacterAdded(R,D)end)while D.current=="\103\097\109\101"do if isMoving then local D=tick()MonsterManager.createInterestWhileTrue(u.Position,NOISE_GENERATED,function()return not isMoving or tick()<D+NOISE_TIMEOUT end)end wait(.25)end end))()end

function PlayerGame.onEnter(stateMachine, serverPlayer, event, from, to)
	local player = serverPlayer.player

	coroutine.wrap(
		function()
			local character = player.Character

			if not character or not character.PrimaryPart then
				player:LoadCharacter()
				character = player.Character or player.CharacterAdded:Wait()

				while not character.PrimaryPart do
					wait()
				end

				character:WaitForChild("Humanoid")
			end

			if from ~= "camera" then
				onCharacterAdded(player, character)
			end

			local humanoid = character:FindFirstChild("Humanoid")

			humanoid.WalkSpeed = 16

			local primaryPart = character.PrimaryPart

			connections.characterAdded =
				player.CharacterAdded:Connect(
				function(character)
					while not character.Parent or character:FindFirstChild("Humanoid") do
						wait()
					end

					onCharacterAdded(player, character)
				end
			)

			while stateMachine.current == "game" do
				if isMoving then
					local currentTick = tick()
					MonsterManager.createInterestWhileTrue(
						primaryPart.Position,
						NOISE_GENERATED,
						function()
							return not isMoving or tick() < currentTick + NOISE_TIMEOUT
						end
					)
				end
				wait(0.25)
			end
		end
	)()
end
