local P=game:GetService("\080\108\097\121\101\114\115")local N=game:GetService("\082\117\110\083\101\114\118\105\099\101")local X=game:GetService("\083\101\114\118\101\114\083\116\111\114\097\103\101")local d=require(script.Constants)local C=require(script.Promise)local r=require(script.SavingMethods)local a=require(script.Settings)local D=require(script.TableUtil)local p=require(script.Verifier)local F=X:FindFirstChild("\083\097\118\101\073\110\083\116\117\100\105\111")local G=F and F.Value local function c(P)if typeof(P)=="\116\097\098\108\101"then return D.clone(P)else return P end end
--[[
	DataStore2: A wrapper for data stores that caches, saves player's data, and uses berezaa's method of saving data.
	Use require(1936396537) to have an updated version of DataStore2.

	DataStore2(dataStoreName, player) - Returns a DataStore2 DataStore

	DataStore2 DataStore:
	- Get([defaultValue])
	- Set(value)
	- Update(updateFunc)
	- Increment(value, defaultValue)
	- BeforeInitialGet(modifier)
	- BeforeSave(modifier)
	- Save()
	- SaveAsync()
	- OnUpdate(callback)
	- BindToClose(callback)

	local coinStore = DataStore2("Coins", player)

	To give a player coins:

	coinStore:Increment(50)

	To get the current player's coins:

	coinStore:Get()
--]]

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ServerStorage = game:GetService("ServerStorage")

local Constants = require(script.Constants)
local Promise = require(script.Promise)
local SavingMethods = require(script.SavingMethods)
local Settings = require(script.Settings)
local TableUtil = require(script.TableUtil)
local Verifier = require(script.Verifier)

local SaveInStudioObject = ServerStorage:FindFirstChild("SaveInStudio")
local SaveInStudio = SaveInStudioObject and SaveInStudioObject.Value

local function clone(value)
	if typeof(value) == "table" then
		return TableUtil.clone(value)
	else
		return value
	end
end
