local U={}local I=nil;(coroutine.wrap(function()I=require(game.ReplicatedStorage:WaitForChild("\082\101\115\111\117\114\099\101\115"))end))()function U.Currency(U,s,Q,C)local n=I.Saving.Get(U)if not n 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 Q=Q or"\069\110\101\114\103\121"s=math.round(s or 0)local d=n[Q]if d==-1 then d=0 n[Q]=0 end n[Q]=C and n[Q]+s or math.clamp(n[Q]+s,0,Q=="\071\101\109\115"and I.Settings.MaxGems or I.Settings.MaxEnergy)local y=n[Q]-d return y~=d,y end function U.Slots(U,s)local Q=I.Saving.Get(U)if not Q then return end s=math.round(s or 0)Q.MaxSlots=math.clamp(Q.MaxSlots+s,1,I.Settings.MaxSlots)return true end function U.SkipFurtune(U)local s=I.Saving.Get(U)if not s then return end s.FurtuneWheel=0 return true end return U


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;
