Skip to content

gethui

gethui returns a hidden Instance container used for safely storing UI elements. This container is mainly designed to avoid detections.

function gethui(): BasePlayerGui | Folder

Parameters

Parameter Description
(none) This function takes no parameters.

Example

Creating undetectable UI in gethui
local hui = gethui() :: (BasePlayerGui | Folder)

local gui = Instance.new("ScreenGui")
gui.Parent = hui
gui.Name = "GUI"

local label = Instance.new("TextLabel")
label.Size = UDim2.fromOffset(200, 50)
label.Text = "Hello from gethui!"
label.Parent = gui

print(hui:FindFirstChild("GUI")) -- Output: GUI