function tipLoad() amont = 1 seed = 0 s = {} s.a = {"You should", "You will", "Your mom will","Your dad will","Your friends will","A stranger will","Your sister will","Your brother will","A family member will","Your lawyer will","The person you love most will","Your least favorite person will","A rubber duck will","Your math teacher should","An anonymous lover will","Your mailman will","Your landlord should","An insect will","A Florida man is going to","Next week, A Florida mom will","A millionaire has a plan to", "A felon wants to", "A published author writes about their desire to", "A thirty year old living in their mom's basement will","A cartoon character will soon","An evil genius plots to","A chef will","Next midnight, little Timmy will", "An FBI agent will","A wise man always","To quote a wise man:","An old lady named Tabitha wants to"} s.b = {"not", "most likely","hopefully","often","possibly","never","perhaps","maybe","sometimes","always","decide to","go and","chose to not"} s.c = {"kick", "destroy", "buy", "sell", "trow away","obtain","find","lose","steal","give away","give to you","mail your friend","win","get","forget about","try to forget about","talk about","read about", "see","eat","take a picture of","joke about","explode","catch","slap","poke","hide","ruin","think about","dream about","imagine","seek wisdom about","search for","stomp on","flush away","drill holes in","stab","rant about","complain about","post about","die because of","bite","burn","delete","not be able to stop thinking about","explore","inspect","cut","melt","boil","bake","feed","blind","look at","drown","point at", "sue", "arrest", "photocopy", "publish a book about", "make a meme about","devote their life to", "paint", "film", "talk to you about","make a feature length movie about","stalk","kill","spy on","send a secret note to","incinerate","give a speech on","write an essay about","loose sleep thinking about","disprove of","support","question","protest against","pawn","auction off","lock away","suddenly remember","steal","paint","be confused by","charge you for","sell their house to purchase ","draw a picture of","make a game about","cry about","compile a list of all the flaws of","collect","mass produce","open a shop that sells","invest in","take a picture of","donate to a charity in the name of","direct a documentary on","ask the whereabouts of","deactivate","teach about","sell a plush to of","make a model of","get divorced over","take notes on","closely study","get arrested for having","make a billboard for"} s.d = {"you","a car", "your life","your money","a million dollars","your family","a slice of pizza","your soul","the earth","the person you love most","an ice cream cone","your pet","a rock","a cheese stick","a stick of butter","a sandwich","all your crypto","your computer","your least favorite person","a bar of pure gold","chocolate","a hamburger","ranch dressing","a grandfather clock","rotten vegetables","Ohio","the state of Florida","Germany","Canada","the United States","a rich persons private jet","a cookie","public transit","themself","a metal detector", "a priceless work of art", "the hardware store", "pancakes", "a time machine", "your house","a keyboard","your phone","your bathroom","a toilet","mommy's credit card","a random persons life savings","a slideshow","an acquaintance","your secret pet cockroach","a lost Soviet nuclear warhead","a copper mine","a broken record","a paper clip with eyes","a penguin","a lamp","a nameless grave stone","firecrackers","a car","an estate in Europe","your uncle's Swiss bank account","a pencil and paper","a flip phone","your calender from 2004","your family's photo album","a microwave meal","their house","a used car","Norway","a painting","a cardboard box","a can of used beams","a lamp","a math text book","a paper airplane","a rock","broken glass","a fun fact","a ruler","a pencil","nothing","everything","a robt","the universe","the library","your old receipts","a deck of playing cards","a stolen credit card","a small child's mother's iPad","fishing equipment","a table","a professor","a model plane","an emoji","a church","a desk fan","a lost doorknob","their dog","a fruit fly","a robot","a dandelion","an industrial park","a computer","a text file","a gearbox","lamp posts","an aftermarket headlight bulb","a cinder block","stoplights","a radio","a telephon pole","a barbed wire fence","a billboard"} buttonLables = {"Make a cool fact","Learn something new","Gain some knowledge","Click to be smarter","Push the button","Get some useful info","Be smarter","Crazy Epic Facts","Things you might not know","Fun facts","Useful things","Amazing fact"} intro = {"Here are some fun facts","Cool things you didn't know","Fun facts you should know","How many of these did you know?"} sal, sbl, scl, sdl, il = #s.a, #s.b, #s.c, #s.d, #intro total, totalWords = (sal*sbl*scl*sdl),(sal+sbl+scl+sdl) --math.randomseed(seed) end function makeTip(n,numbered) nexta = math.random(1,sal) nextb = math.random(1,sbl) nextc = math.random(1,scl) nextd = math.random(1,sdl) tip = s.a[nexta] .. " " .. s.b[nextb] .. " " .. s.c[nextc] .. " " .. s.d[nextd] .. "!" return({tip,nexta,nextb,nextc,nextd}) end function tipList() print(("")..intro[math.random(1,il)]..":") print(" ") for amont = 1, amont do print(makeTip(amont,false)) print(" ") end end function tipEnder() print("I hope you enjoyed these "..amont.." fun facts!") print("Generated with Ray's funny facts generator v1 (lua)") print(total.." total facts are possible") end tipLoad() --[[ for i = 1, amont do print(makeTip(69,false)) print("") end --]] timecode = 1701392306 timecode = tonumber(string.sub(timecode,0,-5)) js = require "js" window = js.global document = window.document --window:alert(crc32_nt("test")) text = document:getElementById("fact") p = window.location.search;p=string.sub(p,2,1000);p=string.gsub(p,"/"," ") --window:alert(p) function parse() words = {} for word in p:gmatch("%w+") do table.insert(words, word) end print(crc32_nt(s.a[words[4]])) if #words == 12 then --print(words[8],s.a[words[4]],crc32_nt(s.a[words[4]])) if words[1] == "share" and words[2] == "h" then print("valid") end end end if pcall(function() parse() end) then --window:alert("e") --for i=1,#words do print(words[i]) end else print("nope") end --if window.location. button = document:getElementById("new")--button.innerHTML = buttonLables[math.random(1,#buttonLables)] share = document:getElementById("share") button:addEventListener("click",function() newtip = makeTip(); text.innerHTML = [[

]] .. newtip[1] .. [[

]]; end) --share.innerHTML = [[Share this fact!]] local l = document:getElementById("load") t = document:getElementById("in") t.innerHTML = t.innerHTML .. "
version "..timecode .. " ("..os.date("%b %d, %Y",tostring(timecode*10000))..")" l:remove() --c=16; t = "top "..c.."; craziest facts!"; for i=1,c do local tt = makeTip(); t=t.."number "..(1+c)-i..". "..tt[1] end print(t) print("Ready!")