code:
:: School Toilets

<<set $outside to 0>><<set $location to "school">><<schooleffects>><<effects>>
You are in the antechamber outside the school toilets.

<<if $stress gte $stressmax>>
	<<link [[Everything fades to black...|School Passout]]>><</link>>
<<else>>
	<<maleicon>><<link [[Boys' toilets|School Boy's Toilets]]>><</link>>

	<<femaleicon>><<link [[Girls' toilets|School Girl's Toilets]]>><</link>>

	<<if $historytrait gte 2 and $schooldrainintro isnot 1>>
		<<link [[Secret tunnel to drain system (0:02)|School Drain]]>><<pass 2>><</link>>

	<<elseif $historytrait gte 2>>
		<<link [[Secret tunnel to drain system (0:02)|Commercial Drain]]>><<pass 2>><</link>>

	<</if>>
	<<if $brothel_basement_intro is 1>>
		<<if $promiscuity gte 55>>
			<<link [[Set up gloryhole in antechamber|School Gloryhole Start]]>><</link>><<promiscuous4>>

		<</if>>
	<</if>>
	<<link [[Leave the toilets (0:01)|Hallways]]>><<pass 1>><</link>>

<</if>>

:: School Toilets Hiss

<<set $outside to 0>><<set $location to "school">><<schooleffects>><<effects>>
You hiss at the <<beasttype>>. <<bHe>> backs away from you, <<bhis>> ears turned back. You stare at <<bhim>> and unleash your deepest meow. <<bHe>> growls back, but <<bhis>> face relaxes. <<bHe>> leaps onto the windowsill and disappears behind it.

