--// Blue Encoder GUI (Hex / Morse / Binary / Decimal) --// Place in: StarterPlayer > StarterPlayerScripts (LocalScript) local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- ===== Settings (Blue Theme) ===== local THEME_BG = Color3.fromRGB(0, 110, 200) local THEME_BG_DARK = Color3.fromRGB(0, 80, 160) local THEME_ACCENT = Color3.fromRGB(0, 170, 255) local THEME_TEXT = Color3.fromRGB(255, 255, 255) local GUI_NAME = "BlueEncoderGui" local selectedMode = "Hex" -- default -- Morse map (supports letters, digits, and some punctuation) local MORSE = { A=".-", B="-...", C="-.-.", D="-..", E=".", F="..-.", G="--.", H="....", I="..", J=".---", K="-.-", L=".-..", M="--", N="-.", O="---", P=".--.", Q="--.-", R=".-.", S="...", T="-", U="..-", V="...-", W=".--", X="-..-", Y="-.--", Z="--..", ["0"]="-----", ["1"]=".----", ["2"]="..---", ["3"]="...--", ["4"]="....-", ["5"]=".....", ["6"]="-....", ["7"]="--...", ["8"]="---..", ["9"]="----.", ["."]=".-.-.-", [","]="--..--", ["?"]="..--..", ["!"]="-.-.--", ["/"]="-..-.", ["("]="-.--.", [")"]="-.--.-", ["&"]=".-...", [":"]="---...", [";"]="-.-.-.", ["="]="-...-", ["+"]=".--.-.", ["-"]="-....-", ["_"]="..--.-", ["\""]=".-..-.", ["$"]="...-..-", ["@"]=".--.-." } local function toBinary8(n) local bits = {} for i = 7, 0, -1 do local bit = math.floor(n / (2^i)) % 2 bits[#bits+1] = tostring(bit) end return table.concat(bits) end local function encodeText(text, mode) -- Encodes each byte of the string (works great for standard English) local bytes = {string.byte(text, 1, #text)} if #bytes == 0 then return "" end if mode == "Hex" then local out = {} for _, b in ipairs(bytes) do out[#out+1] = string.format("%02X", b) end return table.concat(out, " ") elseif mode == "Binary" then local out = {} for _, b in ipairs(bytes) do out[#out+1] = toBinary8(b) end return table.concat(out, " ") elseif mode == "Decimal" then local out = {} for _, b in ipairs(bytes) do out[#out+1] = tostring(b) end return table.concat(out, " ") elseif mode == "Morse" then -- Morse is “symbol language”, not letters, but it uses dots/dashes. local out = {} for i = 1, #text do local ch = text:sub(i, i) if ch == " " then out[#out+1] = "/" -- word separator else local up = string.upper(ch) out[#out+1] = MORSE[up] or "?" -- unknown char end end return table.concat(out, " ") end return text end -- ===== GUI Creation / Rebuild ===== local screenGui local mainFrame local popupFrame local inputBox local outputBox local modeLabel local function destroyMainOnly() if mainFrame then mainFrame:Destroy() mainFrame = nil end end local function showDestroyedPopup() if not screenGui then return end -- If popup exists, remove it first if popupFrame then popupFrame:Destroy() popupFrame = nil end popupFrame = Instance.new("Frame") popupFrame.Name = "DestroyedPopup" popupFrame.Size = UDim2.new(0, 520, 0, 140) popupFrame.Position = UDim2.new(0.5, -260, 0.5, -70) popupFrame.BackgroundColor3 = THEME_BG_DARK popupFrame.BorderSizePixel = 0 popupFrame.Parent = screenGui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 12) corner.Parent = popupFrame local stroke = Instance.new("UIStroke") stroke.Color = THEME_ACCENT stroke.Thickness = 2 stroke.Parent = popupFrame local msg = Instance.new("TextLabel") msg.Size = UDim2.new(1, -60, 1, 0) msg.Position = UDim2.new(0, 20, 0, 0) msg.BackgroundTransparency = 1 msg.TextColor3 = THEME_TEXT msg.Font = Enum.Font.GothamBold msg.TextSize = 18 msg.TextWrapped = true msg.TextXAlignment = Enum.TextXAlignment.Left msg.Text = 'destroyed gui successfully, to reopen the gui, press shift+s.' msg.Parent = popupFrame local closeX = Instance.new("TextButton") closeX.Size = UDim2.new(0, 40, 0, 40) closeX.Position = UDim2.new(1, -50, 0, 10) closeX.BackgroundColor3 = THEME_BG closeX.BorderSizePixel = 0 closeX.TextColor3 = THEME_TEXT closeX.Font = Enum.Font.GothamBlack closeX.TextSize = 20 closeX.Text = "X" closeX.Parent = popupFrame local xCorner = Instance.new("UICorner") xCorner.CornerRadius = UDim.new(0, 10) xCorner.Parent = closeX closeX.MouseButton1Click:Connect(function() if popupFrame then popupFrame:Destroy() popupFrame = nil end end) end local function createGuiIfMissing() -- Create ScreenGui if missing screenGui = playerGui:FindFirstChild(GUI_NAME) if not screenGui then screenGui = Instance.new("ScreenGui") screenGui.Name = GUI_NAME screenGui.ResetOnSpawn = false screenGui.Parent = playerGui end end local function buildMainGui() createGuiIfMissing() -- If main already exists, just show it if mainFrame and mainFrame.Parent then mainFrame.Visible = true return end -- Main frame mainFrame = Instance.new("Frame") mainFrame.Name = "Main" mainFrame.Size = UDim2.new(0, 620, 0, 360) mainFrame.Position = UDim2.new(0.5, -310, 0.5, -180) mainFrame.BackgroundColor3 = THEME_BG mainFrame.BorderSizePixel = 0 mainFrame.Parent = screenGui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 14) corner.Parent = mainFrame local stroke = Instance.new("UIStroke") stroke.Color = THEME_ACCENT stroke.Thickness = 2 stroke.Parent = mainFrame -- Title local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -20, 0, 50) title.Position = UDim2.new(0, 10, 0, 10) title.BackgroundTransparency = 1 title.TextColor3 = THEME_TEXT title.Font = Enum.Font.GothamBlack title.TextSize = 22 title.TextXAlignment = Enum.TextXAlignment.Left title.Text = "Blue Translator (Encoder)" title.Parent = mainFrame -- Close button (hides GUI) local closeBtn = Instance.new("TextButton") closeBtn.Size = UDim2.new(0, 46, 0, 40) closeBtn.Position = UDim2.new(1, -56, 0, 12) closeBtn.BackgroundColor3 = THEME_BG_DARK closeBtn.BorderSizePixel = 0 closeBtn.TextColor3 = THEME_TEXT closeBtn.Font = Enum.Font.GothamBlack closeBtn.TextSize = 18 closeBtn.Text = "X" closeBtn.Parent = mainFrame local closeCorner = Instance.new("UICorner") closeCorner.CornerRadius = UDim.new(0, 10) closeCorner.Parent = closeBtn closeBtn.MouseButton1Click:Connect(function() if mainFrame then mainFrame.Visible = false end end) -- Input label local inputLabel = Instance.new("TextLabel") inputLabel.Size = UDim2.new(0, 280, 0, 24) inputLabel.Position = UDim2.new(0, 20, 0, 70) inputLabel.BackgroundTransparency = 1 inputLabel.TextColor3 = THEME_TEXT inputLabel.Font = Enum.Font.GothamBold inputLabel.TextSize = 16 inputLabel.TextXAlignment = Enum.TextXAlignment.Left inputLabel.Text = "Input (English text):" inputLabel.Parent = mainFrame -- Input box inputBox = Instance.new("TextBox") inputBox.Size = UDim2.new(1, -40, 0, 70) inputBox.Position = UDim2.new(0, 20, 0, 96) inputBox.BackgroundColor3 = THEME_BG_DARK inputBox.BorderSizePixel = 0 inputBox.TextColor3 = THEME_TEXT inputBox.Font = Enum.Font.Gotham inputBox.TextSize = 16 inputBox.ClearTextOnFocus = false inputBox.PlaceholderText = "Type something..." inputBox.PlaceholderColor3 = Color3.fromRGB(200, 230, 255) inputBox.TextXAlignment = Enum.TextXAlignment.Left inputBox.TextYAlignment = Enum.TextYAlignment.Top inputBox.MultiLine = true inputBox.Parent = mainFrame local inCorner = Instance.new("UICorner") inCorner.CornerRadius = UDim.new(0, 10) inCorner.Parent = inputBox -- Mode label modeLabel = Instance.new("TextLabel") modeLabel.Size = UDim2.new(0, 280, 0, 24) modeLabel.Position = UDim2.new(0, 20, 0, 176) modeLabel.BackgroundTransparency = 1 modeLabel.TextColor3 = THEME_TEXT modeLabel.Font = Enum.Font.GothamBold modeLabel.TextSize = 16 modeLabel.TextXAlignment = Enum.TextXAlignment.Left modeLabel.Text = "Mode: " .. selectedMode modeLabel.Parent = mainFrame -- Mode buttons container local modeFrame = Instance.new("Frame") modeFrame.Size = UDim2.new(1, -40, 0, 46) modeFrame.Position = UDim2.new(0, 20, 0, 202) modeFrame.BackgroundTransparency = 1 modeFrame.Parent = mainFrame local layout = Instance.new("UIListLayout") layout.FillDirection = Enum.FillDirection.Horizontal layout.HorizontalAlignment = Enum.HorizontalAlignment.Left layout.VerticalAlignment = Enum.VerticalAlignment.Center layout.Padding = UDim.new(0, 10) layout.Parent = modeFrame local function makeModeButton(text) local b = Instance.new("TextButton") b.Size = UDim2.new(0, 135, 0, 42) b.BackgroundColor3 = THEME_BG_DARK b.BorderSizePixel = 0 b.TextColor3 = THEME_TEXT b.Font = Enum.Font.GothamBold b.TextSize = 16 b.Text = text b.Parent = modeFrame local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0, 10) c.Parent = b b.MouseButton1Click:Connect(function() selectedMode = text if modeLabel then modeLabel.Text = "Mode: " .. selectedMode end end) return b end makeModeButton("Hex") makeModeButton("Morse") makeModeButton("Binary") makeModeButton("Decimal") -- Output label local outLabel = Instance.new("TextLabel") outLabel.Size = UDim2.new(0, 280, 0, 24) outLabel.Position = UDim2.new(0, 20, 0, 252) outLabel.BackgroundTransparency = 1 outLabel.TextColor3 = THEME_TEXT outLabel.Font = Enum.Font.GothamBold outLabel.TextSize = 16 outLabel.TextXAlignment = Enum.TextXAlignment.Left outLabel.Text = "Output (non-letter encoding):" outLabel.Parent = mainFrame -- Output box (read-only feel) outputBox = Instance.new("TextBox") outputBox.Size = UDim2.new(1, -40, 0, 70) outputBox.Position = UDim2.new(0, 20, 0, 278) outputBox.BackgroundColor3 = THEME_BG_DARK outputBox.BorderSizePixel = 0 outputBox.TextColor3 = THEME_TEXT outputBox.Font = Enum.Font.Gotham outputBox.TextSize = 16 outputBox.ClearTextOnFocus = false outputBox.TextEditable = false outputBox.TextXAlignment = Enum.TextXAlignment.Left outputBox.TextYAlignment = Enum.TextYAlignment.Top outputBox.MultiLine = true outputBox.Text = "" outputBox.Parent = mainFrame local outCorner = Instance.new("UICorner") outCorner.CornerRadius = UDim.new(0, 10) outCorner.Parent = outputBox -- Translate button (reusable) local translateBtn = Instance.new("TextButton") translateBtn.Size = UDim2.new(0, 170, 0, 40) translateBtn.Position = UDim2.new(1, -190, 0, 70) translateBtn.BackgroundColor3 = THEME_ACCENT translateBtn.BorderSizePixel = 0 translateBtn.TextColor3 = Color3.fromRGB(0, 35, 70) translateBtn.Font = Enum.Font.GothamBlack translateBtn.TextSize = 16 translateBtn.Text = "Translate" translateBtn.Parent = mainFrame local tCorner = Instance.new("UICorner") tCorner.CornerRadius = UDim.new(0, 10) tCorner.Parent = translateBtn translateBtn.MouseButton1Click:Connect(function() if not inputBox or not outputBox then return end outputBox.Text = encodeText(inputBox.Text, selectedMode) end) -- Destroy GUI button (destroys main UI, keeps ability to rebuild with Shift+S) local destroyBtn = Instance.new("TextButton") destroyBtn.Size = UDim2.new(0, 170, 0, 40) destroyBtn.Position = UDim2.new(1, -190, 0, 118) destroyBtn.BackgroundColor3 = Color3.fromRGB(30, 30, 30) destroyBtn.BorderSizePixel = 0 destroyBtn.TextColor3 = THEME_TEXT destroyBtn.Font = Enum.Font.GothamBlack destroyBtn.TextSize = 16 destroyBtn.Text = "destroy gui" destroyBtn.Parent = mainFrame local dCorner = Instance.new("UICorner") dCorner.CornerRadius = UDim.new(0, 10) dCorner.Parent = destroyBtn destroyBtn.MouseButton1Click:Connect(function() destroyMainOnly() showDestroyedPopup() end) end -- Toggle (Shift+S) - PC/Laptop local function toggleGui() createGuiIfMissing() -- If main is missing (destroyed), rebuild it if not mainFrame or not mainFrame.Parent then buildMainGui() return end -- Otherwise toggle visibility mainFrame.Visible = not mainFrame.Visible end -- Build initially buildMainGui() -- Keybind: Shift+S UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.UserInputType == Enum.UserInputType.Keyboard then -- Shift+S if (UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift)) and input.KeyCode == Enum.KeyCode.S then toggleGui() end end end)