Help Needed in Coding gamemode

Ok hello whoever is reading this me and my friend are in the process of creating a gamemode with CakescriptG2 as its base seeing as none of us are very good at lua coding we decided to call upon the coders of the facepunch community we are trying to make scripts like hunger mods and other things if you are interested or have questions please contact me at my steam account : greg25kk thank you, Greg

30 second hunger script.
[lua]
– ply:Hunger() prints how much hunger they have.
function _R.Player:Hunger()
return self:GetNWInt(“hg”, 100)
end

– ply:AddHunger(100) adds 100 to there hunger, use ply:AddHunger(-100) to take 100, or 50, or 20.
function _R.Player:AddHunger(n)
self:SetNWInt(“hg”, self:Hunger() + n)
end

local function HungerTimer()
for k,v in pairs(player.GetAll()) do
v:AddHunger(-2)
if( v:Hunger() <= 0 ) then
v:SetHealth(v:Health() - 10)
if( v:Health() <= 0 ) then
v:Kill()
end
end
end
end
timer.Create(“hgt”, 30, 0, HungerTimer)

hook.Add(“PlayerSpawn”, “Shit”, function(ply)
ply:SetNWInt(“hg”, 100)
end)
[/lua]
Add to a serverside file, it may not work but you can fix it. Just a cheap 30 second hunger script.

I wouldn’t suggest starting on a G2 scheme because CakeScript G3 is expected to be released by the end of next month at the latest.