Quick SWEP Hook help

I’m having a difficult time getting my head around adding this function (or a function like it) to a SWEP.
Essentially I want to create a weapon that when held (active) it allows only the player that is holding it to auto-hop

[LUA]hook.Add( “CreateMove”, “BunnyHop:CreateMove”, function( input )
if ( !LocalPlayer( ):Alive( ) || !LocalPlayer( ).NextBunnyHop ) then return; end
if ( LocalPlayer( ).NextBunnyHop < CurTime( ) ) then return; end

if ( input:KeyDown( IN_JUMP ) ) then
	input:SetButtons( input:GetButtons( ) - IN_JUMP );

end );

hook.Add( “OnPlayerHitGround”, “BunnyHop:HotFeet”, function( _p, _inWater, _onFloater, _speed )
_p.NextBunnyHop = CurTime( );
end );[/LUA]

you’d want to check

Player:GetActiveWeapon and

Entity:GetClass within the hook, provided your current code runs