Guest

Keyboard

Mar 28th, 2026
11
0
Never
Not a member of GistPad yet? Sign Up, it unlocks many cool features!
None 6.51 KB | None | 0 0
  1. -- PRO MOBILE KEYBOARD (Roblox) -- LocalScript
  2.  
  3. local player = game.Players.LocalPlayer local VIM = game:GetService("VirtualInputManager")
  4.  
  5. -- GUI local gui = Instance.new("ScreenGui") gui.Name = "ProKeyboard" gui.Parent = player:WaitForChild("PlayerGui")
  6.  
  7. -- 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
  8.  
  9. -- 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
  10.  
  11. -- Rounded corners local corner = Instance.new("UICorner", frame) corner.CornerRadius = UDim.new(0, 12)
  12.  
  13. -- 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
  14.  
  15. -- States local caps = false
  16.  
  17. -- 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
  18.  
  19. Instance.new("UICorner", button).CornerRadius = UDim.new(0,6)
  20.  
  21. button.MouseButton1Down:Connect(function()
  22. if text == "Caps" then
  23. caps = not caps
  24. button.BackgroundColor3 = caps and Color3.fromRGB(0,170,255) or Color3.fromRGB(50,50,50)
  25. return
  26. end
  27.  
  28. VIM:SendKeyEvent(true, keycode, false, game)
  29. end)
  30.  
  31. button.MouseButton1Up:Connect(function()
  32. VIM:SendKeyEvent(false, keycode, false, game)
  33. end)
  34.  
  35. end
  36.  
  37. -- Row 1 for _,k in ipairs({"Q","W","E","R","T","Y","U","I","O","P"}) do createKey(k, Enum.KeyCode[k]) end
  38.  
  39. -- Row 2 for _,k in ipairs({"A","S","D","F","G","H","J","K","L"}) do createKey(k, Enum.KeyCode[k]) end
  40.  
  41. -- 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)
  42.  
  43. -- 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)
  44.  
  45. -- Toggle visibility toggle.MouseButton1Click:Connect(function() frame.Visible = not frame.Visible end)
  46.  
  47. -- 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
  48.  
  49. resize.MouseButton1Click:Connect(function() frame.Size = frame.Size + UDim2.new(0, 20, 0, 10) end)
  50.  
  51. -- 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
  52.  
  53. -- 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
  54.  
  55. for _,k in ipairs({"W","A","S","D"}) do highlight(k) end
RAW Paste Data Copied