---
title: "getscripthash"
description: "Returns a hexadecimal SHA384 hash of resolved script bytecode."
---

```lua
getscripthash(script: Instance): string?
```

---

## Aliases

None.

---

## Arguments

<ParamField body="script" type="Instance" required>
  The script Instance to inspect.
</ParamField>

---

## Returns

<ResponseField name="hash" type="string?">
  The script bytecode hash, or nil when it cannot be read.
</ResponseField>

Nil when supported bytecode is unavailable. Differs from getfunctionhash, which hashes a function representation.

**Related types:** [Instances types & behavior](/reference/instances/types).

---

## Example

```lua
for _, script in ipairs(getscripts()) do
    local ok, hash = pcall(getscripthash, script)
    if ok and hash then print(script.Name, hash) break end
end
```
