local safeObject = createObject(1337, 0, 0, 0)
local x,y,z = getElementPosition(getLocalPlayer())
local wx,wy,wz = getElementPosition(safeObject)
local dis = getDistanceBetweenPoints3D(x,y,z,wx,wy,wz)
if dis >5 then
outputChatBox("your not near a safe")
else
outputChatBox ("you ARE near a safe")
end
safeObject is the safe OBJECT. Is the safe object already made? If so, copy the createObject line.