-- hmm maybe later local wordsfile = nil getgenv().deletewhendupefound = true print("loading lib") local lib = loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Lib-18698"))() print("done loading lib") lib.makelib("Word Bank (2AreYouMental110") local main = lib.maketab("Main") local labelstatus = lib.makelabel("Loading... (This may take ~1 minute)",main) pcall(function() wordsfile = readfile("ALLWORDSFILE.txt") end) local ALLWORDS = nil if wordsfile ~= nil then ALLWORDS = wordsfile lib.updatelabel("Got Words from Workspace!",labelstatus) else lib.updatelabel("Loading Words from Internet",labelstatus) ALLWORDS = game:HttpGet("https://raw.githubusercontent.com/lorenbrichter/Words/master/Words/en.txt") writefile("ALLWORDSFILE.txt",ALLWORDS) end lib.updatelabel("Done Loading!",labelstatus) local words = string.split(ALLWORDS,"\n") local numtolongest = 1 lib.maketextbox("# To Longest",main,function(num) numtolongest = tonumber(num) or 1 end) local lettercap = math.huge lib.maketextbox("Letter Cap",main,function(num) lettercap = tonumber(num) or math.huge end) local lastcontains = "" local labelword local numclose = .001 function copyword(bruteforce) local gamecontainer = game.Players.LocalPlayer.PlayerGui.GameUI.Container.GameSpace.DefaultUI.GameContainer if #gamecontainer.DesktopContainer.InfoFrameContainer:GetChildren() > 0 then gamecontainer = gamecontainer.DesktopContainer.InfoFrameContainer.InfoFrame.TextFrame else gamecontainer = gamecontainer.Mobile.MobileContainer.InfoFrame.TextFrame end local contains = "" for i,v in pairs(gamecontainer:GetChildren()) do if v:FindFirstChild("Letter") and v.Visible == true then local lettercolor = v.Letter.ImageColor3 local lettercolor2 = Color3.fromRGB(142,148,171) local lettercolor3 = Color3.fromRGB(129,156,255) if (lettercolor.R - lettercolor2.R < numclose and lettercolor.G - lettercolor2.G < numclose and lettercolor.B - lettercolor2.B < numclose) or (lettercolor.R - lettercolor3.R < numclose and lettercolor.G - lettercolor3.G < numclose and lettercolor.B - lettercolor3.B < numclose) then contains = contains..v.Letter.TextLabel.Text end end end contains = contains:lower() local finalword if lastcontains ~= contains and bruteforce == nil then lastcontains = contains local longests = {} for i,v in pairs(words) do if string.find(v,contains) and string.len(v) <= lettercap then table.insert(longests,v) end end table.sort(longests,function(a,b) return #a > #b end) finalword = longests[numtolongest] setclipboard(finalword) print(finalword) lib.updatelabel(finalword or "Word Not Found",labelword) end end lib.makebutton("Copy Word",main,function() copyword(true) end) local autocopy = false lib.maketoggle("Auto Copy Word",main,function(bool) autocopy = bool while autocopy do task.wait(.1) copyword() end end) labelword = lib.makelabel("Word",main) lib.ondestroyedfunc = function() autocopy = false end