local K=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local q={}function q.addToReplicatedStorage()local q=K:FindFirstChild(script.Name)if q then return false end local H=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")H.Name=script.Name H.Value=script.Parent H.Parent=K local r=Instance.new("\066\111\111\108\086\097\108\117\101")r.Name=(game:GetService("\082\117\110\083\101\114\118\105\099\101")):IsClient()and"\067\108\105\101\110\116"or"\083\101\114\118\101\114"r.Value=true r.Parent=H return H end function q.getObject()local q=K:FindFirstChild(script.Name)if q then return q end return false end return q
-- This module enables you to place Zone wherever you like within the data model while
-- still enabling third-party applications (such as HDAdmin/Nanoblox) to locate it
-- This is necessary to prevent two ZonePlus applications initiating at runtime which would
-- diminish it's overall efficiency

local replicatedStorage = game:GetService("ReplicatedStorage")
local ZonePlusReference = {}

function ZonePlusReference.addToReplicatedStorage()
	local existingItem = replicatedStorage:FindFirstChild(script.Name)
	if existingItem then
		return false
	end
	local objectValue = Instance.new("ObjectValue")
	objectValue.Name = script.Name
	objectValue.Value = script.Parent
	objectValue.Parent = replicatedStorage
	local locationValue = Instance.new("BoolValue")
	locationValue.Name = (game:GetService("RunService"):IsClient() and "Client") or "Server"
	locationValue.Value = true
	locationValue.Parent = objectValue
	return objectValue
end

function ZonePlusReference.getObject()
	local objectValue = replicatedStorage:FindFirstChild(script.Name)
	if objectValue then
		return objectValue
	end
	return false
end

return ZonePlusReference
