Issue with Code

I seem to be having an issue with my code.
I am trying to code the weapon so that if it is deployed, after 2 seconds of not being on the ground, the gravity will be changed but as soon as contact is made with the ground, it’ll return back to normal.
So far I have this:
[lua]function SWEP:Think()
if self.Owner:IsOnGround() == false then
timer.Create( “CheckJump”, 2, 1, function() self.Owner:SetGravity(-1) end )
elseif self.Owner:IsOnGround() == true then
self.Owner:SetGravity(0)
timer.Destroy( “CheckJump” )
end
end[/lua]
It just doesn’t seem to want to work. Where have I gone wrong?
Thanks for any help in advance :slight_smile:

[editline]30th March 2015[/editline]

Forgot to include this:
[lua]
function SWEP:Holster()
self.Owner:SetGravity(0)
return true
end[/lua]