local dialogue = {
	KITTY1 = {
		[1] = {
			dialoguetext = "Haiii!!! Welcome to Project Of The Future lab!!! We hope you enjoy your stay!!!! :333",
			sound = sfx_hdial
		},
		[2] = {
			dialoguetext = "(Remember to rate us 5 stars on the way out pls........ :<)",
			sound = sfx_hdial
		}
	},
	KITTY2 = {
		[1] = {
			dialoguetext = "Are you from health inspection... Or are you Project's friend... You do look friend shaped..........",
			sound = sfx_hdial
		},
		[2] = {
			dialoguetext = "Welcome!!! You have access to the entirety of the lab grounds!!! Be sure to check out the cool stuff we have here!... :333",
			sound = sfx_hdial
		},
		[3] = {
			dialoguetext = "Uhh... Mr? Ms??? My friend will visit me at 3. Remember to authorize them for full trust access!",
			sound = sfx_hdial
		},
		[4] = {
			dialoguetext = "That's a long name you have here... u.u",
			sound = sfx_hdial
		}
	},
	SUSIECYBER = {
		[1] = {
			dialoguetext = " Wow Swift, you're almost done with your training... I'm so proud of you!!!!~...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[2] = {
			dialoguetext = "In this section you'll learn how to use your wings to reach new heights...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[3] = {
			dialoguetext = "To start the \x82 Charged \x82Wing Jump, \x80 you have to press and hold \x82 Custom1 while grounded...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[4] = {
			dialoguetext = "The longer you charge, the higher you'll fly up...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[5] = {
			dialoguetext = "When fully charged, you'll start seeping with power,",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[6] = {
			dialoguetext = "which will send you high up and also let you destroy cellings...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[7] = {
			dialoguetext = "And be sure to plan ahead how you start charging, you won't stop on a dime,",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[8] = {
			dialoguetext = "so be sure to use it to your advantage if you can manage to...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[9] = {
			dialoguetext = "And for last. A full charge goes well with your gliding!...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[10] = {
			dialoguetext = "You can use it to hold on to your vertical speed for just a bit longer...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[11] = {
			dialoguetext = "And... like... remember to be careful!...",
			sound = sfx_ssdial,
			sprite = "SUSIBLU"
		},
	},
	ASHLEYCYBER = {
		[1] = {
			dialoguetext = "Took you long enough... But I probably should be glad that you even made it here...",
			sound = sfx_adial,
			sprite = "ASHLTALK"
		},
		[2] = {
			dialoguetext = "Well at least now things will FINALLY get intresting. But before that...",
			sound = sfx_adial,
			sprite = "ASHLJOY"
		},
		[3] = {
			dialoguetext = "This section tests your movement and combat abilities through the \x85tail dash.",
			sound = sfx_adial,
			sprite = "ASHLREAD"
		},
		[4] = {
			dialoguetext = "Press \x85spin\x80 when grounded to leap forwards with huge speed and strength.",
			sound = sfx_adial,
			sprite = "ASHLREAD"
		},
		[5] = {
			dialoguetext = "The more you tail dash, the faster you'll leap.",
			sound = sfx_adial,
			sprite = "ASHLREAD"
		},
		[6] = {
			dialoguetext = "It also makes you able to redirect all of your speed towards any punk you want to trash.",
			sound = sfx_adial,
			sprite = "ASHLJOY"
		},
		[7] = {
			dialoguetext = "And heck, you might even be able to face danger head on if you're brave enough...",
			sound = sfx_adial,
			sprite = "ASHLJOY"
		},
		[8] = {
			dialoguetext = "Wooah... It's so cool seeing you so passionate about fighting!",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		},
		[9] = {
			dialoguetext = "Yeah, yeah... I better inspired you because I STILL don't want to be here...",
			sound = sfx_adial,
			sprite = "ASHLMAD"
		},
		[10] = {
			dialoguetext = "So like... do your best I guess... And make it fast.",
			sound = sfx_adial,
			sprite = "ASHLMAD"
		},
	},
	VRINFO1 = {
		[1] = {
			dialoguetext = "Swift compared to other characters has a light fading momentum. Letting her keep her speed when running for a short while.",
		},
		[2] = {
			dialoguetext = "Be sure to minimaze contact with ground to keep the most of your speed!",
		},
		[3] = {
			dialoguetext = "Swift also has a menu with several tweaks. Accesed with the command \x82''swiftmenu''",
		},
		[4] = {
			dialoguetext = "Remember that this tutorial is purely made around the glide ability!",
		},
		[5] = {
			dialoguetext = "She also has a stronger jump compared to others and can make a sharper turns without losing her speed.",
		},
		[6] = {
			dialoguetext = "And if you're running, you can glide above the surface of the water!",
		},
		[7] = {
			dialoguetext = "Uhh... What? I mean good to know I think!!!",
			sound = sfx_sdial,
			sprite = "SWIFTALK"
		},
		[8] = {
			dialoguetext = "(I think I need to ask Project about this later...)",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		}
	},
	VRINFO2 = {
		[1] = {
			dialoguetext = "\x84Glide\x80 is Swift's main ability. You can use it to cross large gaps and skips huge parts of terrain with ease.",
		},
		[2] = {
			dialoguetext = "But it has two drawbacks. Stamina and wall bonk.",
		},
		[3] = {
			dialoguetext = "When your stamina is running out Swift will start to sweat, and then start flapping her arms. After that she will fall.",
		},
		[4] = {
			dialoguetext = "Though you can regain your stamina mid-air by damaging enemies.",
		},
		[5] = {
			dialoguetext = "If you glide into a wall Swift will bounce off of it being unable to glide again until touching the ground.",
		},
		[6] = {
			dialoguetext = "After a moment of falling Swift will be able to restart gliding one last time.",
		},
		[7] = {
			dialoguetext = "You also can enter a slide upon gliding on ground and holding the jump button.",
		},
		[8] = {
			dialoguetext = "In this state Swift can slide under spin-gaps, gain speed off slopes and damage objects.",
		},
		[9] = {
			dialoguetext = "But it comes for a cost of steering control and depleting speed.",
		},
		[10] = {
			dialoguetext = "Who even writes these!???!!? And how they know so much about me?????",
			sound = sfx_sdial,
			sprite = "SWIFSTR"
		},
		[11] = {
			dialoguetext = "Is it UNKNOWN?... I'll ask her about these...",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		}
	},
	VRINFO3 = {
		[1] = {
			dialoguetext = "Tail dash is Swift's second ability and her main way of gaining speed. Being her own version of Sonic's thok.",
		},
		[2] = {
			dialoguetext = "If you're above running speed every next dash will add up to your current speed, otherwise it gets you to your running speed.",
		},
		[3] = {
			dialoguetext = "Swift's whole momentum will get redirected towards the camera upon usage.",
		},
		[4] = {
			dialoguetext = "Though you can change it to use Swift's current direction of movement in the \x82''swiftmenu''",
		},
		[5] = {
			dialoguetext = "While in the tail dash state Swift is able to destroy walls and destroyable objects.",
		},
		[6] = {
			dialoguetext = "But certain spiky hazards can be ''parried'' negating the damage, but still throwing you off upon impact.",
		},
		[7] = {
			dialoguetext = "What even IS that \x82''Swift menu''\x80 Is it like part of the training?...",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[8] = {
			dialoguetext = "Can they like... modify me through this place?...",
			sound = sfx_sdial,
			sprite = "SWIFSTR"
		},
	},
	VRINFO4 = {
		[1] = {
			dialoguetext = "Fire ball is..........",
		},
		[2] = {
			dialoguetext = "Blehhh!!!! Who even needs those!!! You'll figure it out yourself!!!",
			sound = sfx_udial,
			sprite = "UNKNJOY"
		},
	},
	UNKNOWNCYBER = {
		[1] = {
			dialoguetext = "Congrats!!! You're almost done with your training!!!",
			sound = sfx_udial,
			sprite = "UNKNJOY"
		},
		[2] = {
			dialoguetext = "Well, BARELY! What were those ''tweaks'' What's up with all info things about me...",
			sound = sfx_sdial,
			sprite = "SWIFMAD"
		},
		[3] = {
			dialoguetext = "AND!!! WHAT!!! IS!!! *\x82''\swiftmenu''!!!",
			sound = sfx_sdial,
			sprite = "SWIFMAD"
		},
		[4] = {
			dialoguetext = "And like... How are you here physically???",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[5] = {
			dialoguetext = "Too many questions! You won't even comprehend half of the stuff even if I did told you~",
			sound = sfx_udial,
			sprite = "UNKNSMU"
		},
		[6] = {
			dialoguetext = "You're just an ''all powerful reality bending being'' or whatever.. That's it right?...",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[7] = {
			dialoguetext = "Yup!!! That's it!!!",
			sound = sfx_udial,
			sprite = "UNKNJOY"
		},
		[8] = {
			dialoguetext = "Anyway... For the main thing... Let me just see...",
			sound = sfx_udial,
			sprite = "UNKNTALK"
		},
		[9] = {
			dialoguetext = "(Bleh, bleh, bleh... Wow what dumbass coded that moveset... It's a miracle it even works...)",
			sound = sfx_udial,
			sprite = "UNKNTALK"
		},
		[10] = {
			dialoguetext = "Okay so!!! \x88 Fireball \x80 is a move that you can activate anywhere by pressing \x88 custom2...",
			sound = sfx_udial,
			sprite = "UNKNJOY"
		},
		[11] = {
			dialoguetext = "It spawns a mario fireball that has a custom damage system...",
			sound = sfx_udial,
			sprite = "UNKNTALK"
		},
		[12] = {
			dialoguetext = "For enemies it takes 2 hits to defeat and 3 hits to damage a boss... :3",
			sound = sfx_udial,
			sprite = "UNKNTALK"
		},
		[13] = {
			dialoguetext = "And when you're super it looks like you're pissing fire!!!!!!!!! xDDDDDD",
			sound = sfx_udial,
			sprite = "UNKNJOY"
		},
		[14] = {
			dialoguetext = " ",
			sound = sfx_sdial,
			sprite = "SWIFDRED"
		},
		[15] = {
			dialoguetext = "Okay.",
			sound = sfx_sdial,
			sprite = "SWIFDRED"
		},
	},
	CATDUO = {
		[1] = {
			dialoguetext = "Hiyyaaa Swift!!!! (again) :3 How's your training going??? I'm assuming it's doing great!!!! ^w^",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[2] = {
			dialoguetext = "Anyways... From what I remember... this section will test your \x84gliding!!!!",
			sound = sfx_cdial,
			sprite = "CATTTALK"
		},
		[3] = {
			dialoguetext = "Just \x84jump\x80... And \x84jump\x80 again! And spread your cool wings!!! :3",
			sound = sfx_cdial,
			sprite = "CATTTALK"
		},
		[4] = {
			dialoguetext = "Btw, Swifty... u can glide only a for a bit before falling... :V",
			sound = sfx_mdial,
			sprite = "MOXXTALK"
		},
		[5] = {
			dialoguetext = "So, watch out for that!!!!! O_o (or not... >_>)",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
		[6] = {
			dialoguetext = "and be careful to not fly into walls!!!! you will bonk on them...",
			sound = sfx_mdial,
			sprite = "MOXXSAD"
		},
		[7] = {
			dialoguetext = "You can recover though!!! But still be careful, treat it as the last chance!",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[8] = {
			dialoguetext = "And you probably can slide under gaps when you start gliding on ground...",
			sound = sfx_cdial,
			sprite = "CATTNER"
		},
		[9] = {
			dialoguetext = "That's all I think! Go get it sis!!!! x3 Bai!!!!",
			sound = sfx_cdial,
			sprite = "CATTTALK"
		},
		[10] = {
			dialoguetext = "Bai!!!!!!!",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		},
		[11] = {
			dialoguetext = "BaiBaiBaiBaiBaiBai!!!!!! Swift!11!111!!11!!11!!",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
	},
	PROJECTVR = {
		[1] = {
			dialoguetext = "Okay. So for a quick warm up... A short and simple parkour track!",
			sound = sfx_pdial,
			sprite = "PROJTALK"
		},
		[2] = {
			dialoguetext = "And before I forget. I left some info holograms around the training ground for tips and fun-facts!",
			sound = sfx_pdial,
			sprite = "PROJJOY"
		}
	},
	VRINTRO = {
		[1] = {
			dialoguetext = "Impressive right?... I spent months working on this...",
			sound = sfx_pdial,
			sprite = "PROJJOY"
		},
		[2] = {
			dialoguetext = "I mean, welcome to your training!",
			sound = sfx_pdial,
			sprite = "PROJSIDE"
		},
		[3] = {
			dialoguetext = "Here you can't get physically harmed and don't be afraid about falling off course!",
			sound = sfx_pdial,
			sprite = "PROJTALK"
		},
		[4] = {
			dialoguetext = "You'll be simply teleported right to the start of the section.",
			sound = sfx_pdial,
			sprite = "PROJJOY"
		},
		[5] = {
			dialoguetext = "And if you didn't notice already... I'm here too!",
			sound = sfx_pdial,
			sprite = "PROJTALK"
		},
		[6] = {
			dialoguetext = "Well, sort of. We can partily join the training in form of holograms.",
			sound = sfx_pdial,
			sprite = "PROJSIDE"
		},
		[7] = {
			dialoguetext = "So if you ever need some help then give us a talk!",
			sound = sfx_pdial,
			sprite = "PROJJOY"
		},
		[8] = {
			dialoguetext = "And yes, your other friends are here as well!",
			sound = sfx_pdial,
			sprite = "PROJTALK"
		},
		[9] = {
			dialoguetext = "(I just hope that they remember what to say...)",
			sound = sfx_pdial,
			sprite = "PROJSIDE"
		}
	},
	ROSEY = {
		[1] = {
			dialoguetext = "Hiya, Miss Swift!!! I see y0u g0tten Master's message for c0ming 0ver here f0r training? :3",
			sound = sfx_rdial,
			sprite = "ROSYTALK"
		},
		[2] = {
			dialoguetext = "Yep! and I-",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		},
		[3] = {
			dialoguetext = "Wait... Master? you meant Project, right?",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[4] = {
			dialoguetext = "Of c0urse, silly!!! :3",
			sound = sfx_rdial,
			sprite = "ROSYJOY"
		},
		[5] = {
			dialoguetext = "(jeez, I thought Project said to me, that he will ''patch'' that out soon)",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[6] = {
			dialoguetext = "Anyways... Are you going to be helping with this training thing...",
			sound = sfx_sdial,
			sprite = "SWIFTALK"
		},
		[7] = {
			dialoguetext = "Yep!!! Me and Mas- I mean, Pr0ject!!! ^w^",
			sound = sfx_rdial,
			sprite = "ROSYJOY"
		},
		[8] = {
			dialoguetext = "...",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[9] = {
			dialoguetext = "Well, I guess I be seeing u around!!!",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		}
	},
	MOXXIECATTY = {
		[1] = {
			dialoguetext = "HAIIIIIII CATTY!!!!! X3333",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
		[2] = {
			dialoguetext = "HIIIIII MOXXIE!!!! :3333",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[3] = {
			dialoguetext = "w0wz....i c3nt belivaz therez 2 of u!!!! O_o",
			sound = sfx_mdial,
			sprite = "MOXXTALK"
		},
		[4] = {
			dialoguetext = "Yeah... I can't believe it as well!!!",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[5] = {
			dialoguetext = "Maybe Project has been cloning again...",
			sound = sfx_cdial,
			sprite = "CATTNER"
		},
		[6] = {
			dialoguetext = "cl0nin??!? O_o w0wz!!!! thatz me3nz hes c3n cl0nes me as w3ll!!!! XP",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
		[7] = {
			dialoguetext = "ill w3ants 2 0f mez!!! anz...I als0 w3nn3 be beeg!!!... >:3",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
		[8] = {
			dialoguetext = "Well...",
			sound = sfx_cdial,
			sprite = "CATTNER"
		},
		[9] = {
			dialoguetext = "Maybe, how about you ask him that!!! Surely, he will say yes!!!",
			sound = sfx_cdial,
			sprite = "CATTTALK"
		},
		[10] = {
			dialoguetext = "truez!!!!...andz if he3 d0nts... 1 willz p3lls 0uts my CH3INS3W!!1!...t0 te3ch hamz a less0n!!!! >:3",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
		[11] = {
			dialoguetext = "Uhhh... well, maybe don't do that... :3",
			sound = sfx_cdial,
			sprite = "CATTNER"
		},
		[12] = {
			dialoguetext = "0ks!!! :3c wh3tzever u s3idz Cattyz!!!1 X3",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		}
	},
	MOXXIESWIFT = {
		[1] = {
			dialoguetext = "OMG HAAAAAAAAAAIIII SWIFTY!!!!!!!! X33333",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
		[2] = {
			dialoguetext = "Hi... Moxxie. Catty said she brought you here. (for some reason...)",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[3] = {
			dialoguetext = "YEPYEPYEP...1 w3annat c0mez 3nd sea u tr3in!!!! U beeg drag0zn!!! :3c",
			sound = sfx_mdial,
			sprite = "MOXXTALK"
		},
		[4] = {
			dialoguetext = "Well, I guess... thanks for this?",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[5] = {
			dialoguetext = "YW!!!!11!!1! X3 likez OMG...its g0ing t0 b3 S0 MUCH FUNZ!!!... watchig be st0rg andz stuff!!1!1! ^w^",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
		[6] = {
			dialoguetext = "Yeah, It sure will...",
			sound = sfx_sdial,
			sprite = "SWIFTALK"
		},
		[7] = {
			dialoguetext = "Anyways, do you know who set up all these art of me around here... (They even got Catty here...)",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[8] = {
			dialoguetext = "NOPEZ!!!!...l00kz vera weriddd th0... o_O",
			sound = sfx_mdial,
			sprite = "MOXXTALK"
		},
		[9] = {
			dialoguetext = "BUTZ.... WHYZ 1 IM N0T HERE!!1!1! >:[  I'M C00L!!! Likez VE3Y C00L C00L!!!1!...likez Y0U!!! ;3",
			sound = sfx_mdial,
			sprite = "MOXXSAD"
		},
		[10] = {
			dialoguetext = "I guess, the people like m-",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[11] = {
			dialoguetext = "WAITZ!!!! i w3nn3 a3ks u s0mething!!! ://3",
			sound = sfx_mdial,
			sprite = "MOXXTALK"
		},
		[12] = {
			dialoguetext = "C3ns u pets me?!?!... >w>",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
		[13] = {
			dialoguetext = "Pet you...? Well, I guess maybe tim-",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[14] = {
			dialoguetext = "YAYYYYYY!1!! :333331 C3NT W3ITZ!!1!!1! <3",
			sound = sfx_mdial,
			sprite = "MOXXJOY"
		},
	},
	SUSIELAB = {
		[1] = {
			dialoguetext = "It's my honour to assist you in your training Swift...",
			sound = sfx_ssdial,
			sprite = "SUSITALK"
		},
		[2] = {
			dialoguetext = "Thanks!!! It's also my honour to be assisted by someone like you!",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		},
		[3] = {
			dialoguetext = "I bet you'll help me a lot with your half-god stuff... I wish I could be as strong as you...",
			sound = sfx_sdial,
			sprite = "SWIFTALK"
		},
		[4] = {
			dialoguetext = "W-Wait! Like me!?",
			sound = sfx_ssdial,
			sprite = "SUSIFLU"
		},
		[5] = {
			dialoguetext = "Uhh... Are you fine?... Did I said something bad?",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[6] = {
			dialoguetext = "NO! I MEAN YES! I MEAN UHH... YOU'RE FINE!!!",
			sound = sfx_ssdial,
			sprite = "SUSIFLU"
		},
		[7] = {
			dialoguetext = "WOW PROJECT REALLY NEEDS TO INSTAL SOME COOLING HERE AMIRIGHT!!!",
			sound = sfx_ssdial,
			sprite = "SUSIFLU"
		},
		[8] = {
			dialoguetext = "(I can't believe she sees me as strong...)",
			sound = sfx_ssdial,
			sprite = "SUSIBLU"
		}
	},
	UNKNOWNLAB = {
		[1] = {
			dialoguetext = "Hiya Swifty!!!!~",
			sound = sfx_udial,
			sprite = "UNKNSMU"
		},
		[2] = {
			dialoguetext = "Hai!!-",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		},
		[3] = {
			dialoguetext = "Wait... What are YOU doing here...",
			sound = sfx_sdial,
			sprite = "SWIFMAD"
		},
		[4] = {
			dialoguetext = "Well...... I heard that Ashley got an invitation to be your mentor in some training",
			sound = sfx_udial,
			sprite = "UNKNTALK"
		},
		[5] = {
			dialoguetext = "So I went with her!!! (not sure what's that even about loool)",
			sound = sfx_udial,
			sprite = "UNKNJOY"
		},
		[6] = {
			dialoguetext = "Besides, Project probably forgot to invite me anyways~...",
			sound = sfx_udial,
			sprite = "UNKNSMU"
		},
		[7] = {
			dialoguetext = "Who knows what mess is going on in that big brain of his~...",
			sound = sfx_udial,
			sprite = "UNKNSMU"
		},
		[8] = {
			dialoguetext = "You already made ''some little tweaks'' to the training right?...",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
		[9] = {
			dialoguetext = "Yup!!!",
			sound = sfx_udial,
			sprite = "UNKNJOY"
		},
		[10] = {
			dialoguetext = "Yay I'm SO happy..........",
			sound = sfx_sdial,
			sprite = "SWIFNER"
		},
	},
	PROJECTLAB = {
		[1] = {
			dialoguetext = "Ah! Here you are Swift! Are you ready to test out what you're capable of?",
			sound = sfx_pdial,
			sprite = "PROJJOY"
		},
		[2] = {
			dialoguetext = "(And what my virtual reality is capable of as well...)",
			sound = sfx_pdial,
			sprite = "PROJSIDE"
		},
		[3] = {
			dialoguetext = "Or do you need some more prep time?",
			sound = sfx_pdial,
			sprite = "PROJTALK"
		},
	},
	PROJECTALT = {
		[1] = {
			dialoguetext = "Hey you're not Swift... You can enter the VR training, but know that it's not suited for you.",
			sound = sfx_pdial,
			sprite = "PROJCONF"
		},
		[2] = {
			dialoguetext = "But maybe you have what it takes to match the potential of a dragon!",
			sound = sfx_pdial,
			sprite = "PROJJOY"
		},
	},
	CATTYLAB = {
		[1] = {
			dialoguetext = "Hai bestie!!!! :3",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[2] = {
			dialoguetext = "Hai!!!!!!...",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		},
		[3] = {
			dialoguetext = "...",
			sound = sfx_sdial,
			sprite = "SWIFTALK"
		},
		[4] = {
			dialoguetext = "Why do you have pom poms?",
			sound = sfx_sdial,
			sprite = "SWIFTALK"
		},
		[5] = {
			dialoguetext = "It's so I can cheer for you!!!! :333 ",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[6] = {
			dialoguetext = "Project asked me if I wanted to be your emotional support kitty for the training,",
			sound = sfx_cdial,
			sprite = "CATTTALK"
		},
		[7] = {
			dialoguetext = "And here I am!!! :3",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[8] = {
			dialoguetext = "Even though I don't need any invitation for it,",
			sound = sfx_cdial,
			sprite = "CATTNER"
		},
		[9] = {
			dialoguetext = "I will always support you on everything!!! :3",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[10] = {
			dialoguetext = "Thanks for that! I'll be sure to give you two times the support next time!!!",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		},
		[11] = {
			dialoguetext = "I also brought Moxxie along for DOUBLE the support!!! :3",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[12] = {
			dialoguetext = "Wait... You did what...",
			sound = sfx_sdial,
			sprite = "SWIFSTR"
		}
	},
	CATDOUBLE = {
		[1] = {
			dialoguetext = "...",
			sound = sfx_cdial,
			sprite = "CATTNER"
		},
		[2] = {
			dialoguetext = "Did I just achived mitosis are you my clone?...",
			sound = sfx_cdial,
			sprite = "CATTTALK"
		},
		[3] = {
			dialoguetext = "Say something only a real Catty would say...",
			sound = sfx_cdial,
			sprite = "CATTNER"
		},
		[4] = {
			dialoguetext = "Meow... :3",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[5] = {
			dialoguetext = "...",
			sound = sfx_cdial,
			sprite = "CATTTALK"
		},
		[6] = {
			dialoguetext = "Wow you really are me!!! This so cool!!! :3",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[7] = {
			dialoguetext = "I know right!!! We should become twin sisters!!! :333",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[8] = {
			dialoguetext = "Nobody will be able to tell us apart!!!",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		},
		[9] = {
			dialoguetext = "We don't even know which Catty is speaking now!!! x3",
			sound = sfx_cdial,
			sprite = "CATTJOY"
		}
	},
	ASHLEYLAB = {
		[1] = {
			dialoguetext = "There's SO many more productive things I could be doing right now over watching",
			sound = sfx_adial,
			sprite = "ASHLMAD"
		},
		[2] = {
			dialoguetext = "you fumble around in a glorified playground...",
			sound = sfx_adial,
			sprite = "ASHLMAD"
		},
		[3] = {
			dialoguetext = "You BETTER be training like you're gonna fight me. Maybe then I'll find this worthwhile...",
			sound = sfx_adial,
			sprite = "ASHLTALK"
		},
		[4] = {
			dialoguetext = "Okay!!! I'll be sure to keep you entertained!!!",
			sound = sfx_sdial,
			sprite = "SWIFJOY"
		},
		[5] = {
			dialoguetext = "Actually... Maybe I WILL fight you after this training...",
			sound = sfx_adial,
			sprite = "ASHLJOY"
		},
		[6] = {
			dialoguetext = "Just to see if your training did have it's effects...",
			sound = sfx_adial,
			sprite = "ASHLJOY"
		},
		[7] = {
			dialoguetext = "...",
			sound = sfx_sdial,
			sprite = "SWIFSTR"
		}
	},
	ART1 = {
		[1] = {
			dialoguetext = "Title: Catty says hi *Author: Fizzleness",
			sound = sfx_drtalk
		}
	},
	ART2 = {
		[1] = {
			dialoguetext = "Title: Swift and The Shark boy. *Author: Anonymous friend :3",
			sound = sfx_drtalk
		}
	},
	ART3 = {
		[1] = {
			dialoguetext = "Title: UNTITLED *Author: Klasky",
			sound = sfx_drtalk
		}
	},
	ART4 = {
		[1] = {
			dialoguetext = "Title: UNTITLED *Author: Greenmoon",
			sound = sfx_drtalk
		}
	},
	ART5 = {
		[1] = {
			dialoguetext = "Title: Piss *Author: Katii/Kayla",
			sound = sfx_drtalk
		}
	},
	ART6 = {
		[1] = {
			dialoguetext = "Title: UNTITLED *Author: enes2gamer",
			sound = sfx_drtalk
		}
	},
	ARTMIBBLE = {
		[1] = {
			dialoguetext = "Title: Swift mug & Piles of Swift's scales *Author: Mahier, a.k.a Mibble",
			sound = sfx_drtalk
		}
	},
	ART7 = {
		[1] = {
			dialoguetext = "Title: The awesome yuri dragon and little guy who's never getting his mod finished *Author: Spacespiral",
			sound = sfx_drtalk
		}
	},
	ART8 = {
		[1] = {
			dialoguetext = "Title: Swiftmoment *Author: Aquavine",
			sound = sfx_drtalk
		}
	}
}

local function TriggerDialogue(mo, dialogue)
	mo.dialoguethinker = true
	mo.dialoguecurrent = dialogue
	mo.dialoguenum = 1
	mo.dialoguetimer = 0
	mo.currentline = 1
	mo.linebegin = 1
	mo.spriteless = 0
	mo.textprogress = {
		line1 = nil,
		line2 = nil,
		line3 = nil,
		line4 = nil
	}
	mo.linebreaks = {
		line2 = false,
		line3 = false,
		line4 = false
	}
end



addHook("PlayerThink", function(player)
	if (player.mo and player.mo.valid) and player.mo.dialoguethinker == true 
		player.pflags = $|PF_STASIS|PF_JUMPSTASIS
		local dialogue = player.mo.dialoguecurrent
		local num =  player.mo.dialoguenum
		if dialogue[num].sprite ~= nil
			player.mo.spriteless = 0
		else
			player.mo.spriteless = 1
		end
		if player.mo.dialoguetimer < string.len(dialogue[num].dialoguetext) then
			if player.cmd.buttons & BT_SPIN
				for i = player.mo.dialoguetimer, string.len(dialogue[num].dialoguetext)
					player.mo.dialoguetimer = $ + 1
					player.mo.textprogress["line"..player.mo.currentline] = string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.dialoguetimer)
					if string.sub(dialogue[num].dialoguetext, player.mo.dialoguetimer, player.mo.dialoguetimer) == "*"
						local length = player.mo.dialoguetimer - player.mo.linebegin
						if length > 0 then
							player.mo.textprogress["line"..player.mo.currentline] = string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.dialoguetimer - 1)
						else
							player.mo.textprogress["line"..player.mo.currentline] = ""
						end
						player.mo.currentline = $ + 1
				     	player.mo.linebreaks["line"..player.mo.currentline] = true
						player.mo.linebegin = player.mo.dialoguetimer + 1
						if string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.linebegin) == " " then
							player.mo.linebegin = player.mo.linebegin + 1
						end
						return
					end
					if string.len(player.mo.textprogress["line"..player.mo.currentline]) > (26 + player.mo.spriteless*8)
						local linestring = player.mo.textprogress["line"..player.mo.currentline]
						local reverso = string.reverse(linestring)
						local ending = string.len(linestring) - ((string.find(reverso, " ") or 1) - 1)
						player.mo.textprogress["line"..player.mo.currentline] = string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.linebegin + ending - 1)
						player.mo.currentline = $ + 1
						player.mo.linebegin = $ + ending
						if string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.linebegin) == " " then
							player.mo.linebegin = player.mo.linebegin + 1
						end
						return
					end
				end
			else
				player.mo.dialoguetimer = $ + 1
			end
			if player.mo.dialoguetimer % 1 == 0 then 
				if dialogue[num].sound ~= nil
					S_StartSound(player.mo, dialogue[num].sound, player) 
				else
					S_StartSound(player.mo, sfx_drtalk, player)
				end
			end
		end
		if player.mo.dialoguetimer >= string.len(dialogue[num].dialoguetext)
			if player.cmd.buttons & BT_JUMP and not (player.lastbuttons & BT_JUMP)
				if dialogue[num + 1] == nil
					player.mo.dialoguethinker = false
				else
					player.mo.dialoguenum = $ + 1
					player.mo.dialoguetimer = 0
					player.mo.currentline = 1
					player.mo.linebegin = 0
					player.mo.textprogress = {
						line1 = nil,
						line2 = nil,
						line3 = nil,
						line4 = nil
					}
					player.mo.linebreaks = {
						line2 = false,
						line3 = false,
						line4 = false
					}
				end
			end
		end
		player.mo.textprogress["line"..player.mo.currentline] = string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.dialoguetimer)
		if string.sub(dialogue[num].dialoguetext, player.mo.dialoguetimer, player.mo.dialoguetimer) == "*"
			local length = player.mo.dialoguetimer - player.mo.linebegin
			if length > 0 then
				player.mo.textprogress["line"..player.mo.currentline] = string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.dialoguetimer - 1)
			else
				player.mo.textprogress["line"..player.mo.currentline] = ""
			end
			player.mo.currentline = $ + 1
			player.mo.linebreaks["line"..player.mo.currentline] = true
			player.mo.linebegin = player.mo.dialoguetimer + 1
			if string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.linebegin) == " " then
				player.mo.linebegin = player.mo.linebegin + 1
			end
			return
		end
		if string.len(player.mo.textprogress["line"..player.mo.currentline]) > (26 + player.mo.spriteless*8)
			local linestring = player.mo.textprogress["line"..player.mo.currentline]
			local reverso = string.reverse(linestring)
			local ending = string.len(linestring) - ((string.find(reverso, " ") or 1) - 1)
			player.mo.textprogress["line"..player.mo.currentline] = string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.linebegin + ending - 1)
			player.mo.currentline = $ + 1
			player.mo.linebegin = $ + ending
			if string.sub(dialogue[num].dialoguetext, player.mo.linebegin, player.mo.linebegin) == " " then
				player.mo.linebegin = player.mo.linebegin + 1
			end
			return
		end
	end
end)

local function DialogueDrawer(v, player)
	if (player.mo and player.mo.valid) and player.mo.dialoguethinker == true 
		local dialogue = player.mo.dialoguecurrent
		local num =  player.mo.dialoguenum
		v.draw(12, 110, v.cachePatch("DIALOBOX"), V_SNAPTOBOTTOM|V_50TRANS|V_ADD)
		if dialogue[num].sprite ~= nil then v.drawScaled(24*FRACUNIT, 120*FRACUNIT, 2*FRACUNIT/8, v.cachePatch(dialogue[num].sprite), V_SNAPTOBOTTOM) end
		v.drawString(90 - (player.mo.spriteless*64), 125, "*", V_SNAPTOBOTTOM|V_ALLOWLOWERCASE)
		for i = 1, 4 do
			local line = player.mo.textprogress["line"..i]
			local broke = player.mo.linebreaks["line"..i]
			if line == nil then return end
			v.drawString(100 - (player.mo.spriteless*64), 125 + (i-1)*15, line, V_SNAPTOBOTTOM|V_ALLOWLOWERCASE)
			if broke == true then v.drawString(90  - (player.mo.spriteless*64), 125 + (i-1)*15, "*", V_SNAPTOBOTTOM|V_ALLOWLOWERCASE) end
		end
	end
end

hud.add(DialogueDrawer, "game")

addHook("LinedefExecute", function(line, mo, sec)
	TriggerDialogue(mo, dialogue[line.stringargs[1]])
end, "SWIFTDIAL")