> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# gethwid

Returns the user's Hardware ID.

```luau theme={null}
gethwid(): string
```

Most commonly used to gate script hubs behind an HWID whitelist.

## Returns

`string` - a 64-character hash.

## Example

Block unauthorised users at script load by checking the HWID against a whitelist.

<CodeGroup>
  ```luau Example 1 theme={null}
  <<<<<<< HEAD
  local hwid = gethwid()
  =======
  -- gethwid(): string
  >>>>>>> 50e30f53759b0538759af25c9b271514aa2c9290
  ```

  ```luau Example 2 theme={null}
  local allowed = {
      ["a1b2c3..."] = true, -- your HWIDs go here
  }

  if not allowed[gethwid()] then
      error(`not whitelisted`)
  end
  ```
</CodeGroup>

<Tip>
  Often used for script key systems and authorization checks.
</Tip>
