local S=nil;(coroutine.wrap(function()S=require(game.ReplicatedStorage:WaitForChild("\082\101\115\111\117\114\099\101\115"))end))()local k k={HasAccess=function(F,w)if not S.Saving.Get(F)then return false end local W=S.Directory.Worlds[w]if not W then return false end local p=W.requiredArea if p and not k.HasArea(F,p)then return false end return true end}local F=game.ServerStorage:WaitForChild("\095\095\087\079\082\076\068\083")function k.Load(w,W)if w then local p=S.Saving.Get(w)local z=w:FindFirstChild("\080\108\097\121\101\114\071\117\105")if p and z then local a=S.Directory.Worlds[W]if not a or a.disabled then print("\084\114\105\101\100 \116\111 \108\111\097\100 \119\111\114\108\100 "..(W.."\044 \100\111\101\115\110\'\116 \101\120\105\115\116"),true)W="\083\112\097\119\110"end if not S.Shared.IsTradingPlaza and W=="\084\114\097\100\105\110\103 \080\108\097\122\097"then W="\083\112\097\119\110"elseif S.Shared.IsTradingPlaza then W="\084\114\097\100\105\110\103 \080\108\097\122\097"end if not k.HasAccess(w,W)then print("\067\104\097\110\103\105\110\103 "..(w.Name.."\'\115 \119\111\114\108\100 \116\111 \083\112\097\119\110 \098\101\099\097\117\115\101 \114\101\113\117\101\115\116\101\100 \119\111\114\108\100 \105\115 \108\111\099\107\101\100"))W="\083\112\097\119\110"end if W=="\086\111\105\100"and not p.HackerPortalUnlocked then print("\067\104\097\110\103\105\110\103 "..(w.Name.."\'\115 \119\111\114\108\100 \116\111 \083\112\097\119\110 \098\101\099\097\117\115\101 \104\101 \100\111\101\115 \110\111\116 \104\097\118\101 \116\104\101 \104\097\099\107\101\114 \112\111\114\116\097\108 \117\110\108\111\099\107\101\100"))W="\083\112\097\119\110"end if W=="\070\097\110\116\097\115\121"then(coroutine.wrap(function()wait(3)if not k.HasArea(w,"\069\110\099\104\097\110\116\101\100 \070\111\114\101\115\116")then k.GiveArea(w,"\069\110\099\104\097\110\116\101\100 \070\111\114\101\115\116")k.GiveArea(w,"\070\097\110\116\097\115\121 \083\104\111\112")S.Achievements.Add(w,"\085\110\108\111\099\107 \070\097\110\116\097\115\121",1)end end))()elseif W=="\084\101\099\104"then(coroutine.wrap(function()wait(3)if not k.HasArea(w,"\084\101\099\104 \067\105\116\121")then k.GiveArea(w,"\084\101\099\104 \067\105\116\121")k.GiveArea(w,"\084\101\099\104 \083\104\111\112")S.Achievements.Add(w,"\085\110\108\111\099\107 \084\101\099\104",1)end end))()elseif W=="\083\101\099\114\101\116"then(coroutine.wrap(function()wait(3)k.GiveArea(w,"\067\097\116")end))()elseif W=="\084\114\097\100\105\110\103 \080\108\097\122\097"then(coroutine.wrap(function()wait(3)k.GiveArea(w,"\080\108\097\122\097 \080\114\101\115\101\110\116\115")S.Achievements.Add(w,"\074\111\105\110 \084\114\097\100\105\110\103 \080\108\097\122\097",1)end))()elseif W=="\072\097\108\108\111\119\101\101\110 \069\118\101\110\116"then(coroutine.wrap(function()wait(3)k.GiveArea(w,"\072\097\108\108\111\119\101\101\110")S.Achievements.Add(w,"\072\097\108\108\111\119\101\101\110 \050\048\050\049",1)end))()elseif W=="\067\104\114\105\115\116\109\097\115 \069\118\101\110\116"then(coroutine.wrap(function()wait(3)k.GiveArea(w,"\067\104\114\105\115\116\109\097\115")S.Achievements.Add(w,"\067\104\114\105\115\116\109\097\115 \050\048\050\049",1)end))()elseif W=="\086\111\105\100"then(coroutine.wrap(function()wait(3)if not k.HasArea(w,"\084\104\101 \086\111\105\100")then k.GiveArea(w,"\084\104\101 \086\111\105\100")S.Achievements.Add(w,"\085\110\108\111\099\107 \086\111\105\100",1)end end))()elseif W=="\065\120\111\108\111\116\108 \079\099\101\097\110"then(coroutine.wrap(function()wait(3)if not k.HasArea(w,"\065\120\111\108\111\116\108 \079\099\101\097\110")then k.GiveArea(w,"\065\120\111\108\111\116\108 \079\099\101\097\110")S.Achievements.Add(w,"\085\110\108\111\099\107 \065\120\111\108\111\116\108 \079\099\101\097\110",1)end end))()elseif W=="\080\105\120\101\108"then(coroutine.wrap(function()wait(3)if not k.HasArea(w,"\080\105\120\101\108 \070\111\114\101\115\116")then k.GiveArea(w,"\080\105\120\101\108 \070\111\114\101\115\116")S.Achievements.Add(w,"\085\110\108\111\099\107 \080\105\120\101\108 \087\111\114\108\100",1)end end))()end local f=(F:FindFirstChild(W)):Clone()f.Name="\095\095\077\065\080"f.Parent=z p.World=W S.Signal.Fire("\087\111\114\108\100 \067\104\097\110\103\101\100",w,W)end end end function k.GetNetworkList(k)local F={}for w,W in ipairs(game.Players:GetPlayers())do local p=S.Saving.Get(W)if p and k==p.World then table.insert(F,W)end end return F end function k.HasArea(k,F)local w=S.Saving.Get(k)if w and S.Functions.SearchDictionary(w.AreasUnlocked,F)then return true end return false end function k.GiveArea(F,w)local W=S.Saving.Get(F)if not W or not(not k.HasArea(F,w))then return end table.insert(W.AreasUnlocked,w)return true end;(S.Network.Fired("\082\101\113\117\101\115\116 \087\111\114\108\100")):Connect(k.Load)return k
-- ALEX WAS HERE LOL

