Help needed with low grav in pointshop

Alright I have a low gravity file in the server pointshop. Everything works until… A player goes onto a ladder. Once a player goes on a ladder the effects of the low gravity stop working.
I’m not really sure on how to fix this and would appreciate any help I can get. here is the current code:


ITEM.Name = 'Low Gravity'
ITEM.Price = 50000
ITEM.Model = 'models/props_junk/GlassBottle01a.mdl'
ITEM.NoPreview = true
local gravity = 0.35 

function ITEM:OnEquip(ply)
	ply:SetGravity(gravity)
end

function ITEM:OnHolster(ply)
	ply:SetGravity(1)
end

function ITEM:OnSell(ply)
    ply:SetGravity(1)
end

Try this?



ITEM.Name = 'Low Gravity'
ITEM.Price = 50000
ITEM.Model = 'models/props_junk/GlassBottle01a.mdl'
ITEM.NoPreview = true
local gravity = 0.35 

function ITEM:OnEquip(ply)
	ply:SetGravity(gravity)
	local equipped = true
end

function ITEM:OnHolster(ply)
	ply:SetGravity(1)
end

function ITEM:OnSell(ply)
    ply:SetGravity(1)
end

hook.Add("KeyPress", "Check", function(ply, key)
	if equipped == true then
		if key && player:GetMoveType(9) then
			ply:SetGravity(gravity)
		end
	end
end)


Thank you for the reply! I’ll give it a try once I get home.

Unfortunately it did not work.