He = 1004;
She = 1003;
BHe = 1008;
BShe = 1009;

function LevelComplete()
	
			
	
	flags = {};
	
	flags.glove_taken = true;	
	flags.rentgen_taken = true;
	flags.nvg_taken = true;
	flags.scaner_taken = true;
	flags.pointer_taken = true;
	flags.restore_sheet = false;
		if obj.chast1.is_stored then
		UnStoreObj(obj.chast1.id);
	else
		obj.chast1.is_stored = true;
	end;
		if obj.chast2.is_stored then
		UnStoreObj(obj.chast2.id);
	else
		obj.chast2.is_stored = true;
	end;
		if obj.chast3.is_stored then
		UnStoreObj(obj.chast3.id);
	else
		obj.chast3.is_stored = true;
	end;
		if obj.chast4.is_stored then
		UnStoreObj(obj.chast4.id);
	else
		obj.chast4.is_stored = true;
	end;
		if obj.chast5.is_stored then
		UnStoreObj(obj.chast5.id);
	else
		obj.chast5.is_stored = true;
	end;
	SaveGame1();
	delete_tree_leaf("Root","island");
	if gloveselect then	RotateToPos(2);	end;
	if nvgselect then	RotateToPos(3);	end;
	if rentgenselect then RotateToPos(1);		end;
	if scanerselect then	RotateToPos(0);		end;
	obj={}
	NextLevel(9);
	
end;
	flags.glove_taken = true;	
	flags.rentgen_taken = true;
	flags.nvg_taken = true;
	flags.scaner_taken = true;
flags.rentgen_taken=true;
dofile("script\\gamemenu.lua");
dofile("script\\lib.lua");

set_inpun_fun("gameinput");
scaner_is_usable=false
flags.sobrana= false;
flags["kyky"] = true;
flags["comics1"] = true;
flags["comics2"] = false;
flags["comics3"] = false;
flags["mini1"] = false;
flags["mini2"] = false;
flags.vlevo= true
flags.krab= false
flags["items"] = 0;
flags["items2"] = 0;
flags.items_collected = false;
flags["start_draw"] = true;
flags["first_time_load"] = true;
flags["sbor1"] = false;
flags["sbor2"] = false;
flags["sbor3"] = false;
flags["sbor4"] = false;
flags["sbor5"] = false;
flags.rentgen_is_usable= false;
rentgen_is_usable= true;
flags.lodka = false;
flags.use_rent=false;
flags.mini1_complete=false;
flags.mini=false;
flags.finish=false;

flags["edet"]=false
flags["priexal1"]=false
flags["priexal2"]=false
flags["priexal3"]=false
flags["priexal4"]=false
flags["priexal5"]=false


flags.light1=true;
flags.light=false;
flags.nv_done=true;
flags.nvg_block=false;


if flags.restore_sheet then
	LoadGame();
	AddTool();
end;
flags.restore_sheet = true;

AddTreeLeaf( "Root", "island", 8, 0 );
AddTxt();
dofile("./data/8/0/res.lua");
if flags.lodka and not flags.sobrana then
AddParticleToObject(214,"lodka");
MoveEmiter("lodka",349,246);
StartEmiter("lodka");
end;
flags.start_draw = true;
for name,o in pairs(obj) do
	if o.is_stored then
	SetObjectPosition(o.id,-1000,-1000)
	-- AddElement( sheet, obj[name].id );
	set_visible_object( o.id, true );
	end;
end

SetCurrentLeaf( "island", 8, 0 );
ShowMenu( false );
if flags.rentgen then
rentgen_is_usable=false;
end
StartAnimation( 5555555555,5,5 );
flags.start_draw = false;

-- playfile(".\\sound\\070.ogg",true,true);
playeffect("070",true)