I put a script in server script service and put this following:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:connect(function(c)
c:WaitForChild("Humanoid").Running:connect(function(speed)
if speed >= 10 then
repeat
print("Working?")
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value -1
until
if speed < 10 then
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value +1
end
end
end
end)

3 comments
plr.Character instead of script.Parent on line 2. You can failsafe the Character by using either a repeat wait() until line or by waiting for CharacterAdded to fire.
what about the humanoid.speed >= 10 then section is that gonna work? i will show you my result.
this is my new change but the line 9 it says Expected identifier when parsing expression,got 'if'