math.randomseed(tick())
local ACCENT_COLOR=Color3.fromRGB(220,60,60)
local BG_COLOR=Color3.fromRGB(28,28,30)
local ELEMENT_COLOR=Color3.fromRGB(45,45,48)
local TEXT_COLOR=Color3.fromRGB(240,240,240)
local WARN_COLOR=Color3.fromRGB(255,120,120)
local WORDS_URL="https://raw.githubusercontent.com/dwyl/english-words/refs/heads/master/words.txt"
local FILE_NAME="words.txt"
local MAX_SUGGESTIONS=250
local FILTERS={"longest first","shortest first","randomly"}
local currentFilter=1
local onlyEndsWithX=false
if not isfile(FILE_NAME) then local res=request({Url=WORDS_URL,Method="GET"}) if res and res.Body then writefile(FILE_NAME,res.Body) end end
local Words={} if isfile(FILE_NAME) then for l in readfile(FILE_NAME):gmatch("[^\r\n]+") do if #l>=3 and l:match("^[A-Za-z]+$") then table.insert(Words,l) end end end
local function SuggestWords(prefix,limit) prefix=prefix:lower() local results={} for _,w in ipairs(Words) do if w:lower():sub(1,#prefix)==prefix and (not onlyEndsWithX or w:sub(-1):lower()=="x") then table.insert(results,w) end end if currentFilter==1 then table.sort(results,function(a,b)return #a>#b end) elseif currentFilter==2 then table.sort(results,function(a,b)return #a<#b end) else for i=#results,2,-1 do local j=math.random(i) results[i],results[j]=results[j],results[i] end end local final={} for i=1,math.min(limit,#results) do final[i]=results[i] end return final end
local gui=Instance.new("ScreenGui",game.CoreGui) gui.Name="mokra cipka"
local frame=Instance.new("Frame",gui) frame.Size=UDim2.new(0,360,0,390) frame.Position=UDim2.new(0,80,0,100) frame.BackgroundColor3=BG_COLOR frame.BorderSizePixel=0 frame.Active=true frame.Draggable=true Instance.new("UICorner",frame).CornerRadius=UDim.new(0,12)
local stroke=Instance.new("UIStroke",frame) stroke.Thickness=1.5 stroke.Color=ACCENT_COLOR
local credit=Instance.new("TextLabel",frame) credit.Size=UDim2.new(0.5,-10,0,20) credit.Position=UDim2.new(0,10,0,6) credit.BackgroundTransparency=1 credit.Text="by i44xc, have fun" credit.Font=Enum.Font.GothamBold credit.TextSize=14 credit.TextColor3=TEXT_COLOR credit.TextXAlignment=Enum.TextXAlignment.Left
local warn=Instance.new("TextLabel",frame) warn.Size=UDim2.new(0.5,-10,0,20) warn.Position=UDim2.new(0,10,0,28) warn.BackgroundTransparency=1 warn.Text="some words might not work" warn.Font=Enum.Font.Gotham warn.TextSize=10 warn.TextWrapped=true warn.TextColor3=WARN_COLOR warn.TextXAlignment=Enum.TextXAlignment.Left
local filterLabel=Instance.new("TextLabel",frame) filterLabel.Size=UDim2.new(0.25,-10,0,20) filterLabel.Position=UDim2.new(0.5,0,0,6) filterLabel.BackgroundTransparency=1 filterLabel.Text="current mode:" filterLabel.Font=Enum.Font.GothamBold filterLabel.TextSize=14 filterLabel.TextColor3=TEXT_COLOR filterLabel.TextXAlignment=Enum.TextXAlignment.Left
local filterBtn=Instance.new("TextButton",frame) filterBtn.Size=UDim2.new(0.25,-10,0,20) filterBtn.Position=UDim2.new(0.5,0,0,28) filterBtn.BackgroundColor3=ELEMENT_COLOR filterBtn.Text=FILTERS[currentFilter] filterBtn.Font=Enum.Font.Gotham filterBtn.TextSize=10 filterBtn.TextColor3=ACCENT_COLOR filterBtn.AutoButtonColor=false Instance.new("UICorner",filterBtn).CornerRadius=UDim.new(0,6)
local toggle=Instance.new("Frame",frame) toggle.Size=UDim2.new(0,46,0,20) toggle.Position=UDim2.new(1,-56,0,28) toggle.BackgroundColor3=Color3.fromRGB(60,20,20) toggle.BorderSizePixel=0 Instance.new("UICorner",toggle).CornerRadius=UDim.new(1,0)
local knob=Instance.new("Frame",toggle) knob.Size=UDim2.new(0,18,0,18) knob.Position=UDim2.new(1,-19,0,1) knob.BackgroundColor3=Color3.fromRGB(220,60,60) knob.BorderSizePixel=0 Instance.new("UICorner",knob).CornerRadius=UDim.new(1,0)
local toggleBtn=Instance.new("TextButton",toggle) toggleBtn.Size=UDim2.new(1,0,1,0) toggleBtn.BackgroundTransparency=1 toggleBtn.Text=""
local input=Instance.new("TextBox",frame) input.PlaceholderText="search.." input.Size=UDim2.new(1,-20,0,28) input.Position=UDim2.new(0,10,0,60) input.BackgroundColor3=ELEMENT_COLOR input.TextColor3=TEXT_COLOR input.Font=Enum.Font.Gotham input.TextSize=13 input.ClearTextOnFocus=false Instance.new("UICorner",input).CornerRadius=UDim.new(0,6)
input.Focused:Connect(function() input.Text="" end)
local list=Instance.new("ScrollingFrame",frame) list.Size=UDim2.new(1,-20,0,300) list.Position=UDim2.new(0,10,0,92) list.BackgroundTransparency=1 list.ScrollBarThickness=5
local layout=Instance.new("UIListLayout",list) layout.Padding=UDim.new(0,4)
local function ClearList() for _,c in ipairs(list:GetChildren()) do if c:IsA("TextButton") then c:Destroy() end end end
local function UpdateSuggestions() ClearList() if #input.Text<1 then list.CanvasSize=UDim2.new(0,0,0,0) return end for _,word in ipairs(SuggestWords(input.Text,MAX_SUGGESTIONS)) do local btn=Instance.new("TextButton",list) btn.Size=UDim2.new(1,-4,0,24) btn.BackgroundColor3=ELEMENT_COLOR btn.Text=" "..word btn.Font=Enum.Font.Gotham btn.TextSize=12 btn.TextXAlignment=Enum.TextXAlignment.Left btn.TextColor3=TEXT_COLOR btn.TextTruncate=Enum.TextTruncate.AtEnd btn.AutoButtonColor=false Instance.new("UICorner",btn).CornerRadius=UDim.new(0,6) btn.MouseEnter:Connect(function() btn.BackgroundColor3=ACCENT_COLOR btn.TextColor3=Color3.new(1,1,1) end) btn.MouseLeave:Connect(function() btn.BackgroundColor3=ELEMENT_COLOR btn.TextColor3=TEXT_COLOR end) btn.MouseButton1Click:Connect(function() setclipboard(word) end) end list.CanvasSize=UDim2.new(0,0,0,layout.AbsoluteContentSize.Y+6) end
input:GetPropertyChangedSignal("Text"):Connect(UpdateSuggestions)
filterBtn.MouseButton1Click:Connect(function() currentFilter=currentFilter%#FILTERS+1 filterBtn.Text=FILTERS[currentFilter] UpdateSuggestions() end)
toggleBtn.MouseButton1Click:Connect(function() onlyEndsWithX=not onlyEndsWithX if onlyEndsWithX then toggle.BackgroundColor3=Color3.fromRGB(20,60,20) knob.Position=UDim2.new(0,1,0,1) knob.BackgroundColor3=Color3.fromRGB(80,220,120) else toggle.BackgroundColor3=Color3.fromRGB(60,20,20) knob.Position=UDim2.new(1,-19,0,1) knob.BackgroundColor3=Color3.fromRGB(220,60,60) end UpdateSuggestions() end)
Comments
The script shows a dynamic list of words that updates based on what you type in the textbox, which is a nice concept. However, the toggle switch does not seem to work and its purpose is unclear. Some of the words are incorrect, and although this is mentioned, clicking on the words does nothing. Despite these issues, it can still be useful for users who prefer typing the words themselves. Greets -MFX
Works on Delta?