first question; um… why? i assume you’re trying to open up some secondary menu instead, which in that case, it seems it is not possible. i’ve tried this before; using ContextActionService to sink the input (didn’t work), and a bunch of other stuff that didn’t work. i would not recommend using the solution of literally exploiting a bug to prevent the user from doing anything with the gui, including being able to LEAVE THE GAME?? , unfortunately this does not seem possible.
Opening the DevConsole and searching it a bit lets you see all the bound keys, some of which (maybe) could be unbound. One of those is the Roblox Menu.
You would be trying to modify important things about Roblox, for example: eliminating the possibility for mobile users to exit the experience (again, obviously it is an example, they can still exit)
You’d have to not check it at all, it only impeeds with Roblox’s CoreScripts, it’s possible to delete the statement that checks UserInputService:GetFocusedTextbox(). It’s only getting tricky when you have another TextBox you want to type in.
You require a custom movement / camera script for this to work. You can still use Roblox’s Core Scripts but that’s defeating the purpose of removing all Core Components including Roblox Core Scripts.
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid") :: Humanoid
local Head = Character:WaitForChild("Head") :: BasePart
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart") :: BasePart
local Camera = Workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Scriptable
Camera.FieldOfView = 90
RunService.RenderStepped:Connect(function(Delta_Time: number)
Camera.CFrame = CFrame.new(Head.CFrame.Position) * (HumanoidRootPart.CFrame - HumanoidRootPart.CFrame.Position)
Player:Move(
Vector3.new(
(UserInputService:IsKeyDown(Enum.KeyCode.D) and 1 or 0) - (UserInputService:IsKeyDown(Enum.KeyCode.A) and 1 or 0),
0,
(UserInputService:IsKeyDown(Enum.KeyCode.S) and 1 or 0) - (UserInputService:IsKeyDown(Enum.KeyCode.W) and 1 or 0)
),
true
)
end)
Here’s the script that disables the Menu from openning by Focusing on a Textbox.
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local Player = Players.LocalPlayer
local GUI_Directory = Player:WaitForChild("PlayerGui")
local Screen_GUI = Instance.new("ScreenGui", GUI_Directory)
local Textbox = Instance.new("TextBox", Screen_GUI)
UserInputService.InputBegan:Connect(function(e, g)
Textbox:CaptureFocus()
print(e.KeyCode.Name)
end)
How to set up:
When something annoys somebody as much as the Core Main Menu annoys me, they’ll always find a way to solve their problem one way or another. Me 1 - 0 Roblox. They cannot fix this unless they annoy existing games by creating a new problem solving this one.