Files
  • main.lua
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
-- By OldPalHappy


-- thing[string] = replace[string]



local findAndReplace = {-- customize this as you want.
	-- punctuation
	["."]       = "!";
	["!"]       = "!!!";
	["?"]       = "!?!?";
	
	-- basics
	["i"]       = "me";
	["an"]      = "uhn";
	["a"]       = "uh";
	["this"]    = "dis";
	["have"]    = "has";
	["ever"]    = "evva";
	["your"]    = "ur";
	["thanks"]  = "'danks";
	["love"]    = "luv";
	["there"]   = "der";
	["their"]   = "dher";
	
	-- slightly longer words
	["little"]  = "'lil";
	["because"] = "becuz";
	
	-- concatentations
	["haven't"] = "hasn't";
	["you're"]  = "you is";
	["i'm"]     = "I is";
	["don't"]   = "dun't";
	["they're"] = "dey're";
	
	-- adding "s"
	["hope"]    = "hopes";
	["thank"]   = "'dank'";
	["get"]     = "gets";
	
	-- adding "z"
	["its"]     = "itz";
	["flies"]   = "flyz";
	["loves"]   = "luvz";
	["anyway"]  = "anywayz";
	
	-- hehe
	["kelly"]   = "stoopid";
}

local deleteVowelChance      = 20/100 -- 20%
local deleteConsonantsChance = 10/100 -- 10%




local function soundDumb(s)
	local new = ""
	for sentence,punctuation in s:gmatch("([^.!?]*)([.!?]*)") do
		local startOfSentence = true
		for word in sentence:gsub("%.",""):gmatch("%S+") do
			local replace = findAndReplace[word:lower()]
			if(replace)then
				if(startOfSentence)then
					replace = replace:sub(1,1):upper()..replace:sub(2)	
				end
			elseif(#word>3)then
				local newWord = word
				for i = 2,#word-1 do
					local deleteChance = (word:sub(i,i):find("[AEIOUaeiou]"))and vowelDeleteChance or deleteConsonantsChance
					if(math.random()<deleteChance)then
						newWord = newWord:sub(1,i-1).." "..newWord:sub(i+1)
					end
				end
				word = newWord:gsub(" ","")
			end
			new = new.." "..(replace or word)
			startOfSentence = false
		end
		if(punctuation)then
			new = new..(findAndReplace[punctuation] or punctuation)
		end
	end
	return new:sub(2);
end

local saying = [[
According to all known laws
of aviation,

  
there is no way a bee
should be able to fly.

  
Its wings are too small to get
its fat little body off the ground.

  
The bee, of course, flies anyway

  
because bees don't care
what humans think is impossible.

  
Yellow, black. Yellow, black.
Yellow, black. Yellow, black.

  
Ooh, black and yellow!
Let's shake it up a little.

  
Barry! Breakfast is ready!

  
Ooming!

  
Hang on a second.

  
Hello?

  
- Barry?
- Adam?

  
- Oan you believe this is happening?
- I can't. I'll pick you up.

  
Looking sharp.

  
Use the stairs. Your father
paid good money for those.

  
Sorry. I'm excited.

  
Here's the graduate.
We're very proud of you, son.

  
A perfect report card, all B's.

  
Very proud.

  
Ma! I got a thing going here.

  
- You got lint on your fuzz.
- Ow! That's me!

  
- Wave to us! We'll be in row 118,000.
- Bye!

  
Barry, I told you,
stop flying in the house!

  
- Hey, Adam.
- Hey, Barry.

  
- Is that fuzz gel?
- A little. Special day, graduation.

  
Never thought I'd make it.

  
Three days grade school,
three days high school.

  
Those were awkward.

  
Three days college. I'm glad I took
a day and hitchhiked around the hive.

  
You did come back different.

  
- Hi, Barry.
- Artie, growing a mustache? Looks good.

  
- Hear about Frankie?
- Yeah.

  
- You going to the funeral?
- No, I'm not going.

  
Everybody knows,
sting someone, you die.

  
Don't waste it on a squirrel.
Such a hothead.

  
I guess he could have
just gotten out of the way.

  
I love this incorporating
an amusement park into our day.

  
That's why we don't need vacations.

  
Boy, quite a bit of pomp...
under the circumstances.

  
- Well, Adam, today we are men.
- We are!

  
- Bee-men.
- Amen!

  
Hallelujah!

  
Students, faculty, distinguished bees,

  
please welcome Dean Buzzwell.

  
Welcome, New Hive Oity
graduating class of...

  
...9:15.

  
That concludes our ceremonies.

  
And begins your career
at Honex Industries!

  
Will we pick ourjob today?

  
I heard it's just orientation.

  
Heads up! Here we go.

  
Keep your hands and antennas
inside the tram at all times.

  
- Wonder what it'll be like?
- A little scary.

]]

local newSaying = soundDumb(saying)

print(newSaying)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-- Yes, I really have nothing better to do.