Kill Npc For Cash dont work

I need a kill npc for cash work with data store
here is datastore code:
local Players = game:GetService(“Players”)
local TestService = game:GetService(“TestService”)
local RunService = game:GetService(“RunService”)
local DataStoreService = game:GetService(“DataStoreService”)
local DataStore = DataStoreService:GetDataStore(“DataStoreValues”)

Players.PlayerAdded:Connect(function(player)

local leaderstats = Instance.new('Folder')
leaderstats.Name = 'leaderstats'
leaderstats.Parent = player


local Coins = Instance.new('IntValue')
Coins.Name = 'Coins'
Coins.Parent = leaderstats
Coins.Value = 0

local Kills = Instance.new('IntValue')
Kills.Name = 'Mang'
Kills.Parent = leaderstats
Kills.Value = 0

local value1Data = Coins
local value2Data = Kills

local s, e = pcall(function()
	value1Data = DataStore:GetAsync(player.UserId..'-Value1') or 0 --check if they have data, if not it'll be "0"
	value2Data = DataStore:GetAsync(player.UserId..'-Value2') or 0
end)

if s then
	Coins.Value = value1Data --setting data if its success
	Kills.Value = value2Data
else
	TestService:Error(e)  --if not success then we error it to the console
end

end)

game.Players.PlayerRemoving:Connect(function(player)
local s, e = pcall(function()
DataStore:SetAsync(player.UserId…’-Value1’, player.leaderstats.Coins.Value) --setting data
DataStore:SetAsync(player.UserId…’-Value2’, player.leaderstats.Kills.Value)
end)
if not s then TestService:Error(e)
end
end)

game:BindToClose(function(player)
if not RunService:IsStudio() then
local s, e = pcall(function()
DataStore:SetAsync(player.UserId…’-Value1’, player.leaderstats.Coins.Value) --setting data
DataStore:SetAsync(player.UserId…’-Value2’, player.leaderstats.Kills.Value)
end)
if not s then TestService:Error(e)
end

end
end)

Does it not save or just does not count kill?
If the second, can you please send code for NPC?

If you are going to post a random script here that you copy pasted, at least format it correctly and tell us if there are any errors in the console.

did you get money when kill npc? but the data not save your money?
if you not get the money send the when enemy get kill by player script

Elaborate. No one understands you.

Why are you defining the datastore variables before you get them and why do you say “or 0”. Just check after getting the data if data was retrieved, if not then just set it to 0 after.

Can you please explain the situation better?
What exactly happens? It does not count kill, or does not save your stats to datastore?