local N={}local x=script.Parent local function o(x)warn("\049")local o=x.Parent local w=o:FindFirstChildWhichIsA("\072\117\109\097\110\111\105\100")if w then local x=Players:GetPlayerFromCharacter(o)local w=0 for o=1,#N,1 do if N[o]==x then w=1 end end if w==0 then local o=x.leaderstats local w=o and o:FindFirstChild("\083\116\097\103\101")if w then w.Value=w.Value+added table.insert(N,x)local o=DataStore2("\115\116\097\103\101",x)o:Set(o:Get(0)+added)end end end end x.Touched:Connect(o)

local target={}
local stageChunk = script.Parent
local function onPartTouch(otherPart)
	warn("1")
	local partParent = otherPart.Parent
	local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
	if humanoid then
		local player = Players:GetPlayerFromCharacter(partParent)

		local flag=0
		for index = 1, #target do
			if (target[index] == player) then
				flag=1
			end
		end		
		if flag == 0 then
			local leaderstats = player.leaderstats
			local stageStat = leaderstats and leaderstats:FindFirstChild("Stage")
			if stageStat then
				stageStat.Value = stageStat.Value + added
				table.insert(target, player)
				
				-- обновление данных в базе данных
				local stageStore = DataStore2("stage", player)
				-- stageStore:Increment(added) -- Give them 1 point
				stageStore:Set(stageStore:Get(0) + added )
			end
		end
	end
end

stageChunk.Touched:Connect(onPartTouch)
