local U=true local j=true local H=true local A={"\075\105\108\108\115"}local Q={"\072\101\108\109\101\116","\066\097\110\100\097\110\097","\072\101\097\100\115\101\116";"\071\108\097\115\115\101\115";"\080\087"}game.Players.PlayerAdded:connect(function(H)wait()local u=(game:GetService("\068\097\116\097\083\116\111\114\101\083\101\114\118\105\099\101")):GetDataStore(H.userId)for U=1,#A,1 do u:UpdateAsync(A[U],function(U)return U or 0 end)end local Y=Instance.new("\077\111\100\101\108",H)Y.Name="\108\101\097\100\101\114\115\116\097\116\115"for U=1,#Q,1 do S=Instance.new("\083\116\114\105\110\103\086\097\108\117\101",Y)S.Name=Q[U]end for H=1,#A,1 do S=Instance.new("\078\117\109\098\101\114\086\097\108\117\101",Y)S.Name=A[H]if U then S.Value=u:GetAsync(A[H])end if j then S.Changed:connect(function()u:SetAsync(A[H],S.Value)end)end end end)if H then game.Players.PlayerRemoving:connect(function(U)local j=(game:GetService("\068\097\116\097\083\116\111\114\101\083\101\114\118\105\099\101")):GetDataStore(U.userId)for H=1,#A,1 do stat=U.leaderstats:FindFirstChild(A[H])if stat then j:UpdateAsync(stat.Name,function(U)return stat.Value end)end end end)end
--------------------- PLEASE DO NOT EDIT BELOW!!!

local Auto_Load = true

local Auto_Save = true

local Save_On_Leave = true

local Stats = { "Kills" }

local StatsNotToSave = { "Helmet", "Bandana", "Headset", "Glasses", "PW" }

game.Players.PlayerAdded:connect(function(p)
	wait()
	local ODS = game:GetService("DataStoreService"):GetDataStore(p.userId)
	for i = 1, #Stats do
		ODS:UpdateAsync(Stats[i], function(old)
			return old or 0
		end)
	end
	local l = Instance.new("Model", p)
	l.Name = "leaderstats"
	for i = 1, #StatsNotToSave do
		S = Instance.new("StringValue", l)
		S.Name = StatsNotToSave[i]
	end
	for i = 1, #Stats do
		S = Instance.new("NumberValue", l)
		S.Name = Stats[i]
		if Auto_Load then
			S.Value = ODS:GetAsync(Stats[i])
		end
		if Auto_Save then
			S.Changed:connect(function()
				ODS:SetAsync(Stats[i], S.Value)
			end)
		end
	end
end)

if Save_On_Leave then
	game.Players.PlayerRemoving:connect(function(p)
		local ODS = game:GetService("DataStoreService"):GetDataStore(p.userId)
		for i = 1, #Stats do
			stat = p.leaderstats:FindFirstChild(Stats[i])
			if stat then
				ODS:UpdateAsync(stat.Name, function(old)
					return stat.Value
				end)
			end
		end
	end)
end