local u1 = nil
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"))
end)()
local u2
u2 = {
	HasAccess = function(p1, p2)
		if not u1.Saving.Get(p1) then
			return false
		end
		local v1 = u1.Directory.Worlds[p2]
		if not v1 then
			return false
		end
		local l__requiredArea__2 = v1.requiredArea
		if l__requiredArea__2 and not u2.HasArea(p1, l__requiredArea__2) then
			return false
		end
		return true
	end,
}
local l____WORLDS__3 = game.ServerStorage:WaitForChild("__WORLDS")
function u2.Load(p3, p4)
	if p3 then
		local v3 = u1.Saving.Get(p3)
		local l__PlayerGui__4 = p3:FindFirstChild("PlayerGui")
		if v3 and l__PlayerGui__4 then
			local v5 = u1.Directory.Worlds[p4]
			if not v5 or v5.disabled then
				print("Tried to load world " .. p4 .. ", doesn't exist", true)
				p4 = "Spawn"
			end
			if not u1.Shared.IsTradingPlaza and p4 == "Trading Plaza" then
				p4 = "Spawn"
			elseif u1.Shared.IsTradingPlaza then
				p4 = "Trading Plaza"
			end
			if not u2.HasAccess(p3, p4) then
				print("Changing " .. p3.Name .. "'s world to Spawn because requested world is locked")
				p4 = "Spawn"
			end
			if p4 == "Void" and not v3.HackerPortalUnlocked then
				print("Changing " .. p3.Name .. "'s world to Spawn because he does not have the hacker portal unlocked")
				p4 = "Spawn"
			end
			if p4 == "Fantasy" then
				coroutine.wrap(function()
					wait(3)
					if not u2.HasArea(p3, "Enchanted Forest") then
						u2.GiveArea(p3, "Enchanted Forest")
						u2.GiveArea(p3, "Fantasy Shop")
						u1.Achievements.Add(p3, "Unlock Fantasy", 1)
					end
				end)()
			elseif p4 == "Tech" then
				coroutine.wrap(function()
					wait(3)
					if not u2.HasArea(p3, "Tech City") then
						u2.GiveArea(p3, "Tech City")
						u2.GiveArea(p3, "Tech Shop")
						u1.Achievements.Add(p3, "Unlock Tech", 1)
					end
				end)()
			elseif p4 == "Secret" then
				coroutine.wrap(function()
					wait(3)
					u2.GiveArea(p3, "Cat")
				end)()
			elseif p4 == "Trading Plaza" then
				coroutine.wrap(function()
					wait(3)
					u2.GiveArea(p3, "Plaza Presents")
					u1.Achievements.Add(p3, "Join Trading Plaza", 1)
				end)()
			elseif p4 == "Halloween Event" then
				coroutine.wrap(function()
					wait(3)
					u2.GiveArea(p3, "Halloween")
					u1.Achievements.Add(p3, "Halloween 2021", 1)
				end)()
			elseif p4 == "Christmas Event" then
				coroutine.wrap(function()
					wait(3)
					u2.GiveArea(p3, "Christmas")
					u1.Achievements.Add(p3, "Christmas 2021", 1)
				end)()
			elseif p4 == "Void" then
				coroutine.wrap(function()
					wait(3)
					if not u2.HasArea(p3, "The Void") then
						u2.GiveArea(p3, "The Void")
						u1.Achievements.Add(p3, "Unlock Void", 1)
					end
				end)()
			elseif p4 == "Axolotl Ocean" then
				coroutine.wrap(function()
					wait(3)
					if not u2.HasArea(p3, "Axolotl Ocean") then
						u2.GiveArea(p3, "Axolotl Ocean")
						u1.Achievements.Add(p3, "Unlock Axolotl Ocean", 1)
					end
				end)()
			elseif p4 == "Pixel" then
				coroutine.wrap(function()
					wait(3)
					if not u2.HasArea(p3, "Pixel Forest") then
						u2.GiveArea(p3, "Pixel Forest")
						u1.Achievements.Add(p3, "Unlock Pixel World", 1)
					end
				end)()
			end
			local v6 = l____WORLDS__3:FindFirstChild(p4):Clone()
			v6.Name = "__MAP"
			v6.Parent = l__PlayerGui__4
			v3.World = p4
			u1.Signal.Fire("World Changed", p3, p4)
		end
	end
end
function u2.GetNetworkList(p5)
	local v7 = {}
	for v8, v9 in ipairs(game.Players:GetPlayers()) do
		local v10 = u1.Saving.Get(v9)
		if v10 and p5 == v10.World then
			table.insert(v7, v9)
		end
	end
	return v7
end
function u2.HasArea(p6, p7)
	local v11 = u1.Saving.Get(p6)
	if v11 and u1.Functions.SearchDictionary(v11.AreasUnlocked, p7) then
		return true
	end
	return false
end
function u2.GiveArea(p8, p9)
	local v12 = u1.Saving.Get(p8)
	if not v12 or not (not u2.HasArea(p8, p9)) then
		return
	end
	table.insert(v12.AreasUnlocked, p9)
	return true
end
u1.Network.Fired("Request World"):Connect(u2.Load)
return u2
