local E={}local R=nil;(coroutine.wrap(function()R=require(game.ReplicatedStorage:WaitForChild("\082\101\115\111\117\114\099\101\115"))end))()function E.Currency(E,S,l,g)local j=R.Saving.Get(E)if not j then return end if not S or S~=S then return print("\080\114\101\118\101\110\116\101\100 \112\111\115\115\105\098\108\101 \078\097\078 \102\111\114 \103\105\118\105\110\103 \099\111\105\110\115",true)end l=l or"\069\110\101\114\103\121"S=math.round(S or 0)local r=j[l]if r==-1 then r=0 j[l]=0 end j[l]=g and j[l]+S or math.clamp(j[l]+S,0,l=="\071\101\109\115"and R.Settings.MaxGems or R.Settings.MaxEnergy)local X=j[l]-r return X~=r,X end function E.Slots(E,S)local l=R.Saving.Get(E)if not l then return end S=math.round(S or 0)l.MaxSlots=math.clamp(l.MaxSlots+S,1,R.Settings.MaxSlots)return true end function E.SkipFurtune(E)local S=R.Saving.Get(E)if not S then return end S.FurtuneWheel=0 return true end return E
-- ALEX WAS HERE LOL

local v1 = {}
local u1 = nil
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"))
end)()
function v1.Currency(p1, p2, p3, p4)
	local v2 = u1.Saving.Get(p1)
	if not v2 then
		return
	end
	if not p2 or p2 ~= p2 then
		return print("Prevented possible NaN for giving coins", true)
	end
	p3 = p3 or "Energy"
	p2 = math.round(p2 or 0)
	local v3 = v2[p3]
	if v3 == -1 then
		v3 = 0
		v2[p3] = 0
	end
	v2[p3] = p4 and v2[p3] + p2
		or math.clamp(v2[p3] + p2, 0, p3 == "Gems" and u1.Settings.MaxGems or u1.Settings.MaxEnergy)
	local v4 = v2[p3] - v3
	return v4 ~= v3, v4
end
function v1.Slots(p5, p6)
	local v5 = u1.Saving.Get(p5)
	if not v5 then
		return
	end
	p6 = math.round(p6 or 0)
	v5.MaxSlots = math.clamp(v5.MaxSlots + p6, 1, u1.Settings.MaxSlots)
	--print(v5.MaxSlots ~= v5.MaxSlots)
	return true
end

function v1.SkipFurtune(plr)
	local v2 = u1.Saving.Get(plr)
	if not v2 then
		return
	end
	v2.FurtuneWheel = 0
	return true
end
return v1
