function weapons_changing.init()

 function bindings.localplayerEvent(player, event, state)
  if event == Player.Jump then
   player:data().jump = state
  end
  if event == Player.Change then
   player:data().change = state
  end
  local weapon_pos = player:data().weapon_pos
  if event == Player.Left and player:data().change and state and weapon_pos then
   weapon_pos = weapon_pos - 1
   player:data().weapon_changing = -72
   if weapon_pos < 1 then
    weapon_pos = 5
   end
   player:data().weapon_pos = weapon_pos
  end
  if event == Player.Right and player:data().change and state and weapon_pos then
   weapon_pos = weapon_pos + 1
   player:data().weapon_changing = 72
   if weapon_pos > 5 then
    weapon_pos = 1
   end
   player:data().weapon_pos = weapon_pos
  end
 end
end