Not a member of GistPad yet?
Sign Up,
it unlocks many cool features!
- -- PRO MOBILE KEYBOARD (Roblox) -- LocalScript
- local player = game.Players.LocalPlayer local VIM = game:GetService("VirtualInputManager")
- -- GUI local gui = Instance.new("ScreenGui") gui.Name = "ProKeyboard" gui.Parent = player:WaitForChild("PlayerGui")
- -- Toggle Button local toggle = Instance.new("TextButton") toggle.Size = UDim2.new(0, 100, 0, 40) toggle.Position = UDim2.new(0, 10, 0.5, 0) toggle.Text = "Keyboard" toggle.BackgroundColor3 = Color3.fromRGB(40,40,40) toggle.TextColor3 = Color3.new(1,1,1) toggle.Parent = gui
- -- Main Frame local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 340, 0, 220) frame.Position = UDim2.new(0.1, 0, 0.55, 0) frame.BackgroundColor3 = Color3.fromRGB(20,20,20) frame.Visible = true frame.Active = true frame.Draggable = true frame.Parent = gui
- -- Rounded corners local corner = Instance.new("UICorner", frame) corner.CornerRadius = UDim.new(0, 12)
- -- Layout local layout = Instance.new("UIGridLayout") layout.CellSize = UDim2.new(0, 30, 0, 35) layout.CellPadding = UDim2.new(0, 4, 0, 4) layout.FillDirectionMaxCells = 10 layout.Parent = frame
- -- States local caps = false
- -- Key creator local function createKey(text, keycode, special) local button = Instance.new("TextButton") button.Text = text button.BackgroundColor3 = Color3.fromRGB(50,50,50) button.TextColor3 = Color3.new(1,1,1) button.Font = Enum.Font.SourceSansBold button.TextScaled = true button.Parent = frame
- Instance.new("UICorner", button).CornerRadius = UDim.new(0,6)
- button.MouseButton1Down:Connect(function()
- if text == "Caps" then
- caps = not caps
- button.BackgroundColor3 = caps and Color3.fromRGB(0,170,255) or Color3.fromRGB(50,50,50)
- return
- end
- VIM:SendKeyEvent(true, keycode, false, game)
- end)
- button.MouseButton1Up:Connect(function()
- VIM:SendKeyEvent(false, keycode, false, game)
- end)
- end
- -- Row 1 for _,k in ipairs({"Q","W","E","R","T","Y","U","I","O","P"}) do createKey(k, Enum.KeyCode[k]) end
- -- Row 2 for _,k in ipairs({"A","S","D","F","G","H","J","K","L"}) do createKey(k, Enum.KeyCode[k]) end
- -- Row 3 createKey("Caps", Enum.KeyCode.CapsLock) for _,k in ipairs({"Z","X","C","V","B","N","M"}) do createKey(k, Enum.KeyCode[k]) end createKey("⌫", Enum.KeyCode.Backspace)
- -- Row 4 createKey("Shift", Enum.KeyCode.LeftShift) createKey("Ctrl", Enum.KeyCode.LeftControl) createKey("Alt", Enum.KeyCode.LeftAlt) createKey("Space", Enum.KeyCode.Space) createKey("Enter", Enum.KeyCode.Return)
- -- Toggle visibility toggle.MouseButton1Click:Connect(function() frame.Visible = not frame.Visible end)
- -- Resize (pinch simulation with button) local resize = Instance.new("TextButton") resize.Size = UDim2.new(0, 40, 0, 40) resize.Position = UDim2.new(1, -45, 1, -45) resize.Text = "+" resize.Parent = frame
- resize.MouseButton1Click:Connect(function() frame.Size = frame.Size + UDim2.new(0, 20, 0, 10) end)
- -- Drag indicator local dragLabel = Instance.new("TextLabel") dragLabel.Size = UDim2.new(1,0,0,20) dragLabel.Text = "Drag Me" dragLabel.BackgroundTransparency = 1 dragLabel.TextColor3 = Color3.fromRGB(200,200,200) dragLabel.Parent = frame
- -- Optional WASD highlight local function highlight(key) for _,v in pairs(frame:GetChildren()) do if v:IsA("TextButton") and v.Text == key then v.BackgroundColor3 = Color3.fromRGB(0,170,255) task.delay(0.2, function() v.BackgroundColor3 = Color3.fromRGB(50,50,50) end) end end end
- for _,k in ipairs({"W","A","S","D"}) do highlight(k) end
RAW Paste Data
Copied