<<if $bus is "boys">>
	<<link [[Next|School Boy's Toilets]]>><<endevent>><<set $eventskip to 1>><</link>>

<<else>>
	<<link [[Next|School Girl's Toilets]]>><<endevent>><<set $eventskip to 1>><</link>>

<</if>>

:: School Toilets Cat

<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>
	<<beastCombatInit>>
	<<set $enemytrust -= 40>>
	<<set $NPCList[0].stance to "top">><<set $head to "grappled">>
<</if>>
<<effects>>
<<effectsman>>

<<beast $enemyno>>

<<stateman>>

<<actionsman>>
<<if $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|School Toilets Cat Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next|School Toilets Cat Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|School Toilets Cat]]>><</link>><<nexttext>>
<</if>>

:: School Toilets Cat Finish

<<set $outside to 0>><<set $location to "town">><<effects>>
<<if $enemyarousal gte $enemyarousalmax>>
	<<beastejaculation>>
	The <<beasttype>> grunts in satisfaction, and leaps out the window, leaving you lying on the floor.

	<<tearful>> you rise to your feet.

	<<clotheson>>
	<<endcombat>>
	<<if $bus is "boys">>
		<<link [[Next|School Boy's Toilets]]>><<set $eventskip to 1>><</link>>

	<<else>>
		<<link [[Next|School Girl's Toilets]]>><<set $eventskip to 1>><</link>>

	<</if>>
<<elseif $enemyhealth lte 0>>
	The <<beasttype>> yelps and flees through the window.

	<<tearful>> you rise to your feet.

	<<clotheson>>
	<<endcombat>>
	<<if $bus is "boys">>
		<<link [[Next|School Boy's Toilets]]>><<set $eventskip to 1>><</link>>

	<<else>>
		<<link [[Next|School Girl's Toilets]]>><<set $eventskip to 1>><</link>>

	<</if>>
<</if>>

:: School Toilets Encounter

<<set $outside to 0>><<set $location to "school">><<schooleffects>><<effects>>
<<if $phase is 1>>
	You tell them you went into the wrong room by mistake, and apologise. You leave the room before you get in trouble.

	<<endevent>>
	<<link [[Next|School Toilets]]>><<set $eventskip to 1>><</link>>

<<elseif $phase is 2>>
	"Oh, I'm in the wrong room?" You walk up to the <<person1>><<person>>, as close as you can without touching <<him>>. "It's a good thing you're here. I should leave before someone takes advantage of my silliness."

	"N-no, it's fine," the <<person>> says, averting <<his>> eyes and blushing. "We'll get out of your way." They leave the room, though the <<person2>><<person>> has to be pulled along by <<his>> wrist.
	<<promiscuity1>>

	<<endevent>>
	<<link [[Next|School Toilets]]>><<set $eventskip to 1>><</link>>

<</if>>

:: School Toilets Sex

<<if $sexstart is 1>>
	<<set $sexstart to 0>>
	<<consensual>>
	<<set $consensual to 1>>
	<<neutral 1>>
	<<maninit>>
	<<set $enemytrust += 100>>
	You walk right up to the <<person>> and place your hand on <<his>> groin. "Silly me. I think I need to be punished, don't you?"
	<<promiscuity2>>

<</if>>
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<set $consensual to 0>>
	<<controlloss>>
	<<neutral 1>>
	<<maninit>>
	<<molested>>
	The stall door swings open, and the <<person1>><<person>> drags you out to where <<his>> friends await.

<</if>>
<<effects>>
<<effectsman>><<man>>
<<stateman>>

<<actionsman>>
<<if $finish is 1>>
	<<link [[Next|School Toilets Sex Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|School Toilets Sex Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next|School Toilets Sex Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|School Toilets Sex]]>><</link>><<nexttext>>
<</if>>

:: School Toilets Sex Finish

<<effects>>
<<if $finish is 1>>
	The <<person3>><<person>> doesn't look happy as the other two pull <<him>> away from you. <<tearful>> you wave them goodbye.

	<<clotheson>>
	<<endcombat>>
	<<if $bus is "boys">>
		<<link [[Next|School Boy's Toilets]]>><<set $eventskip to 1>><</link>>

	<<else>>
		<<link [[Next|School Girl's Toilets]]>><<set $eventskip to 1>><</link>>

	<</if>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>
	<<if $consensual is 1>>
		The three avoid eye contact with each other as they fix their clothing. <<tearful>> you wave them goodbye.

	<<else>>
		The <<person1>><<person>> shoves you against the ground, and the three of them leave you lying there. The sound of their laughter soon disappears. <<tearful>> you struggle to your feet.

	<</if>>
	<<clotheson>>
	<<endcombat>>
	<<if $bus is "boys">>
		<<link [[Next|School Boy's Toilets]]>><<set $eventskip to 1>><</link>>

	<<else>>
		<<link [[Next|School Girl's Toilets]]>><<set $eventskip to 1>><</link>>

	<</if>>
<<elseif $enemyhealth lte 0>>
	The three recoil in pain, giving you a chance to escape. <<tearful>> you flee from the room.

	<<clotheson>>
	<<endcombat>>
	<<link [[Next|School Toilets]]>><<set $eventskip to 1>><</link>>
<</if>>

:: School Toilets Clothes

<<set $outside to 0>><<set $location to "school">><<schooleffects>><<effects>>
<<if $phase is 1>>
	<<if $bus is "boys">>
		<<storeon "schoolboys" "delete">>
	<<else>>
		<<storeon "schoolgirls" "delete">>
	<</if>>
	You hear them leave the room, taking your clothes with them.

	<<endevent>>
	<<if $bus is "boys">>
		<<link [[Next|School Boy's Toilets]]>><<set $eventskip to 1>><</link>>

	<<else>>
		<<link [[Next|School Girl's Toilets]]>><<set $eventskip to 1>><</link>>

	<</if>>
<<elseif $phase is 2>>
	You call out. "Wait! Those are mine." The footsteps cease.

	<<if $player.gender_appearance is "f" and $bus is "boys">>
		The <<person1>><<person>> speaks. "Girls aren't allowed in here. Open the door."

		<<link [[Open it|School Toilets Sex]]>><<set $molestationstart to 1>><</link>>

		<<if $submissive lte 850>>
			<<link [[Demand|School Toilets Clothes]]>><<set $phase to 4>><</link>>

		<<else>>
			<<link [[Plead|School Toilets Clothes]]>><<set $phase to 5>><</link>>

		<</if>>
	<<elseif $player.gender_appearance is "m" and $bus is "girls">>
		The <<person1>><<person>> speaks. "Boys aren't allowed in here. Open the door."

		<<link [[Open it|School Toilets Sex]]>><<set $molestationstart to 1>><</link>>

		<<if $submissive lte 850>>
			<<link [[Demand|School Toilets Clothes]]>><<set $phase to 4>><</link>>

		<<else>>
			<<link [[Plead|School Toilets Clothes]]>><<set $phase to 5>><</link>>

		<</if>>
	<<else>>
		The <<person1>><<person>> speaks. "Oh? What will you do for us if we give them back?"

		<<if $promiscuity gte 15>>
			<<link [[Offer your body|School Toilets Sex]]>><<set $molestationstart to 1>><</link>>

		<</if>>
		<<if $money gte 1500>>
			<<link [[Offer money (£15)|School Toilets Clothes]]>><<set $money -= 1500>><<set $phase to 3>><</link>>

		<</if>>
		<<if $submissive lte 850>>
			<<link [[Demand|School Toilets Clothes]]>><<set $phase to 4>><</link>>

		<<else>>
			<<link [[Plead|School Toilets Clothes]]>><<set $phase to 5>><</link>>

		<</if>>
	<</if>>
<<elseif $phase is 3>>
	You slip some money under the door, and after a brief pause the <<person>> speaks again. "Nice. Okay, we'll leave them where we found them. Come on." You hear them leave the room.

	Once they're gone, you open the stall and peek out. Sure enough, your clothes are where you left them.

	<<endevent>>
	<<if $bus is "boys">>
		<<link [[Next|School Boy's Toilets]]>><<set $eventskip to 1>><</link>>

	<<else>>
		<<link [[Next|School Girl's Toilets]]>><<set $eventskip to 1>><</link>>

	<</if>>
<<elseif $phase is 4>>
	"Listen." you say. "Take my things and I'll find you and shove a rail spike up your worthless arseholes."

	Something in your tone affects them. "Calm down, you fucking psycho. We're just messing with you." Once they're gone you peek out the stall, and see your clothes safely where you left them.

	<<endevent>>
	<<if $bus is "boys">>
		<<link [[Next|School Boy's Toilets]]>><<set $eventskip to 1>><</link>>

	<<else>>
		<<link [[Next|School Girl's Toilets]]>><<set $eventskip to 1>><</link>>

	<</if>>
<<elseif $phase is 5>>
	You try to plead with them, but it's no use. "If you won't play ball," the <<person1>><<person>> says. "Why should we?" They laugh as they leave the room. You peek out the stall, and see an empty space where your clothes once were.
	<<if $bus is "boys">>
		<<storeon "schoolboys" "delete">>
	<<else>>
		<<storeon "schoolgirls" "delete">>
	<</if>>

	<<endevent>>
	<<if $bus is "boys">>
		<<link [[Next|School Boy's Toilets]]>><<set $eventskip to 1>><</link>>

	<<else>>
		<<link [[Next|School Girl's Toilets]]>><<set $eventskip to 1>><</link>>

	<</if>>
<</if>>

:: School Boy's Toilets

<<set $outside to 0>><<set $location to "school">><<schooleffects>><<effects>><<set $bus to "boys">>
You are in the boy's toilets.

<<if $stress gte $stressmax>>
	<<link [[Everything fades to black...|School Passout]]>><</link>>
<<else>>
	<<set $danger to random(1, 10000)>><<set $dangerevent to 0>>
	<<if $danger gte (9900 - $allure) and $eventskip isnot 1>>
		<<eventsschooltoilets>>
	<<else>>
		<<storeactions "schoolboys">>
		<<link [[Look in the mirror (0:02)|Simple Mirror]]>><<pass 2>><<set $previousPassage = $passage>><</link>>

		<<link [[Masturbate|School Boy's Toilets Masturbation]]>><<set $masturbationstart to 1>><</link>>

		<<if $player.bodyliquid.face.semen gte 1 or $player.bodyliquid.face.goo gte 1 or $skin.left_cheek.pen is "pen" or $skin.right_cheek.pen is "pen" or $skin.forehead.pen is "pen" or $skin.left_cheek.pen is "mud" or $skin.right_cheek.pen is "mud" or $skin.forehead.pen is "mud" or $skin.left_cheek.pen is "lipstick" or $skin.right_cheek.pen is "lipstick" or $skin.forehead.pen is "lipstick">>
			<<link [[Wash face (0:05)|School Boy's Wash]]>><<pass 5>><</link>>

		<</if>>
		<<if $player.bodyliquid.mouth.semen gte 1 or $player.bodyliquid.mouth.goo gte 1>>
		<<link [[Rinse mouth (0:05)|School Boy's Rinse]]>><<pass 5>><</link>>

		<</if>>
		<<pregnancyTest "School Boy's Toilets">>
		<<storeon "schoolboys" "check">>
		<<if _store_check isnot 1>>
			<<link [[Leave|Hallways]]>><</link>>
		<<elseif $exposed gte 2 and $exhibitionism gte 55>>
			<<link [[Sneak out|Hallways Sneak]]>><<set $phase to 2>><</link>><<exhibitionist4>>
		<<elseif $exposed is 1 and $exhibitionism gte 35>>
			<<link [[Sneak out|Hallways Sneak]]>><<set $phase to 1>><</link>><<exhibitionist3>>
		<<elseif $exposed lte 0>>
			<<link [[Leave|Hallways]]>><</link>>
		<</if>>
	<</if>>
<</if>>
<<set $eventskip to 0>>
<<storecleanup>>

:: School Girl's Toilets

<<set $outside to 0>><<set $location to "school">><<schooleffects>><<effects>><<set $bus to "girls">>
You are in the girl's toilets.

<<if $stress gte $stressmax>>
	<<link [[Everything fades to black...|School Passout]]>><</link>>
<<else>>
	<<set $danger to random(1, 10000)>><<set $dangerevent to 0>>
	<<if $danger gte (9900 - $allure) and $eventskip isnot 1>>
		<<eventsschooltoilets>>
	<<else>>
		<<storeactions "schoolgirls">>
		<<link [[Look in the mirror (0:02)|Simple Mirror]]>><<pass 2>><<set $previousPassage = $passage>><</link>>

		<<link [[Masturbate|School Girl's Toilets Masturbation]]>><<set $masturbationstart to 1>><</link>>

		<<if $player.bodyliquid.face.semen gte 1 or $player.bodyliquid.face.goo gte 1 or $skin.left_cheek.pen is "pen" or $skin.right_cheek.pen is "pen" or $skin.forehead.pen is "pen" or $skin.left_cheek.pen is "mud" or $skin.right_cheek.pen is "mud" or $skin.forehead.pen is "mud" or $skin.left_cheek.pen is "lipstick" or $skin.right_cheek.pen is "lipstick" or $skin.forehead.pen is "lipstick">>
			<<link [[Wash face (0:05)|School Girl's Wash]]>><<pass 5>><</link>>

		<</if>>
		<<if $player.bodyliquid.mouth.semen gte 1 or $player.bodyliquid.mouth.goo gte 1>>
		<<link [[Rinse mouth (0:05)|School Girl's Rinse]]>><<pass 5>><</link>>

		<</if>>
		<<pregnancyTest "School Girl's Toilets">>
		<<storeon "schoolgirls" "check">>
		<<if _store_check isnot 1>>
			<<link [[Leave|Hallways]]>><</link>>
		<<elseif $exposed gte 2 and $exhibitionism gte 55>>
			<<link [[Sneak out|Hallways Sneak]]>><<set $phase to 2>><</link>><<exhibitionist4>>
		<<elseif $exposed is 1 and $exhibitionism gte 35>>
			<<link [[Sneak out|Hallways Sneak]]>><<set $phase to 1>><</link>><<exhibitionist3>>
		<<elseif $exposed lte 0>>
			<<link [[Leave|Hallways]]>><</link>>
		<</if>>
	<</if>>
<</if>>
<<set $eventskip to 0>>
<<storecleanup>>

:: School Boy's Wash

<<effects>>
<<if $player.bodyliquid.face.semen gte 1 or $player.bodyliquid.face.goo gte 1>>
	<<if $skin.left_cheek.pen is "pen" or $skin.right_cheek.pen is "pen" or $skin.forehead.pen is "pen">>
		Bending over the sink, you wash the lewd fluid and ink from your face.
	<<elseif $skin.left_cheek.pen is "lipstick" or $skin.right_cheek.pen is "lipstick" or $skin.forehead.pen is "lipstick">>
		Bending over the sink, you wash the lewd fluid and lipstick from your face.
	<<elseif $skin.left_cheek.pen is "mud" or $skin.right_cheek.pen is "mud" or $skin.forehead.pen is "mud">>
		Bending over the sink, you wash the lewd fluid and mud from your face.
	<<else>>
		Bending over the sink, you wash the lewd fluid from your face.
	<</if>>
<<elseif $skin.left_cheek.pen is "lipstick" or $skin.right_cheek.pen is "lipstick" or $skin.forehead.pen is "lipstick">>
	Bending over the sink, you wash the lipstick from your face.
<<elseif $skin.left_cheek.pen is "mud" or $skin.right_cheek.pen is "mud" or $skin.forehead.pen is "mud">>
	Bending over the sink, you wash the mud from your face.
<<else>>
	Bending over the sink, you wash the ink from your face.
<</if>>
<<wash_face>>

<<link [[Next|School Boy's Toilets]]>><</link>>

:: School Girl's Wash

<<effects>>
<<if $player.bodyliquid.face.semen gte 1 or $player.bodyliquid.face.goo gte 1>>
	<<if $skin.left_cheek.pen is "pen" or $skin.right_cheek.pen is "pen" or $skin.forehead.pen is "pen">>
		Bending over the sink, you wash the lewd fluid and ink from your face.
	<<elseif $skin.left_cheek.pen is "lipstick" or $skin.right_cheek.pen is "lipstick" or $skin.forehead.pen is "lipstick">>
		Bending over the sink, you wash the lewd fluid and lipstick from your face.
	<<elseif $skin.left_cheek.pen is "mud" or $skin.right_cheek.pen is "mud" or $skin.forehead.pen is "mud">>
		Bending over the sink, you wash the lewd fluid and mud from your face.
	<<else>>
		Bending over the sink, you wash the lewd fluid from your face.
	<</if>>
<<elseif $skin.left_cheek.pen is "lipstick" or $skin.right_cheek.pen is "lipstick" or $skin.forehead.pen is "lipstick">>
	Bending over the sink, you wash the lipstick from your face.
<<elseif $skin.left_cheek.pen is "mud" or $skin.right_cheek.pen is "mud" or $skin.forehead.pen is "mud">>
	Bending over the sink, you wash the mud from your face.
<<else>>
	Bending over the sink, you wash the ink from your face.
<</if>>
<<wash_face>>

<<link [[Next|School Girl's Toilets]]>><</link>>

:: School Boy's Rinse
<<effects>>

You bend over the sink and rinse out your mouth.

<<wash_mouth>>

<<link [[Next|School Boy's Toilets]]>><</link>>

:: School Girl's Rinse
<<effects>>

You bend over the sink and rinse out your mouth.

<<wash_mouth>>

<<link [[Next|School Girl's Toilets]]>><</link>>